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.
37 lines
789 B
37 lines
789 B
var COMMA = require('../../tokenizer').TYPE.Comma;
|
|
|
|
module.exports = {
|
|
name: 'MediaQueryList',
|
|
structure: {
|
|
children: [[
|
|
'MediaQuery'
|
|
]]
|
|
},
|
|
parse: function(relative) {
|
|
var children = this.createList();
|
|
|
|
this.scanner.skipSC();
|
|
|
|
while (!this.scanner.eof) {
|
|
children.push(this.MediaQuery(relative));
|
|
|
|
if (this.scanner.tokenType !== COMMA) {
|
|
break;
|
|
}
|
|
|
|
this.scanner.next();
|
|
}
|
|
|
|
return {
|
|
type: 'MediaQueryList',
|
|
loc: this.getLocationFromList(children),
|
|
children: children
|
|
};
|
|
},
|
|
generate: function(node) {
|
|
this.children(node, function() {
|
|
this.chunk(',');
|
|
});
|
|
}
|
|
};
|