UNPKG

2.59 kBTypeScriptView Raw
1/**
2 * Enum of all token types, with bit fields to signify meaningful properties.
3 */
4export declare enum TokenType {
5 PRECEDENCE_MASK = 15,
6 IS_KEYWORD = 16,
7 IS_ASSIGN = 32,
8 IS_RIGHT_ASSOCIATIVE = 64,
9 IS_PREFIX = 128,
10 IS_POSTFIX = 256,
11 num = 0,
12 bigint = 512,
13 regexp = 1024,
14 string = 1536,
15 name = 2048,
16 eof = 2560,
17 bracketL = 3072,
18 bracketR = 3584,
19 braceL = 4096,
20 braceBarL = 4608,
21 braceR = 5120,
22 braceBarR = 5632,
23 parenL = 6144,
24 parenR = 6656,
25 comma = 7168,
26 semi = 7680,
27 colon = 8192,
28 doubleColon = 8704,
29 dot = 9216,
30 question = 9728,
31 questionDot = 10240,
32 arrow = 10752,
33 template = 11264,
34 ellipsis = 11776,
35 backQuote = 12288,
36 dollarBraceL = 12800,
37 at = 13312,
38 hash = 13824,
39 eq = 14368,
40 assign = 14880,
41 preIncDec = 15744,
42 postIncDec = 16256,
43 bang = 16512,
44 tilde = 17024,
45 pipeline = 17409,
46 nullishCoalescing = 17922,
47 logicalOR = 18434,
48 logicalAND = 18947,
49 bitwiseOR = 19460,
50 bitwiseXOR = 19973,
51 bitwiseAND = 20486,
52 equality = 20999,
53 lessThan = 21512,
54 greaterThan = 22024,
55 relationalOrEqual = 22536,
56 bitShift = 23049,
57 plus = 23690,
58 minus = 24202,
59 modulo = 24587,
60 star = 25099,
61 slash = 25611,
62 exponent = 26188,
63 jsxName = 26624,
64 jsxText = 27136,
65 jsxTagStart = 27648,
66 jsxTagEnd = 28160,
67 typeParameterStart = 28672,
68 nonNullAssertion = 29184,
69 _break = 29712,
70 _case = 30224,
71 _catch = 30736,
72 _continue = 31248,
73 _debugger = 31760,
74 _default = 32272,
75 _do = 32784,
76 _else = 33296,
77 _finally = 33808,
78 _for = 34320,
79 _function = 34832,
80 _if = 35344,
81 _return = 35856,
82 _switch = 36368,
83 _throw = 37008,
84 _try = 37392,
85 _var = 37904,
86 _let = 38416,
87 _const = 38928,
88 _while = 39440,
89 _with = 39952,
90 _new = 40464,
91 _this = 40976,
92 _super = 41488,
93 _class = 42000,
94 _extends = 42512,
95 _export = 43024,
96 _import = 43536,
97 _yield = 44048,
98 _null = 44560,
99 _true = 45072,
100 _false = 45584,
101 _in = 46104,
102 _instanceof = 46616,
103 _typeof = 47248,
104 _void = 47760,
105 _delete = 48272,
106 _async = 48656,
107 _get = 49168,
108 _set = 49680,
109 _declare = 50192,
110 _readonly = 50704,
111 _abstract = 51216,
112 _static = 51728,
113 _public = 52240,
114 _private = 52752,
115 _protected = 53264,
116 _as = 53776,
117 _enum = 54288,
118 _type = 54800,
119 _implements = 55312
120}
121export declare function formatTokenType(tokenType: TokenType): string;
122
\No newline at end of file