diff options
Diffstat (limited to 'vanilla/node_modules/css-tree/cjs/syntax/node/LayerList.cjs')
| -rw-r--r-- | vanilla/node_modules/css-tree/cjs/syntax/node/LayerList.cjs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/vanilla/node_modules/css-tree/cjs/syntax/node/LayerList.cjs b/vanilla/node_modules/css-tree/cjs/syntax/node/LayerList.cjs new file mode 100644 index 0000000..0ce29f5 --- /dev/null +++ b/vanilla/node_modules/css-tree/cjs/syntax/node/LayerList.cjs @@ -0,0 +1,43 @@ +'use strict'; + +const types = require('../../tokenizer/types.cjs'); + +const name = 'LayerList'; +const structure = { + children: [[ + 'Layer' + ]] +}; + +function parse() { + const children = this.createList(); + + this.skipSC(); + + while (!this.eof) { + children.push(this.Layer()); + + if (this.lookupTypeNonSC(0) !== types.Comma) { + break; + } + + this.skipSC(); + this.next(); + this.skipSC(); + } + + return { + type: 'LayerList', + loc: this.getLocationFromList(children), + children + }; +} + +function generate(node) { + this.children(node, () => this.token(types.Comma, ',')); +} + +exports.generate = generate; +exports.name = name; +exports.parse = parse; +exports.structure = structure; |
