source: trip-planner-front/node_modules/css-tree/lib/syntax/atrule/import.js@ e29cc2e

Last change on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.0 KB
Line 
1var TYPE = require('../../tokenizer').TYPE;
2
3var STRING = TYPE.String;
4var IDENT = TYPE.Ident;
5var URL = TYPE.Url;
6var FUNCTION = TYPE.Function;
7var LEFTPARENTHESIS = TYPE.LeftParenthesis;
8
9module.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.