Urara-Blog/node_modules/.pnpm-store/v3/files/9d/37bb3bac190f7288277407af1650ad0ac3f03864efa47be60f8b1ac7715694acda647500f3c2d29975dd88249363e0ff9957b1a74a7ff1618f3ca679b654c8
2022-08-14 01:14:53 +08:00

40 lines
1 KiB
Text

var TYPE = require('../../tokenizer').TYPE;
var STRING = TYPE.String;
var IDENT = TYPE.Ident;
var URL = TYPE.Url;
var FUNCTION = TYPE.Function;
var LEFTPARENTHESIS = TYPE.LeftParenthesis;
module.exports = {
parse: {
prelude: function() {
var children = this.createList();
this.scanner.skipSC();
switch (this.scanner.tokenType) {
case STRING:
children.push(this.String());
break;
case URL:
case FUNCTION:
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.WhiteSpace());
children.push(this.MediaQueryList());
}
return children;
},
block: null
}
};