source: imaps-frontend/node_modules/css-tree/lib/syntax/node/SelectorList.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • 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.