Last change
on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | var TYPE = require('../../tokenizer').TYPE;
|
---|
2 |
|
---|
3 | var STRING = TYPE.String;
|
---|
4 | var IDENT = TYPE.Ident;
|
---|
5 | var URL = TYPE.Url;
|
---|
6 | var FUNCTION = TYPE.Function;
|
---|
7 | var LEFTPARENTHESIS = TYPE.LeftParenthesis;
|
---|
8 |
|
---|
9 | module.exports = {
|
---|
10 | parse: {
|
---|
11 | prelude: function() {
|
---|
12 | var children = this.createList();
|
---|
13 |
|
---|
14 | this.scanner.skipSC();
|
---|
15 |
|
---|
16 | switch (this.scanner.tokenType) {
|
---|
17 | case STRING:
|
---|
18 | children.push(this.String());
|
---|
19 | break;
|
---|
20 |
|
---|
21 | case URL:
|
---|
22 | case FUNCTION:
|
---|
23 | children.push(this.Url());
|
---|
24 | break;
|
---|
25 |
|
---|
26 | default:
|
---|
27 | this.error('String or url() is expected');
|
---|
28 | }
|
---|
29 |
|
---|
30 | if (this.lookupNonWSType(0) === IDENT ||
|
---|
31 | this.lookupNonWSType(0) === LEFTPARENTHESIS) {
|
---|
32 | children.push(this.WhiteSpace());
|
---|
33 | children.push(this.MediaQueryList());
|
---|
34 | }
|
---|
35 |
|
---|
36 | return children;
|
---|
37 | },
|
---|
38 | block: null
|
---|
39 | }
|
---|
40 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.