blob: e8a05cd5d5a1c755889b5e3c138803659c94ba6c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
import { Comma } from '../../tokenizer/index.js';
export const name = 'LayerList';
export const structure = {
children: [[
'Layer'
]]
};
export function parse() {
const children = this.createList();
this.skipSC();
while (!this.eof) {
children.push(this.Layer());
if (this.lookupTypeNonSC(0) !== Comma) {
break;
}
this.skipSC();
this.next();
this.skipSC();
}
return {
type: 'LayerList',
loc: this.getLocationFromList(children),
children
};
}
export function generate(node) {
this.children(node, () => this.token(Comma, ','));
}
|