format: prettify entire project

This commit is contained in:
Rim
2025-04-02 06:50:39 -04:00
parent 86f0782a98
commit 7ccc0be712
1711 changed files with 755867 additions and 235931 deletions

View File

@ -4,55 +4,50 @@ const types = require('../../tokenizer/types.cjs');
const name = 'MediaQuery';
const structure = {
children: [[
'Identifier',
'MediaFeature',
'WhiteSpace'
]]
children: [['Identifier', 'MediaFeature', 'WhiteSpace']],
};
function parse() {
const children = this.createList();
let child = null;
const children = this.createList();
let child = null;
this.skipSC();
this.skipSC();
scan:
while (!this.eof) {
switch (this.tokenType) {
case types.Comment:
case types.WhiteSpace:
this.next();
continue;
scan: while (!this.eof) {
switch (this.tokenType) {
case types.Comment:
case types.WhiteSpace:
this.next();
continue;
case types.Ident:
child = this.Identifier();
break;
case types.Ident:
child = this.Identifier();
break;
case types.LeftParenthesis:
child = this.MediaFeature();
break;
case types.LeftParenthesis:
child = this.MediaFeature();
break;
default:
break scan;
}
children.push(child);
default:
break scan;
}
if (child === null) {
this.error('Identifier or parenthesis is expected');
}
children.push(child);
}
return {
type: 'MediaQuery',
loc: this.getLocationFromList(children),
children
};
if (child === null) {
this.error('Identifier or parenthesis is expected');
}
return {
type: 'MediaQuery',
loc: this.getLocationFromList(children),
children,
};
}
function generate(node) {
this.children(node);
this.children(node);
}
exports.generate = generate;