Urara-Blog/node_modules/.pnpm-store/v3/files/1d/f020535c2b2ce4e224814662d7dc0f1ab551e1f6557f26eb10d892153ce4bf6b8cc0851d01cc96f6d88bc7ddd4e3848469c2dbca191454a125a26c59716891
2022-08-14 01:14:53 +08:00

39 lines
914 B
Text

import {
String as StringToken,
Ident,
Url,
Function as FunctionToken,
LeftParenthesis
} from '../../tokenizer/index.js';
export default {
parse: {
prelude() {
const children = this.createList();
this.skipSC();
switch (this.tokenType) {
case StringToken:
children.push(this.String());
break;
case Url:
case FunctionToken:
children.push(this.Url());
break;
default:
this.error('String or url() is expected');
}
if (this.lookupNonWSType(0) === Ident ||
this.lookupNonWSType(0) === LeftParenthesis) {
children.push(this.MediaQueryList());
}
return children;
},
block: null
}
};