File: //proc/1526/task/1533/cwd/tana/frontend/node_modules/css-tree/lib/syntax/node/Selector.js
module.exports = {
name: 'Selector',
structure: {
children: [[
'TypeSelector',
'IdSelector',
'ClassSelector',
'AttributeSelector',
'PseudoClassSelector',
'PseudoElementSelector',
'Combinator',
'WhiteSpace'
]]
},
parse: function() {
var children = this.readSequence(this.scope.Selector);
// nothing were consumed
if (children.isEmpty()) {
this.scanner.error('Selector is expected');
}
return {
type: 'Selector',
loc: this.getLocationFromList(children),
children: children
};
},
generate: function(processChunk, node) {
this.each(processChunk, node);
}
};