Urara-Blog/node_modules/.pnpm-store/v3/files/a7/b76921d8193d40d2c3a50d9799960f2da34ca0da098c02de56101518666a981222bd7c278984fcbab464f8e7f1a78d68104f57d0b1b9b85004e9784a078a11
2022-08-14 01:14:53 +08:00

32 lines
790 B
Text

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 (this.getFirstListNode(children) === null) {
this.error('Selector is expected');
}
return {
type: 'Selector',
loc: this.getLocationFromList(children),
children: children
};
},
generate: function(node) {
this.children(node);
}
};