source: trip-planner-front/node_modules/css-tree/lib/syntax/node/SelectorList.js@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 825 bytes
Line 
1var TYPE = require('../../tokenizer').TYPE;
2
3var COMMA = TYPE.Comma;
4
5module.exports = {
6 name: 'SelectorList',
7 structure: {
8 children: [[
9 'Selector',
10 'Raw'
11 ]]
12 },
13 parse: function() {
14 var children = this.createList();
15
16 while (!this.scanner.eof) {
17 children.push(this.Selector());
18
19 if (this.scanner.tokenType === COMMA) {
20 this.scanner.next();
21 continue;
22 }
23
24 break;
25 }
26
27 return {
28 type: 'SelectorList',
29 loc: this.getLocationFromList(children),
30 children: children
31 };
32 },
33 generate: function(node) {
34 this.children(node, function() {
35 this.chunk(',');
36 });
37 },
38 walkContext: 'selector'
39};
Note: See TracBrowser for help on using the repository browser.