Last change
on this file since 6a80231 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
789 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | var COMMA = require('../../tokenizer').TYPE.Comma;
|
---|
| 2 |
|
---|
| 3 | module.exports = {
|
---|
| 4 | name: 'MediaQueryList',
|
---|
| 5 | structure: {
|
---|
| 6 | children: [[
|
---|
| 7 | 'MediaQuery'
|
---|
| 8 | ]]
|
---|
| 9 | },
|
---|
| 10 | parse: function(relative) {
|
---|
| 11 | var children = this.createList();
|
---|
| 12 |
|
---|
| 13 | this.scanner.skipSC();
|
---|
| 14 |
|
---|
| 15 | while (!this.scanner.eof) {
|
---|
| 16 | children.push(this.MediaQuery(relative));
|
---|
| 17 |
|
---|
| 18 | if (this.scanner.tokenType !== COMMA) {
|
---|
| 19 | break;
|
---|
| 20 | }
|
---|
| 21 |
|
---|
| 22 | this.scanner.next();
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | return {
|
---|
| 26 | type: 'MediaQueryList',
|
---|
| 27 | loc: this.getLocationFromList(children),
|
---|
| 28 | children: children
|
---|
| 29 | };
|
---|
| 30 | },
|
---|
| 31 | generate: function(node) {
|
---|
| 32 | this.children(node, function() {
|
---|
| 33 | this.chunk(',');
|
---|
| 34 | });
|
---|
| 35 | }
|
---|
| 36 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.