[d565449] | 1 | // CSS Syntax Module Level 3
|
---|
| 2 | // https://www.w3.org/TR/css-syntax-3/
|
---|
| 3 | var TYPE = {
|
---|
| 4 | EOF: 0, // <EOF-token>
|
---|
| 5 | Ident: 1, // <ident-token>
|
---|
| 6 | Function: 2, // <function-token>
|
---|
| 7 | AtKeyword: 3, // <at-keyword-token>
|
---|
| 8 | Hash: 4, // <hash-token>
|
---|
| 9 | String: 5, // <string-token>
|
---|
| 10 | BadString: 6, // <bad-string-token>
|
---|
| 11 | Url: 7, // <url-token>
|
---|
| 12 | BadUrl: 8, // <bad-url-token>
|
---|
| 13 | Delim: 9, // <delim-token>
|
---|
| 14 | Number: 10, // <number-token>
|
---|
| 15 | Percentage: 11, // <percentage-token>
|
---|
| 16 | Dimension: 12, // <dimension-token>
|
---|
| 17 | WhiteSpace: 13, // <whitespace-token>
|
---|
| 18 | CDO: 14, // <CDO-token>
|
---|
| 19 | CDC: 15, // <CDC-token>
|
---|
| 20 | Colon: 16, // <colon-token> :
|
---|
| 21 | Semicolon: 17, // <semicolon-token> ;
|
---|
| 22 | Comma: 18, // <comma-token> ,
|
---|
| 23 | LeftSquareBracket: 19, // <[-token>
|
---|
| 24 | RightSquareBracket: 20, // <]-token>
|
---|
| 25 | LeftParenthesis: 21, // <(-token>
|
---|
| 26 | RightParenthesis: 22, // <)-token>
|
---|
| 27 | LeftCurlyBracket: 23, // <{-token>
|
---|
| 28 | RightCurlyBracket: 24, // <}-token>
|
---|
| 29 | Comment: 25
|
---|
| 30 | };
|
---|
| 31 |
|
---|
| 32 | var NAME = Object.keys(TYPE).reduce(function(result, key) {
|
---|
| 33 | result[TYPE[key]] = key;
|
---|
| 34 | return result;
|
---|
| 35 | }, {});
|
---|
| 36 |
|
---|
| 37 | module.exports = {
|
---|
| 38 | TYPE: TYPE,
|
---|
| 39 | NAME: NAME
|
---|
| 40 | };
|
---|