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

39 lines
825 B
Text

var TYPE = require('../../tokenizer').TYPE;
var COMMA = TYPE.Comma;
module.exports = {
name: 'SelectorList',
structure: {
children: [[
'Selector',
'Raw'
]]
},
parse: function() {
var children = this.createList();
while (!this.scanner.eof) {
children.push(this.Selector());
if (this.scanner.tokenType === COMMA) {
this.scanner.next();
continue;
}
break;
}
return {
type: 'SelectorList',
loc: this.getLocationFromList(children),
children: children
};
},
generate: function(node) {
this.children(node, function() {
this.chunk(',');
});
},
walkContext: 'selector'
};