source: imaps-frontend/node_modules/css-tree/lib/syntax/node/Selector.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: 790 bytes
Line 
1module.exports = {
2 name: 'Selector',
3 structure: {
4 children: [[
5 'TypeSelector',
6 'IdSelector',
7 'ClassSelector',
8 'AttributeSelector',
9 'PseudoClassSelector',
10 'PseudoElementSelector',
11 'Combinator',
12 'WhiteSpace'
13 ]]
14 },
15 parse: function() {
16 var children = this.readSequence(this.scope.Selector);
17
18 // nothing were consumed
19 if (this.getFirstListNode(children) === null) {
20 this.error('Selector is expected');
21 }
22
23 return {
24 type: 'Selector',
25 loc: this.getLocationFromList(children),
26 children: children
27 };
28 },
29 generate: function(node) {
30 this.children(node);
31 }
32};
Note: See TracBrowser for help on using the repository browser.