securityos/node_modules/css-tree/lib/syntax/node/MediaQueryList.js

35 lines
628 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
import { Comma } from '../../tokenizer/index.js';
export const name = 'MediaQueryList';
export const structure = {
children: [[
'MediaQuery'
]]
};
export function parse() {
const children = this.createList();
this.skipSC();
while (!this.eof) {
children.push(this.MediaQuery());
if (this.tokenType !== Comma) {
break;
}
this.next();
}
return {
type: 'MediaQueryList',
loc: this.getLocationFromList(children),
children
};
}
export function generate(node) {
this.children(node, () => this.token(Comma, ','));
}