You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

39 lines
914 B

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
}
};