astro-ghostcms/.pnpm-store/v3/files/1c/7e05e2769903a85160c96f3787d...

36 lines
676 B
Plaintext
Raw Normal View History

2024-02-14 14:10:47 +00:00
import { Comma } from '../../tokenizer/index.js';
export const name = 'SelectorList';
export const walkContext = 'selector';
export const structure = {
children: [[
'Selector',
'Raw'
]]
};
export function parse() {
const children = this.createList();
while (!this.eof) {
children.push(this.Selector());
if (this.tokenType === Comma) {
this.next();
continue;
}
break;
}
return {
type: 'SelectorList',
loc: this.getLocationFromList(children),
children
};
}
export function generate(node) {
this.children(node, () => this.token(Comma, ','));
}