@tbela99/css-parser 1.8.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/README.md +129 -31
  3. package/dist/index-umd-web.js +27382 -24086
  4. package/dist/index.d.ts +2737 -2200
  5. package/dist/package.json.js +2 -2
  6. package/dist/src/data/properties.json.js +1 -1
  7. package/dist/src/data/validation.json.js +1 -1
  8. package/dist/src/lib/ast/arena-node.js +548 -0
  9. package/dist/src/lib/ast/arena.js +3198 -0
  10. package/dist/src/lib/ast/features/calc.js +85 -76
  11. package/dist/src/lib/ast/features/if.js +155 -115
  12. package/dist/src/lib/ast/features/index.js +1 -1
  13. package/dist/src/lib/ast/features/inlinecssvariables.js +77 -84
  14. package/dist/src/lib/ast/features/prefix.js +184 -183
  15. package/dist/src/lib/ast/features/shorthand.js +40 -46
  16. package/dist/src/lib/ast/features/transform.js +24 -24
  17. package/dist/src/lib/ast/features/type.js +1 -1
  18. package/dist/src/lib/ast/fingerprint.js +333 -0
  19. package/dist/src/lib/ast/math/expression.js +458 -543
  20. package/dist/src/lib/ast/math/math.js +19 -41
  21. package/dist/src/lib/ast/minify.js +590 -647
  22. package/dist/src/lib/ast/transform/compute.js +82 -85
  23. package/dist/src/lib/ast/transform/matrix.js +21 -38
  24. package/dist/src/lib/ast/transform/minify.js +82 -193
  25. package/dist/src/lib/ast/transform/perspective.js +2 -3
  26. package/dist/src/lib/ast/transform/rotate.js +1 -1
  27. package/dist/src/lib/ast/transform/scale.js +1 -1
  28. package/dist/src/lib/ast/transform/skew.js +1 -1
  29. package/dist/src/lib/ast/transform/translate.js +1 -1
  30. package/dist/src/lib/ast/transform/utils.js +2 -2
  31. package/dist/src/lib/ast/types.js +263 -258
  32. package/dist/src/lib/ast/walk.js +246 -610
  33. package/dist/src/lib/fs/resolve.js +1 -1
  34. package/dist/src/lib/parser/declaration/list.js +223 -139
  35. package/dist/src/lib/parser/declaration/map.js +251 -238
  36. package/dist/src/lib/parser/declaration/set.js +74 -66
  37. package/dist/src/lib/parser/linesmap.js +1 -1
  38. package/dist/src/lib/parser/parse.js +1379 -1662
  39. package/dist/src/lib/parser/source.js +7 -4
  40. package/dist/src/lib/parser/tokenize.js +406 -199
  41. package/dist/src/lib/parser/utils/angle.js +11 -13
  42. package/dist/src/lib/parser/utils/at-rule-container.js +183 -168
  43. package/dist/src/lib/parser/utils/at-rule-font-feature-values.js +5 -5
  44. package/dist/src/lib/parser/utils/at-rule-generic.js +31 -24
  45. package/dist/src/lib/parser/utils/at-rule-import.js +44 -44
  46. package/dist/src/lib/parser/utils/at-rule-media.js +216 -205
  47. package/dist/src/lib/parser/utils/at-rule-support.js +83 -88
  48. package/dist/src/lib/parser/utils/at-rule-when-else.js +47 -47
  49. package/dist/src/lib/parser/utils/at-rule.js +5 -5
  50. package/dist/src/lib/parser/utils/base64.js +2 -2
  51. package/dist/src/lib/parser/utils/cache.js +1 -1
  52. package/dist/src/lib/parser/utils/config.js +1 -1
  53. package/dist/src/lib/parser/utils/declaration.js +233 -234
  54. package/dist/src/lib/parser/utils/eq.js +50 -3
  55. package/dist/src/lib/parser/utils/hash.js +2 -35
  56. package/dist/src/lib/parser/utils/selector.js +309 -387
  57. package/dist/src/lib/parser/utils/text.js +18 -4
  58. package/dist/src/lib/parser/utils/token.js +16 -69
  59. package/dist/src/lib/parser/utils/type.js +37 -24
  60. package/dist/src/lib/printer/render.js +965 -511
  61. package/dist/src/lib/printer/sourcemap/lib/codec.js +1 -1
  62. package/dist/src/lib/printer/sourcemap/sourcemap.js +1 -1
  63. package/dist/src/lib/syntax/color/a98rgb.js +1 -1
  64. package/dist/src/lib/syntax/color/alpha.js +36 -37
  65. package/dist/src/lib/syntax/color/cmyk.js +35 -52
  66. package/dist/src/lib/syntax/color/color-mix.js +96 -132
  67. package/dist/src/lib/syntax/color/color.js +222 -231
  68. package/dist/src/lib/syntax/color/hex.js +45 -55
  69. package/dist/src/lib/syntax/color/hsl.js +54 -62
  70. package/dist/src/lib/syntax/color/hwb.js +60 -68
  71. package/dist/src/lib/syntax/color/lab.js +59 -67
  72. package/dist/src/lib/syntax/color/lch.js +59 -67
  73. package/dist/src/lib/syntax/color/oklab.js +60 -68
  74. package/dist/src/lib/syntax/color/oklch.js +60 -67
  75. package/dist/src/lib/syntax/color/p3.js +1 -1
  76. package/dist/src/lib/syntax/color/prophotorgb.js +1 -1
  77. package/dist/src/lib/syntax/color/rec2020.js +1 -1
  78. package/dist/src/lib/syntax/color/relative-color.js +94 -144
  79. package/dist/src/lib/syntax/color/rgb.js +54 -57
  80. package/dist/src/lib/syntax/color/srgb.js +55 -53
  81. package/dist/src/lib/syntax/color/utils/color-type.js +13 -10
  82. package/dist/src/lib/syntax/color/utils/colorspace.js +11 -11
  83. package/dist/src/lib/syntax/color/utils/components.js +19 -20
  84. package/dist/src/lib/syntax/color/utils/distance.js +15 -13
  85. package/dist/src/lib/syntax/color/utils/make-color.js +15 -19
  86. package/dist/src/lib/syntax/color/utils/matrix.js +2 -2
  87. package/dist/src/lib/syntax/color/xyz.js +1 -1
  88. package/dist/src/lib/syntax/color/xyzd50.js +1 -1
  89. package/dist/src/lib/syntax/constants.js +2 -16
  90. package/dist/src/lib/syntax/syntax.js +301 -407
  91. package/dist/src/lib/validation/config.js +1 -1
  92. package/dist/src/lib/validation/match.js +959 -723
  93. package/dist/src/lib/validation/parser/parse.js +230 -112
  94. package/dist/src/lib/validation/parser/typedef.js +1 -1
  95. package/dist/src/lib/validation/utils/list.js +27 -12
  96. package/dist/src/node.js +12 -72
  97. package/dist/src/types.js +1 -1
  98. package/dist/src/utils/sync.js +9 -6
  99. package/dist/src/web.js +11 -73
  100. package/package.json +9 -10
  101. package/dist/index.cjs +0 -35874
  102. package/dist/src/lib/ast/clone.js +0 -51
  103. package/dist/src/lib/ast/expand.js +0 -311
  104. package/dist/src/lib/ast/find.js +0 -192
  105. package/dist/src/lib/ast/node.js +0 -59
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 1.8.1
5
+ Version: 2.0.0
6
6
  License: MIT
7
7
  */
8
8
  /**
@@ -62,748 +62,713 @@ var EnumAstNodeStatus;
62
62
  * Color component without unit
63
63
  */
64
64
  EnumAstNodeStatus[EnumAstNodeStatus["PowerlessColorComponent"] = 512] = "PowerlessColorComponent";
65
- })(EnumAstNodeStatus || (EnumAstNodeStatus = {}));
66
- /**
67
- * Enum of validation levels
68
- * @deprecated
69
- */
70
- var ValidationLevel;
71
- (function (ValidationLevel) {
65
+ /* node flags stored in the arena `flags` column next to the validation state */
72
66
  /**
73
- * disable validation
67
+ * mask of the validation state bits
74
68
  */
75
- ValidationLevel[ValidationLevel["None"] = 0] = "None";
69
+ EnumAstNodeStatus[EnumAstNodeStatus["StateMask"] = 65535] = "StateMask";
76
70
  /**
77
- * validate selectors
71
+ * the node has a children list (stylesheet, rule, at-rule with a block)
78
72
  */
79
- ValidationLevel[ValidationLevel["Selector"] = 1] = "Selector";
73
+ EnumAstNodeStatus[EnumAstNodeStatus["HasChildren"] = 65536] = "HasChildren";
80
74
  /**
81
- * validate at-rules
75
+ * the node has value tokens (declaration)
82
76
  */
83
- ValidationLevel[ValidationLevel["AtRule"] = 2] = "AtRule";
77
+ EnumAstNodeStatus[EnumAstNodeStatus["HasValues"] = 131072] = "HasValues";
84
78
  /**
85
- * validate declarations
79
+ * the node has a source location
86
80
  */
87
- ValidationLevel[ValidationLevel["Declaration"] = 4] = "Declaration";
81
+ EnumAstNodeStatus[EnumAstNodeStatus["HasLocation"] = 262144] = "HasLocation";
88
82
  /**
89
- * validate selectors and at-rules
83
+ * the node is marked to be released or trimmed. see `arena.mark()`, `arena.release()` and `arena.trim()`
90
84
  */
91
- ValidationLevel[ValidationLevel["Default"] = 3] = "Default";
85
+ EnumAstNodeStatus[EnumAstNodeStatus["Marked"] = 524288] = "Marked";
92
86
  /**
93
- * validate selectors, at-rules and declarations
87
+ * transient flag used while comparing the declarations of two rules
88
+ * @private
94
89
  */
95
- ValidationLevel[ValidationLevel["All"] = 7] = "All";
96
- /**
97
- * Report only. Apply validation and report nodes that are marked as invalid
98
- */
99
- ValidationLevel[ValidationLevel["ReportOnly"] = 8] = "ReportOnly";
100
- })(ValidationLevel || (ValidationLevel = {}));
90
+ EnumAstNodeStatus[EnumAstNodeStatus["Matched"] = 1048576] = "Matched";
91
+ })(EnumAstNodeStatus || (EnumAstNodeStatus = {}));
101
92
  /**
102
93
  * Enum of all token types
103
94
  */
104
95
  var EnumToken;
105
96
  (function (EnumToken) {
106
97
  /**
107
- * comment token
98
+ * comment token. the value 0 is reserved: it is the type of the null node (id 0) and of unset nodes,
99
+ * so that reading the type of a missing node never matches a real token type
108
100
  */
109
- EnumToken[EnumToken["CommentTokenType"] = 0] = "CommentTokenType";
101
+ EnumToken[EnumToken["CommentTokenType"] = 1] = "CommentTokenType";
110
102
  /**
111
103
  * cdata section token
112
104
  */
113
- EnumToken[EnumToken["CDOCOMMTokenType"] = 1] = "CDOCOMMTokenType";
105
+ EnumToken[EnumToken["CDOCOMMTokenType"] = 2] = "CDOCOMMTokenType";
114
106
  /**
115
107
  * style sheet node type
116
108
  */
117
- EnumToken[EnumToken["StyleSheetNodeType"] = 2] = "StyleSheetNodeType";
109
+ EnumToken[EnumToken["StyleSheetNodeType"] = 3] = "StyleSheetNodeType";
118
110
  /**
119
111
  * at-rule node type
120
112
  */
121
- EnumToken[EnumToken["AtRuleNodeType"] = 3] = "AtRuleNodeType";
113
+ EnumToken[EnumToken["AtRuleNodeType"] = 4] = "AtRuleNodeType";
122
114
  /**
123
115
  * rule node type
124
116
  */
125
- EnumToken[EnumToken["RuleNodeType"] = 4] = "RuleNodeType";
117
+ EnumToken[EnumToken["RuleNodeType"] = 5] = "RuleNodeType";
126
118
  /**
127
119
  * declaration node type
128
120
  */
129
- EnumToken[EnumToken["DeclarationNodeType"] = 5] = "DeclarationNodeType";
121
+ EnumToken[EnumToken["DeclarationNodeType"] = 6] = "DeclarationNodeType";
130
122
  /**
131
123
  * literal token type
132
124
  */
133
- EnumToken[EnumToken["LiteralTokenType"] = 6] = "LiteralTokenType";
125
+ EnumToken[EnumToken["LiteralTokenType"] = 7] = "LiteralTokenType";
134
126
  /**
135
127
  * identifier token type
136
128
  */
137
- EnumToken[EnumToken["IdenTokenType"] = 7] = "IdenTokenType";
129
+ EnumToken[EnumToken["IdenTokenType"] = 8] = "IdenTokenType";
138
130
  /**
139
131
  * dashed identifier token type
140
132
  */
141
- EnumToken[EnumToken["DashedIdenTokenType"] = 8] = "DashedIdenTokenType";
133
+ EnumToken[EnumToken["DashedIdenTokenType"] = 9] = "DashedIdenTokenType";
142
134
  /**
143
135
  * comma token type
144
136
  */
145
- EnumToken[EnumToken["CommaTokenType"] = 9] = "CommaTokenType";
137
+ EnumToken[EnumToken["CommaTokenType"] = 10] = "CommaTokenType";
146
138
  /**
147
139
  * colon token type
148
140
  */
149
- EnumToken[EnumToken["ColonTokenType"] = 10] = "ColonTokenType";
141
+ EnumToken[EnumToken["ColonTokenType"] = 11] = "ColonTokenType";
150
142
  /**
151
143
  * semicolon token type
152
144
  */
153
- EnumToken[EnumToken["SemiColonTokenType"] = 11] = "SemiColonTokenType";
145
+ EnumToken[EnumToken["SemiColonTokenType"] = 12] = "SemiColonTokenType";
154
146
  /**
155
147
  * number token type
156
148
  */
157
- EnumToken[EnumToken["NumberTokenType"] = 12] = "NumberTokenType";
149
+ EnumToken[EnumToken["NumberTokenType"] = 13] = "NumberTokenType";
158
150
  /**
159
151
  * at-rule token type
160
152
  */
161
- EnumToken[EnumToken["AtRuleTokenType"] = 13] = "AtRuleTokenType";
153
+ EnumToken[EnumToken["AtRuleTokenType"] = 14] = "AtRuleTokenType";
162
154
  /**
163
155
  * percentage token type
164
156
  */
165
- EnumToken[EnumToken["PercentageTokenType"] = 14] = "PercentageTokenType";
157
+ EnumToken[EnumToken["PercentageTokenType"] = 15] = "PercentageTokenType";
166
158
  /**
167
159
  * function token type
168
160
  */
169
- EnumToken[EnumToken["FunctionTokenType"] = 15] = "FunctionTokenType";
161
+ EnumToken[EnumToken["FunctionTokenType"] = 16] = "FunctionTokenType";
170
162
  /**
171
163
  * timeline function token type
172
164
  */
173
- EnumToken[EnumToken["TimelineFunctionTokenType"] = 16] = "TimelineFunctionTokenType";
165
+ EnumToken[EnumToken["TimelineFunctionTokenType"] = 17] = "TimelineFunctionTokenType";
174
166
  /**
175
167
  * timing function token type
176
168
  */
177
- EnumToken[EnumToken["TimingFunctionTokenType"] = 17] = "TimingFunctionTokenType";
169
+ EnumToken[EnumToken["TimingFunctionTokenType"] = 18] = "TimingFunctionTokenType";
178
170
  /**
179
171
  * url function token type
180
172
  */
181
- EnumToken[EnumToken["UrlFunctionTokenType"] = 18] = "UrlFunctionTokenType";
173
+ EnumToken[EnumToken["UrlFunctionTokenType"] = 19] = "UrlFunctionTokenType";
182
174
  /**
183
175
  * image function token type
184
176
  */
185
- EnumToken[EnumToken["ImageFunctionTokenType"] = 19] = "ImageFunctionTokenType";
177
+ EnumToken[EnumToken["ImageFunctionTokenType"] = 20] = "ImageFunctionTokenType";
186
178
  /**
187
179
  * string token type
188
180
  */
189
- EnumToken[EnumToken["StringTokenType"] = 20] = "StringTokenType";
181
+ EnumToken[EnumToken["StringTokenType"] = 21] = "StringTokenType";
190
182
  /**
191
183
  * unclosed string token type
192
184
  */
193
- EnumToken[EnumToken["UnclosedStringTokenType"] = 21] = "UnclosedStringTokenType";
185
+ EnumToken[EnumToken["UnclosedStringTokenType"] = 22] = "UnclosedStringTokenType";
194
186
  /**
195
187
  * dimension token type
196
188
  */
197
- EnumToken[EnumToken["DimensionTokenType"] = 22] = "DimensionTokenType";
189
+ EnumToken[EnumToken["DimensionTokenType"] = 23] = "DimensionTokenType";
198
190
  /**
199
191
  * length token type
200
192
  */
201
- EnumToken[EnumToken["LengthTokenType"] = 23] = "LengthTokenType";
193
+ EnumToken[EnumToken["LengthTokenType"] = 24] = "LengthTokenType";
202
194
  /**
203
195
  * angle token type
204
196
  */
205
- EnumToken[EnumToken["AngleTokenType"] = 24] = "AngleTokenType";
197
+ EnumToken[EnumToken["AngleTokenType"] = 25] = "AngleTokenType";
206
198
  /**
207
199
  * time token type
208
200
  */
209
- EnumToken[EnumToken["TimeTokenType"] = 25] = "TimeTokenType";
201
+ EnumToken[EnumToken["TimeTokenType"] = 26] = "TimeTokenType";
210
202
  /**
211
203
  * frequency token type
212
204
  */
213
- EnumToken[EnumToken["FrequencyTokenType"] = 26] = "FrequencyTokenType";
205
+ EnumToken[EnumToken["FrequencyTokenType"] = 27] = "FrequencyTokenType";
214
206
  /**
215
207
  * resolution token type
216
208
  */
217
- EnumToken[EnumToken["ResolutionTokenType"] = 27] = "ResolutionTokenType";
209
+ EnumToken[EnumToken["ResolutionTokenType"] = 28] = "ResolutionTokenType";
218
210
  /**
219
211
  * hash token type
220
212
  */
221
- EnumToken[EnumToken["HashTokenType"] = 28] = "HashTokenType";
213
+ EnumToken[EnumToken["HashTokenType"] = 29] = "HashTokenType";
222
214
  /**
223
215
  * block start token type
224
216
  */
225
- EnumToken[EnumToken["BlockStartTokenType"] = 29] = "BlockStartTokenType";
217
+ EnumToken[EnumToken["BlockStartTokenType"] = 30] = "BlockStartTokenType";
226
218
  /**
227
219
  * block end token type
228
220
  */
229
- EnumToken[EnumToken["BlockEndTokenType"] = 30] = "BlockEndTokenType";
221
+ EnumToken[EnumToken["BlockEndTokenType"] = 31] = "BlockEndTokenType";
230
222
  /**
231
223
  * attribute start token type
232
224
  */
233
- EnumToken[EnumToken["AttrStartTokenType"] = 31] = "AttrStartTokenType";
225
+ EnumToken[EnumToken["AttrStartTokenType"] = 32] = "AttrStartTokenType";
234
226
  /**
235
227
  * attribute end token type
236
228
  */
237
- EnumToken[EnumToken["AttrEndTokenType"] = 32] = "AttrEndTokenType";
229
+ EnumToken[EnumToken["AttrEndTokenType"] = 33] = "AttrEndTokenType";
238
230
  /**
239
231
  * start parentheses token type
240
232
  */
241
- EnumToken[EnumToken["StartParensTokenType"] = 33] = "StartParensTokenType";
233
+ EnumToken[EnumToken["StartParensTokenType"] = 34] = "StartParensTokenType";
242
234
  /**
243
235
  * end parentheses token type
244
236
  */
245
- EnumToken[EnumToken["EndParensTokenType"] = 34] = "EndParensTokenType";
237
+ EnumToken[EnumToken["EndParensTokenType"] = 35] = "EndParensTokenType";
246
238
  /**
247
239
  * parentheses token type
248
240
  */
249
- EnumToken[EnumToken["ParensTokenType"] = 35] = "ParensTokenType";
241
+ EnumToken[EnumToken["ParensTokenType"] = 36] = "ParensTokenType";
250
242
  /**
251
243
  * whitespace token type
252
244
  */
253
- EnumToken[EnumToken["WhitespaceTokenType"] = 36] = "WhitespaceTokenType";
245
+ EnumToken[EnumToken["WhitespaceTokenType"] = 37] = "WhitespaceTokenType";
254
246
  /**
255
247
  * include match token type
256
248
  */
257
- EnumToken[EnumToken["IncludeMatchTokenType"] = 37] = "IncludeMatchTokenType";
249
+ EnumToken[EnumToken["IncludeMatchTokenType"] = 38] = "IncludeMatchTokenType";
258
250
  /**
259
251
  * dash match token type
260
252
  */
261
- EnumToken[EnumToken["DashMatchTokenType"] = 38] = "DashMatchTokenType";
253
+ EnumToken[EnumToken["DashMatchTokenType"] = 39] = "DashMatchTokenType";
262
254
  /**
263
255
  * equal match token type
264
256
  */
265
- EnumToken[EnumToken["EqualMatchTokenType"] = 39] = "EqualMatchTokenType";
257
+ EnumToken[EnumToken["EqualMatchTokenType"] = 40] = "EqualMatchTokenType";
266
258
  /**
267
259
  * less than token type
268
260
  */
269
- EnumToken[EnumToken["LtTokenType"] = 40] = "LtTokenType";
261
+ EnumToken[EnumToken["LtTokenType"] = 41] = "LtTokenType";
270
262
  /**
271
263
  * less than or equal to token type
272
264
  */
273
- EnumToken[EnumToken["LteTokenType"] = 41] = "LteTokenType";
265
+ EnumToken[EnumToken["LteTokenType"] = 42] = "LteTokenType";
274
266
  /**
275
267
  * greater than token type
276
268
  */
277
- EnumToken[EnumToken["GtTokenType"] = 42] = "GtTokenType";
269
+ EnumToken[EnumToken["GtTokenType"] = 43] = "GtTokenType";
278
270
  /**
279
271
  * greater than or equal to token type
280
272
  */
281
- EnumToken[EnumToken["GteTokenType"] = 43] = "GteTokenType";
273
+ EnumToken[EnumToken["GteTokenType"] = 44] = "GteTokenType";
282
274
  /**
283
275
  * pseudo-class token type
284
276
  */
285
- EnumToken[EnumToken["PseudoClassTokenType"] = 44] = "PseudoClassTokenType";
277
+ EnumToken[EnumToken["PseudoClassTokenType"] = 45] = "PseudoClassTokenType";
286
278
  /**
287
279
  * pseudo-class function token type
288
280
  */
289
- EnumToken[EnumToken["PseudoClassFuncTokenType"] = 45] = "PseudoClassFuncTokenType";
281
+ EnumToken[EnumToken["PseudoClassFuncTokenType"] = 46] = "PseudoClassFuncTokenType";
290
282
  /**
291
283
  * delimiter token type
292
284
  */
293
- EnumToken[EnumToken["DelimTokenType"] = 46] = "DelimTokenType";
285
+ EnumToken[EnumToken["DelimTokenType"] = 47] = "DelimTokenType";
294
286
  /**
295
287
  * URL token type
296
288
  */
297
- EnumToken[EnumToken["UrlTokenTokenType"] = 47] = "UrlTokenTokenType";
289
+ EnumToken[EnumToken["UrlTokenTokenType"] = 48] = "UrlTokenTokenType";
298
290
  /**
299
291
  * end of file token type
300
292
  */
301
- EnumToken[EnumToken["EOFTokenType"] = 48] = "EOFTokenType";
293
+ EnumToken[EnumToken["EOFTokenType"] = 49] = "EOFTokenType";
302
294
  /**
303
295
  * important token type
304
296
  */
305
- EnumToken[EnumToken["ImportantTokenType"] = 49] = "ImportantTokenType";
297
+ EnumToken[EnumToken["ImportantTokenType"] = 50] = "ImportantTokenType";
306
298
  /**
307
299
  * color token type
308
300
  */
309
- EnumToken[EnumToken["ColorTokenType"] = 50] = "ColorTokenType";
301
+ EnumToken[EnumToken["ColorTokenType"] = 51] = "ColorTokenType";
310
302
  /**
311
303
  * attribute token type
312
304
  */
313
- EnumToken[EnumToken["AttrTokenType"] = 51] = "AttrTokenType";
305
+ EnumToken[EnumToken["AttrTokenType"] = 52] = "AttrTokenType";
314
306
  /**
315
307
  * bad comment token type
316
308
  */
317
- EnumToken[EnumToken["BadCommentTokenType"] = 52] = "BadCommentTokenType";
309
+ EnumToken[EnumToken["BadCommentTokenType"] = 53] = "BadCommentTokenType";
318
310
  /**
319
311
  * bad cdo token type
320
312
  */
321
- EnumToken[EnumToken["BadCdoTokenType"] = 53] = "BadCdoTokenType";
313
+ EnumToken[EnumToken["BadCdoTokenType"] = 54] = "BadCdoTokenType";
322
314
  /**
323
315
  * bad URL token type
324
316
  */
325
- EnumToken[EnumToken["BadUrlTokenType"] = 54] = "BadUrlTokenType";
317
+ EnumToken[EnumToken["BadUrlTokenType"] = 55] = "BadUrlTokenType";
326
318
  /**
327
319
  * bad string token type
328
320
  */
329
- EnumToken[EnumToken["BadStringTokenType"] = 55] = "BadStringTokenType";
321
+ EnumToken[EnumToken["BadStringTokenType"] = 56] = "BadStringTokenType";
330
322
  /**
331
323
  * binary expression token type
332
324
  */
333
- EnumToken[EnumToken["BinaryExpressionTokenType"] = 56] = "BinaryExpressionTokenType";
325
+ EnumToken[EnumToken["BinaryExpressionTokenType"] = 57] = "BinaryExpressionTokenType";
334
326
  /**
335
327
  * unary expression token type
336
328
  */
337
- EnumToken[EnumToken["UnaryExpressionTokenType"] = 57] = "UnaryExpressionTokenType";
329
+ EnumToken[EnumToken["UnaryExpressionTokenType"] = 58] = "UnaryExpressionTokenType";
338
330
  /**
339
331
  * flex token type
340
332
  */
341
- EnumToken[EnumToken["FlexTokenType"] = 58] = "FlexTokenType";
333
+ EnumToken[EnumToken["FlexTokenType"] = 59] = "FlexTokenType";
342
334
  /**
343
335
  * token list token type
344
336
  */
345
- EnumToken[EnumToken["ListToken"] = 59] = "ListToken";
337
+ EnumToken[EnumToken["ListToken"] = 60] = "ListToken";
346
338
  /* arithmetic tokens */
347
339
  /**
348
340
  * addition token type
349
341
  */
350
- EnumToken[EnumToken["Add"] = 60] = "Add";
342
+ EnumToken[EnumToken["Add"] = 61] = "Add";
351
343
  /**
352
344
  * multiplication token type
353
345
  */
354
- EnumToken[EnumToken["Mul"] = 61] = "Mul";
346
+ EnumToken[EnumToken["Mul"] = 62] = "Mul";
355
347
  /**
356
348
  * division token type
357
349
  */
358
- EnumToken[EnumToken["Div"] = 62] = "Div";
350
+ EnumToken[EnumToken["Div"] = 63] = "Div";
359
351
  /**
360
352
  * subtraction token type
361
353
  */
362
- EnumToken[EnumToken["Sub"] = 63] = "Sub";
354
+ EnumToken[EnumToken["Sub"] = 64] = "Sub";
363
355
  /* new tokens */
364
356
  /**
365
357
  * column combinator token type
366
358
  */
367
- EnumToken[EnumToken["ColumnCombinatorTokenType"] = 64] = "ColumnCombinatorTokenType";
359
+ EnumToken[EnumToken["ColumnCombinatorTokenType"] = 65] = "ColumnCombinatorTokenType";
368
360
  /**
369
361
  * contain match token type
370
362
  */
371
- EnumToken[EnumToken["ContainMatchTokenType"] = 65] = "ContainMatchTokenType";
363
+ EnumToken[EnumToken["ContainMatchTokenType"] = 66] = "ContainMatchTokenType";
372
364
  /**
373
365
  * start match token type
374
366
  */
375
- EnumToken[EnumToken["StartMatchTokenType"] = 66] = "StartMatchTokenType";
367
+ EnumToken[EnumToken["StartMatchTokenType"] = 67] = "StartMatchTokenType";
376
368
  /**
377
369
  * end match token type
378
370
  */
379
- EnumToken[EnumToken["EndMatchTokenType"] = 67] = "EndMatchTokenType";
371
+ EnumToken[EnumToken["EndMatchTokenType"] = 68] = "EndMatchTokenType";
380
372
  /**
381
373
  * match expression token type
382
374
  */
383
- EnumToken[EnumToken["MatchExpressionTokenType"] = 68] = "MatchExpressionTokenType";
375
+ EnumToken[EnumToken["MatchExpressionTokenType"] = 69] = "MatchExpressionTokenType";
384
376
  /**
385
377
  * namespace attribute token type
386
378
  */
387
- EnumToken[EnumToken["NameSpaceAttributeTokenType"] = 69] = "NameSpaceAttributeTokenType";
379
+ EnumToken[EnumToken["NameSpaceAttributeTokenType"] = 70] = "NameSpaceAttributeTokenType";
388
380
  /**
389
381
  * fraction token type
390
382
  */
391
- EnumToken[EnumToken["FractionTokenType"] = 70] = "FractionTokenType";
383
+ EnumToken[EnumToken["FractionTokenType"] = 71] = "FractionTokenType";
392
384
  /**
393
385
  * identifier list token type
394
386
  */
395
- EnumToken[EnumToken["IdenListTokenType"] = 71] = "IdenListTokenType";
387
+ EnumToken[EnumToken["IdenListTokenType"] = 72] = "IdenListTokenType";
396
388
  /**
397
389
  * grid template function token type
398
390
  */
399
- EnumToken[EnumToken["GridTemplateFuncTokenType"] = 72] = "GridTemplateFuncTokenType";
391
+ EnumToken[EnumToken["GridTemplateFuncTokenType"] = 73] = "GridTemplateFuncTokenType";
400
392
  /**
401
393
  * keyframe rule node type
402
394
  */
403
- EnumToken[EnumToken["KeyframesRuleNodeType"] = 73] = "KeyframesRuleNodeType";
395
+ EnumToken[EnumToken["KeyframesRuleNodeType"] = 74] = "KeyframesRuleNodeType";
404
396
  /**
405
397
  * class selector token type
406
398
  */
407
- EnumToken[EnumToken["ClassSelectorTokenType"] = 74] = "ClassSelectorTokenType";
399
+ EnumToken[EnumToken["ClassSelectorTokenType"] = 75] = "ClassSelectorTokenType";
408
400
  /**
409
401
  * universal selector token type
410
402
  */
411
- EnumToken[EnumToken["UniversalSelectorTokenType"] = 75] = "UniversalSelectorTokenType";
403
+ EnumToken[EnumToken["UniversalSelectorTokenType"] = 76] = "UniversalSelectorTokenType";
412
404
  /**
413
405
  * child combinator token type
414
406
  */
415
- EnumToken[EnumToken["ChildCombinatorTokenType"] = 76] = "ChildCombinatorTokenType";
407
+ EnumToken[EnumToken["ChildCombinatorTokenType"] = 77] = "ChildCombinatorTokenType";
416
408
  /**
417
409
  * descendant combinator token type
418
410
  */
419
- EnumToken[EnumToken["DescendantCombinatorTokenType"] = 77] = "DescendantCombinatorTokenType";
411
+ EnumToken[EnumToken["DescendantCombinatorTokenType"] = 78] = "DescendantCombinatorTokenType";
420
412
  /**
421
413
  * next sibling combinator token type
422
414
  */
423
- EnumToken[EnumToken["NextSiblingCombinatorTokenType"] = 78] = "NextSiblingCombinatorTokenType";
415
+ EnumToken[EnumToken["NextSiblingCombinatorTokenType"] = 79] = "NextSiblingCombinatorTokenType";
424
416
  /**
425
417
  * subsequent sibling combinator token type
426
418
  */
427
- EnumToken[EnumToken["SubsequentSiblingCombinatorTokenType"] = 79] = "SubsequentSiblingCombinatorTokenType";
419
+ EnumToken[EnumToken["SubsequentSiblingCombinatorTokenType"] = 80] = "SubsequentSiblingCombinatorTokenType";
428
420
  /**
429
421
  * nesting selector token type
430
422
  */
431
- EnumToken[EnumToken["NestingSelectorTokenType"] = 80] = "NestingSelectorTokenType";
432
- /**
433
- * Invalid rule token type
434
- * @deprecated
435
- */
436
- EnumToken[EnumToken["InvalidRuleNodeType"] = 81] = "InvalidRuleNodeType";
437
- /**
438
- * invalid class selector token type
439
- */
440
- EnumToken[EnumToken["InvalidClassSelectorTokenType"] = 82] = "InvalidClassSelectorTokenType";
441
- /**
442
- * invalid attribute token type
443
- */
444
- EnumToken[EnumToken["InvalidAttrTokenType"] = 83] = "InvalidAttrTokenType";
445
- /**
446
- * Invalid at rule token type
447
- * @deprecated
448
- */
449
- EnumToken[EnumToken["InvalidAtRuleNodeType"] = 84] = "InvalidAtRuleNodeType";
423
+ EnumToken[EnumToken["NestingSelectorTokenType"] = 81] = "NestingSelectorTokenType";
450
424
  /**
451
425
  * media query condition token type
452
426
  */
453
- EnumToken[EnumToken["MediaQueryConditionTokenType"] = 85] = "MediaQueryConditionTokenType";
427
+ EnumToken[EnumToken["MediaQueryConditionTokenType"] = 82] = "MediaQueryConditionTokenType";
454
428
  /**
455
429
  * media feature token type
456
430
  */
457
- EnumToken[EnumToken["MediaFeatureTokenType"] = 86] = "MediaFeatureTokenType";
431
+ EnumToken[EnumToken["MediaFeatureTokenType"] = 83] = "MediaFeatureTokenType";
458
432
  /**
459
433
  * media feature only token type
460
434
  */
461
- EnumToken[EnumToken["OnlyTokenType"] = 87] = "OnlyTokenType";
435
+ EnumToken[EnumToken["OnlyTokenType"] = 84] = "OnlyTokenType";
462
436
  /**
463
437
  * media feature not token type
464
438
  */
465
- EnumToken[EnumToken["NotTokenType"] = 88] = "NotTokenType";
439
+ EnumToken[EnumToken["NotTokenType"] = 85] = "NotTokenType";
466
440
  /**
467
441
  * media feature and token type
468
442
  */
469
- EnumToken[EnumToken["AndTokenType"] = 89] = "AndTokenType";
443
+ EnumToken[EnumToken["AndTokenType"] = 86] = "AndTokenType";
470
444
  /**
471
445
  * media feature or token type
472
446
  */
473
- EnumToken[EnumToken["OrTokenType"] = 90] = "OrTokenType";
447
+ EnumToken[EnumToken["OrTokenType"] = 87] = "OrTokenType";
474
448
  /**
475
449
  * pseudo page token type
476
450
  */
477
- EnumToken[EnumToken["PseudoPageTokenType"] = 91] = "PseudoPageTokenType";
451
+ EnumToken[EnumToken["PseudoPageTokenType"] = 88] = "PseudoPageTokenType";
478
452
  /**
479
453
  * pseudo element token type
480
454
  */
481
- EnumToken[EnumToken["PseudoElementTokenType"] = 92] = "PseudoElementTokenType";
455
+ EnumToken[EnumToken["PseudoElementTokenType"] = 89] = "PseudoElementTokenType";
482
456
  /**
483
457
  * keyframe at rule node type
484
458
  */
485
- EnumToken[EnumToken["KeyframesAtRuleNodeType"] = 93] = "KeyframesAtRuleNodeType";
486
- /**
487
- * invalid declaration node type.
488
- * @deprecated
489
- */
490
- EnumToken[EnumToken["InvalidDeclarationNodeType"] = 94] = "InvalidDeclarationNodeType";
459
+ EnumToken[EnumToken["KeyframesAtRuleNodeType"] = 90] = "KeyframesAtRuleNodeType";
491
460
  /* css module nodes */
492
461
  /**
493
462
  * composes token node type
494
463
  */
495
- EnumToken[EnumToken["ComposesSelectorNodeType"] = 95] = "ComposesSelectorNodeType";
464
+ EnumToken[EnumToken["ComposesSelectorNodeType"] = 91] = "ComposesSelectorNodeType";
496
465
  /**
497
466
  * css variable token type
498
467
  */
499
- EnumToken[EnumToken["CssVariableTokenType"] = 96] = "CssVariableTokenType";
468
+ EnumToken[EnumToken["CssVariableTokenType"] = 92] = "CssVariableTokenType";
500
469
  /**
501
470
  * css variable import token type
502
471
  */
503
- EnumToken[EnumToken["CssVariableImportTokenType"] = 97] = "CssVariableImportTokenType";
472
+ EnumToken[EnumToken["CssVariableImportTokenType"] = 93] = "CssVariableImportTokenType";
504
473
  /**
505
474
  * css variable declaration map token type
506
475
  */
507
- EnumToken[EnumToken["CssVariableDeclarationMapTokenType"] = 98] = "CssVariableDeclarationMapTokenType";
476
+ EnumToken[EnumToken["CssVariableDeclarationMapTokenType"] = 94] = "CssVariableDeclarationMapTokenType";
508
477
  /**
509
478
  * media range query token type
510
479
  */
511
- EnumToken[EnumToken["MediaRangeQueryTokenType"] = 99] = "MediaRangeQueryTokenType";
512
- /**
513
- * invalid media query token type
514
- */
515
- EnumToken[EnumToken["InvalidMediaQueryTokenType"] = 100] = "InvalidMediaQueryTokenType";
480
+ EnumToken[EnumToken["MediaRangeQueryTokenType"] = 95] = "MediaRangeQueryTokenType";
516
481
  /**
517
482
  * supports query condition token type
518
483
  */
519
- EnumToken[EnumToken["SupportsQueryConditionTokenType"] = 101] = "SupportsQueryConditionTokenType";
484
+ EnumToken[EnumToken["SupportsQueryConditionTokenType"] = 96] = "SupportsQueryConditionTokenType";
520
485
  /**
521
486
  * supports query unary condition token type
522
487
  */
523
- EnumToken[EnumToken["SupportsQueryUnaryConditionTokenType"] = 102] = "SupportsQueryUnaryConditionTokenType";
488
+ EnumToken[EnumToken["SupportsQueryUnaryConditionTokenType"] = 97] = "SupportsQueryUnaryConditionTokenType";
524
489
  /**
525
490
  * when else query condition token type
526
491
  */
527
- EnumToken[EnumToken["WhenElseQueryConditionTokenType"] = 103] = "WhenElseQueryConditionTokenType";
492
+ EnumToken[EnumToken["WhenElseQueryConditionTokenType"] = 98] = "WhenElseQueryConditionTokenType";
528
493
  /**
529
494
  * when else query unary condition token type
530
495
  */
531
- EnumToken[EnumToken["WhenElseUnaryConditionTokenType"] = 104] = "WhenElseUnaryConditionTokenType";
496
+ EnumToken[EnumToken["WhenElseUnaryConditionTokenType"] = 99] = "WhenElseUnaryConditionTokenType";
532
497
  /**
533
498
  * container style range token type
534
499
  */
535
- EnumToken[EnumToken["ContainerStyleRangeTokenType"] = 105] = "ContainerStyleRangeTokenType";
500
+ EnumToken[EnumToken["ContainerStyleRangeTokenType"] = 100] = "ContainerStyleRangeTokenType";
536
501
  /**
537
502
  * '*'
538
503
  */
539
- EnumToken[EnumToken["Star"] = 106] = "Star";
504
+ EnumToken[EnumToken["Star"] = 101] = "Star";
540
505
  /**
541
506
  * '+'
542
507
  */
543
- EnumToken[EnumToken["Plus"] = 107] = "Plus";
508
+ EnumToken[EnumToken["Plus"] = 102] = "Plus";
544
509
  /**
545
510
  * '~'
546
511
  */
547
- EnumToken[EnumToken["Tilda"] = 108] = "Tilda";
512
+ EnumToken[EnumToken["Tilda"] = 103] = "Tilda";
548
513
  /**
549
514
  * '|'
550
515
  */
551
- EnumToken[EnumToken["PipeTokenType"] = 109] = "PipeTokenType";
516
+ EnumToken[EnumToken["PipeTokenType"] = 104] = "PipeTokenType";
552
517
  /**
553
518
  * '::'
554
519
  */
555
- EnumToken[EnumToken["DoubleColonTokenType"] = 110] = "DoubleColonTokenType";
520
+ EnumToken[EnumToken["DoubleColonTokenType"] = 105] = "DoubleColonTokenType";
556
521
  /**
557
522
  * math function token type such as'calc(' etc.
558
523
  */
559
- EnumToken[EnumToken["MathFunctionTokenType"] = 111] = "MathFunctionTokenType";
524
+ EnumToken[EnumToken["MathFunctionTokenType"] = 106] = "MathFunctionTokenType";
560
525
  /**
561
526
  * transform function token type such as 'translate(' etc.
562
527
  */
563
- EnumToken[EnumToken["TransformFunctionTokenType"] = 112] = "TransformFunctionTokenType";
528
+ EnumToken[EnumToken["TransformFunctionTokenType"] = 107] = "TransformFunctionTokenType";
564
529
  /**
565
530
  * when function token type such as 'supports(' etc.
566
531
  */
567
- EnumToken[EnumToken["WhenElseFunctionTokenType"] = 113] = "WhenElseFunctionTokenType";
532
+ EnumToken[EnumToken["WhenElseFunctionTokenType"] = 108] = "WhenElseFunctionTokenType";
568
533
  /**
569
534
  * general enclosed function token type 'font-tech(' etc.
570
535
  */
571
- EnumToken[EnumToken["GeneralEnclosedFunctionTokenType"] = 114] = "GeneralEnclosedFunctionTokenType";
536
+ EnumToken[EnumToken["GeneralEnclosedFunctionTokenType"] = 109] = "GeneralEnclosedFunctionTokenType";
572
537
  /**
573
538
  * supports function token type such as 'at-rule('
574
539
  */
575
- EnumToken[EnumToken["SupportsFunctionTokenType"] = 115] = "SupportsFunctionTokenType";
540
+ EnumToken[EnumToken["SupportsFunctionTokenType"] = 110] = "SupportsFunctionTokenType";
576
541
  /**
577
542
  * container function token type such as 'style(' or 'scroll-state('
578
543
  */
579
- EnumToken[EnumToken["ContainerFunctionTokenType"] = 116] = "ContainerFunctionTokenType";
544
+ EnumToken[EnumToken["ContainerFunctionTokenType"] = 111] = "ContainerFunctionTokenType";
580
545
  /**
581
546
  * unrecognized node token type
582
547
  */
583
- EnumToken[EnumToken["RawNodeTokenType"] = 117] = "RawNodeTokenType";
548
+ EnumToken[EnumToken["RawNodeTokenType"] = 112] = "RawNodeTokenType";
584
549
  /**
585
550
  * media query boolean token type
586
551
  * at-rule media not ()
587
552
  * at-rule media only ()
588
553
  */
589
- EnumToken[EnumToken["MediaQueryUnaryFeatureTokenType"] = 118] = "MediaQueryUnaryFeatureTokenType";
554
+ EnumToken[EnumToken["MediaQueryUnaryFeatureTokenType"] = 113] = "MediaQueryUnaryFeatureTokenType";
590
555
  /**
591
556
  * grid template function token type such as 'minmax('
592
557
  */
593
- EnumToken[EnumToken["GridTemplateFuncTokenDefType"] = 119] = "GridTemplateFuncTokenDefType";
558
+ EnumToken[EnumToken["GridTemplateFuncTokenDefType"] = 114] = "GridTemplateFuncTokenDefType";
594
559
  /**
595
560
  * image function token type such as 'image(' etc.
596
561
  */
597
- EnumToken[EnumToken["ImageFunctionTokenDefType"] = 120] = "ImageFunctionTokenDefType";
562
+ EnumToken[EnumToken["ImageFunctionTokenDefType"] = 115] = "ImageFunctionTokenDefType";
598
563
  /**
599
564
  * function token type such as 'view(' etc.
600
565
  */
601
- EnumToken[EnumToken["TimelineFunctionTokenDefType"] = 121] = "TimelineFunctionTokenDefType";
566
+ EnumToken[EnumToken["TimelineFunctionTokenDefType"] = 116] = "TimelineFunctionTokenDefType";
602
567
  /**
603
568
  * function token type
604
569
  */
605
- EnumToken[EnumToken["FunctionTokenDefType"] = 122] = "FunctionTokenDefType";
570
+ EnumToken[EnumToken["FunctionTokenDefType"] = 117] = "FunctionTokenDefType";
606
571
  /**
607
572
  * timing function token type such as 'linear(' etc.
608
573
  */
609
- EnumToken[EnumToken["TimingFunctionTokenDefType"] = 123] = "TimingFunctionTokenDefType";
574
+ EnumToken[EnumToken["TimingFunctionTokenDefType"] = 118] = "TimingFunctionTokenDefType";
610
575
  /**
611
576
  * color function token type such as 'rgb(' etc.
612
577
  */
613
- EnumToken[EnumToken["ColorFunctionTokenDefType"] = 124] = "ColorFunctionTokenDefType";
578
+ EnumToken[EnumToken["ColorFunctionTokenDefType"] = 119] = "ColorFunctionTokenDefType";
614
579
  /**
615
580
  * math function token type such as 'calc(' etc.
616
581
  */
617
- EnumToken[EnumToken["MathFunctionTokenDefType"] = 125] = "MathFunctionTokenDefType";
582
+ EnumToken[EnumToken["MathFunctionTokenDefType"] = 120] = "MathFunctionTokenDefType";
618
583
  /**
619
584
  * container function token type such as 'style(' or 'scroll-state('
620
585
  */
621
- EnumToken[EnumToken["ContainerFunctionTokenDefType"] = 126] = "ContainerFunctionTokenDefType";
586
+ EnumToken[EnumToken["ContainerFunctionTokenDefType"] = 121] = "ContainerFunctionTokenDefType";
622
587
  /**
623
588
  * url function token type 'url('
624
589
  */
625
- EnumToken[EnumToken["UrlFunctionTokenDefType"] = 127] = "UrlFunctionTokenDefType";
590
+ EnumToken[EnumToken["UrlFunctionTokenDefType"] = 122] = "UrlFunctionTokenDefType";
626
591
  /**
627
592
  * pseudo-class function token type
628
593
  */
629
- EnumToken[EnumToken["PseudoClassFunctionTokenDefType"] = 128] = "PseudoClassFunctionTokenDefType";
594
+ EnumToken[EnumToken["PseudoClassFunctionTokenDefType"] = 123] = "PseudoClassFunctionTokenDefType";
630
595
  /**
631
596
  * transform function token type such as 'translate(' etc.
632
597
  */
633
- EnumToken[EnumToken["TransformFunctionTokenDefType"] = 129] = "TransformFunctionTokenDefType";
598
+ EnumToken[EnumToken["TransformFunctionTokenDefType"] = 124] = "TransformFunctionTokenDefType";
634
599
  /**
635
600
  * when function token type such as 'supports(' or 'media('
636
601
  */
637
- EnumToken[EnumToken["WhenElseFunctionTokenDefType"] = 130] = "WhenElseFunctionTokenDefType";
602
+ EnumToken[EnumToken["WhenElseFunctionTokenDefType"] = 125] = "WhenElseFunctionTokenDefType";
638
603
  /**
639
604
  * general enclosed function token type 'font-tech(' etc.
640
605
  */
641
- EnumToken[EnumToken["GeneralEnclosedFunctionTokenDefType"] = 131] = "GeneralEnclosedFunctionTokenDefType";
606
+ EnumToken[EnumToken["GeneralEnclosedFunctionTokenDefType"] = 126] = "GeneralEnclosedFunctionTokenDefType";
642
607
  /**
643
608
  * supports function token type 'font-tech('
644
609
  */
645
- EnumToken[EnumToken["SupportsFunctionTokenDefType"] = 132] = "SupportsFunctionTokenDefType";
646
- /**
647
- * CDOCOMMTokenType not allowed in this context
648
- */
649
- EnumToken[EnumToken["InvalidCommentTokenType"] = 133] = "InvalidCommentTokenType";
610
+ EnumToken[EnumToken["SupportsFunctionTokenDefType"] = 127] = "SupportsFunctionTokenDefType";
650
611
  /**
651
612
  * custom function token type '--function-name('
652
613
  */
653
- EnumToken[EnumToken["CustomFunctionTokenDefType"] = 134] = "CustomFunctionTokenDefType";
614
+ EnumToken[EnumToken["CustomFunctionTokenDefType"] = 128] = "CustomFunctionTokenDefType";
654
615
  /**
655
616
  * custom function token type
656
617
  */
657
- EnumToken[EnumToken["CustomFunctionTokenType"] = 135] = "CustomFunctionTokenType";
618
+ EnumToken[EnumToken["CustomFunctionTokenType"] = 129] = "CustomFunctionTokenType";
658
619
  /**
659
620
  * function tokens such as 'var(', 'env(', 'if(')
660
621
  */
661
- EnumToken[EnumToken["WildCardFunctionTokenDefType"] = 136] = "WildCardFunctionTokenDefType";
622
+ EnumToken[EnumToken["WildCardFunctionTokenDefType"] = 130] = "WildCardFunctionTokenDefType";
662
623
  /**
663
624
  * function such as 'var()', 'env()', 'if()'
664
625
  */
665
- EnumToken[EnumToken["WildCardFunctionTokenType"] = 137] = "WildCardFunctionTokenType";
626
+ EnumToken[EnumToken["WildCardFunctionTokenType"] = 131] = "WildCardFunctionTokenType";
666
627
  /**
667
628
  * if condition token
668
629
  */
669
- EnumToken[EnumToken["IfConditionTokenType"] = 138] = "IfConditionTokenType";
630
+ EnumToken[EnumToken["IfConditionTokenType"] = 132] = "IfConditionTokenType";
670
631
  /**
671
632
  * if-Else condition token
672
633
  */
673
- EnumToken[EnumToken["IfElseConditionTokenType"] = 139] = "IfElseConditionTokenType";
634
+ EnumToken[EnumToken["IfElseConditionTokenType"] = 133] = "IfElseConditionTokenType";
674
635
  /**
675
636
  * wrapped values token type like {Arial, sans-serif}
676
637
  */
677
- EnumToken[EnumToken["WrappedValuesTokenType"] = 140] = "WrappedValuesTokenType";
638
+ EnumToken[EnumToken["WrappedValuesTokenType"] = 134] = "WrappedValuesTokenType";
639
+ /**
640
+ * list of arena tokens (binary expression operands)
641
+ */
642
+ EnumToken[EnumToken["ListTokenType"] = 135] = "ListTokenType";
678
643
  /**
679
644
  * infinity token
680
645
  */
681
- EnumToken[EnumToken["NaNTokenType"] = 141] = "NaNTokenType";
646
+ EnumToken[EnumToken["NaNTokenType"] = 136] = "NaNTokenType";
682
647
  /**
683
648
  * infinity token
684
649
  */
685
- EnumToken[EnumToken["InfinityTokenType"] = 142] = "InfinityTokenType";
650
+ EnumToken[EnumToken["InfinityTokenType"] = 137] = "InfinityTokenType";
686
651
  /**
687
652
  * negative infinity token
688
653
  */
689
- EnumToken[EnumToken["NegativeInfinityTokenType"] = 143] = "NegativeInfinityTokenType";
654
+ EnumToken[EnumToken["NegativeInfinityTokenType"] = 138] = "NegativeInfinityTokenType";
690
655
  /**
691
656
  * CSS type token
692
657
  */
693
- EnumToken[EnumToken["CssTypeTokenType"] = 144] = "CssTypeTokenType";
658
+ EnumToken[EnumToken["CssTypeTokenType"] = 139] = "CssTypeTokenType";
694
659
  /**
695
660
  * user defined dimension token type
696
661
  */
697
- EnumToken[EnumToken["UserDefinedDimensionTokenType"] = 145] = "UserDefinedDimensionTokenType";
662
+ EnumToken[EnumToken["UserDefinedDimensionTokenType"] = 140] = "UserDefinedDimensionTokenType";
698
663
  /* aliases */
699
664
  /**
700
665
  * alias for time token type
701
666
  */
702
- EnumToken[EnumToken["Time"] = 25] = "Time";
667
+ EnumToken[EnumToken["Time"] = 26] = "Time";
703
668
  /**
704
669
  * alias for identifier token type
705
670
  */
706
- EnumToken[EnumToken["Iden"] = 7] = "Iden";
671
+ EnumToken[EnumToken["Iden"] = 8] = "Iden";
707
672
  /**
708
673
  * alias for end of file token type
709
674
  */
710
- EnumToken[EnumToken["EOF"] = 48] = "EOF";
675
+ EnumToken[EnumToken["EOF"] = 49] = "EOF";
711
676
  /**
712
677
  * alias for hash token type
713
678
  */
714
- EnumToken[EnumToken["Hash"] = 28] = "Hash";
679
+ EnumToken[EnumToken["Hash"] = 29] = "Hash";
715
680
  /**
716
681
  * alias for flex token type
717
682
  */
718
- EnumToken[EnumToken["Flex"] = 58] = "Flex";
683
+ EnumToken[EnumToken["Flex"] = 59] = "Flex";
719
684
  /**
720
685
  * alias for angle token type
721
686
  */
722
- EnumToken[EnumToken["Angle"] = 24] = "Angle";
687
+ EnumToken[EnumToken["Angle"] = 25] = "Angle";
723
688
  /**
724
689
  * alias for color token type
725
690
  */
726
- EnumToken[EnumToken["Color"] = 50] = "Color";
691
+ EnumToken[EnumToken["Color"] = 51] = "Color";
727
692
  /**
728
693
  * alias for comma token type
729
694
  */
730
- EnumToken[EnumToken["Comma"] = 9] = "Comma";
695
+ EnumToken[EnumToken["Comma"] = 10] = "Comma";
731
696
  /**
732
697
  * alias for string token type
733
698
  */
734
- EnumToken[EnumToken["String"] = 20] = "String";
699
+ EnumToken[EnumToken["String"] = 21] = "String";
735
700
  /**
736
701
  * alias for length token type
737
702
  */
738
- EnumToken[EnumToken["Length"] = 23] = "Length";
703
+ EnumToken[EnumToken["Length"] = 24] = "Length";
739
704
  /**
740
705
  * alias for number token type
741
706
  */
742
- EnumToken[EnumToken["Number"] = 12] = "Number";
707
+ EnumToken[EnumToken["Number"] = 13] = "Number";
743
708
  /**
744
709
  * alias for percentage token type
745
710
  */
746
- EnumToken[EnumToken["Perc"] = 14] = "Perc";
711
+ EnumToken[EnumToken["Perc"] = 15] = "Perc";
747
712
  /**
748
713
  * alias for literal token type
749
714
  */
750
- EnumToken[EnumToken["Literal"] = 6] = "Literal";
715
+ EnumToken[EnumToken["Literal"] = 7] = "Literal";
751
716
  /**
752
717
  * alias for comment token type
753
718
  */
754
- EnumToken[EnumToken["Comment"] = 0] = "Comment";
719
+ EnumToken[EnumToken["Comment"] = 1] = "Comment";
755
720
  /**
756
721
  * alias for url function token type
757
722
  */
758
- EnumToken[EnumToken["UrlFunc"] = 18] = "UrlFunc";
723
+ EnumToken[EnumToken["UrlFunc"] = 19] = "UrlFunc";
759
724
  /**
760
725
  * alias for dimension token type
761
726
  */
762
- EnumToken[EnumToken["Dimension"] = 22] = "Dimension";
727
+ EnumToken[EnumToken["Dimension"] = 23] = "Dimension";
763
728
  /**
764
729
  * alias for frequency token type
765
730
  */
766
- EnumToken[EnumToken["Frequency"] = 26] = "Frequency";
731
+ EnumToken[EnumToken["Frequency"] = 27] = "Frequency";
767
732
  /**
768
733
  * alias for resolution token type
769
734
  */
770
- EnumToken[EnumToken["Resolution"] = 27] = "Resolution";
735
+ EnumToken[EnumToken["Resolution"] = 28] = "Resolution";
771
736
  /**
772
737
  * alias for whitespace token type
773
738
  */
774
- EnumToken[EnumToken["Whitespace"] = 36] = "Whitespace";
739
+ EnumToken[EnumToken["Whitespace"] = 37] = "Whitespace";
775
740
  /**
776
741
  * alias for identifier list token type
777
742
  */
778
- EnumToken[EnumToken["IdenList"] = 71] = "IdenList";
743
+ EnumToken[EnumToken["IdenList"] = 72] = "IdenList";
779
744
  /**
780
745
  * alias for dashed identifier token type
781
746
  */
782
- EnumToken[EnumToken["DashedIden"] = 8] = "DashedIden";
747
+ EnumToken[EnumToken["DashedIden"] = 9] = "DashedIden";
783
748
  /**
784
749
  * alias for grid template function token type
785
750
  */
786
- EnumToken[EnumToken["GridTemplateFunc"] = 72] = "GridTemplateFunc";
751
+ EnumToken[EnumToken["GridTemplateFunc"] = 73] = "GridTemplateFunc";
787
752
  /**
788
753
  * alias for image function token type
789
754
  */
790
- EnumToken[EnumToken["ImageFunc"] = 19] = "ImageFunc";
755
+ EnumToken[EnumToken["ImageFunc"] = 20] = "ImageFunc";
791
756
  /**
792
757
  * alias for comment node type
793
758
  */
794
- EnumToken[EnumToken["CommentNodeType"] = 0] = "CommentNodeType";
759
+ EnumToken[EnumToken["CommentNodeType"] = 1] = "CommentNodeType";
795
760
  /**
796
761
  * alias for cdata section node type
797
762
  */
798
- EnumToken[EnumToken["CDOCOMMNodeType"] = 1] = "CDOCOMMNodeType";
763
+ EnumToken[EnumToken["CDOCOMMNodeType"] = 2] = "CDOCOMMNodeType";
799
764
  /**
800
765
  * alias for timing function token type
801
766
  */
802
- EnumToken[EnumToken["TimingFunction"] = 17] = "TimingFunction";
767
+ EnumToken[EnumToken["TimingFunction"] = 18] = "TimingFunction";
803
768
  /**
804
769
  * alias for timeline function token type
805
770
  */
806
- EnumToken[EnumToken["TimelineFunction"] = 16] = "TimelineFunction";
771
+ EnumToken[EnumToken["TimelineFunction"] = 17] = "TimelineFunction";
807
772
  })(EnumToken || (EnumToken = {}));
808
773
  /**
809
774
  * Supported color types enum
@@ -811,137 +776,141 @@ var EnumToken;
811
776
  var ColorType;
812
777
  (function (ColorType) {
813
778
  /**
814
- * deprecated system colors
779
+ * the color type is not known yet (the color function has not been parsed)
815
780
  */
816
- ColorType[ColorType["SYS"] = 0] = "SYS";
781
+ ColorType[ColorType["NONE"] = 0] = "NONE";
782
+ /**
783
+ * system colors
784
+ */
785
+ ColorType[ColorType["SYS"] = 1] = "SYS";
817
786
  /**
818
787
  * deprecated system colors
819
788
  */
820
- ColorType[ColorType["DPSYS"] = 1] = "DPSYS";
789
+ ColorType[ColorType["DPSYS"] = 2] = "DPSYS";
821
790
  /**
822
791
  * named colors
823
792
  */
824
- ColorType[ColorType["LIT"] = 2] = "LIT";
793
+ ColorType[ColorType["LIT"] = 3] = "LIT";
825
794
  /**
826
795
  * colors as hex values
827
796
  */
828
- ColorType[ColorType["HEX"] = 3] = "HEX";
797
+ ColorType[ColorType["HEX"] = 4] = "HEX";
829
798
  /**
830
799
  * colors as rgb values
831
800
  */
832
- ColorType[ColorType["RGBA"] = 4] = "RGBA";
801
+ ColorType[ColorType["RGBA"] = 5] = "RGBA";
833
802
  /**
834
803
  * colors using rgb
835
804
  */
836
- ColorType[ColorType["HSLA"] = 5] = "HSLA";
805
+ ColorType[ColorType["HSLA"] = 6] = "HSLA";
837
806
  /**
838
807
  * colors using hwb
839
808
  */
840
- ColorType[ColorType["HWB"] = 6] = "HWB";
809
+ ColorType[ColorType["HWB"] = 7] = "HWB";
841
810
  /**
842
811
  * colors using cmyk
843
812
  */
844
- ColorType[ColorType["CMYK"] = 7] = "CMYK";
813
+ ColorType[ColorType["CMYK"] = 8] = "CMYK";
845
814
  /**
846
815
  * colors using oklab
847
816
  * */
848
- ColorType[ColorType["OKLAB"] = 8] = "OKLAB";
817
+ ColorType[ColorType["OKLAB"] = 9] = "OKLAB";
849
818
  /**
850
819
  * colors using oklch
851
820
  * */
852
- ColorType[ColorType["OKLCH"] = 9] = "OKLCH";
821
+ ColorType[ColorType["OKLCH"] = 10] = "OKLCH";
853
822
  /**
854
823
  * colors using lab
855
824
  */
856
- ColorType[ColorType["LAB"] = 10] = "LAB";
825
+ ColorType[ColorType["LAB"] = 11] = "LAB";
857
826
  /**
858
827
  * colors using lch
859
828
  */
860
- ColorType[ColorType["LCH"] = 11] = "LCH";
829
+ ColorType[ColorType["LCH"] = 12] = "LCH";
861
830
  /**
862
831
  * colors using color() function
863
832
  */
864
- ColorType[ColorType["COLOR"] = 12] = "COLOR";
833
+ ColorType[ColorType["COLOR"] = 13] = "COLOR";
865
834
  /**
866
835
  * color using srgb
867
836
  */
868
- ColorType[ColorType["SRGB"] = 13] = "SRGB";
837
+ ColorType[ColorType["SRGB"] = 14] = "SRGB";
869
838
  /**
870
839
  * color using prophoto-rgb
871
840
  */
872
- ColorType[ColorType["PROPHOTO_RGB"] = 14] = "PROPHOTO_RGB";
841
+ ColorType[ColorType["PROPHOTO_RGB"] = 15] = "PROPHOTO_RGB";
873
842
  /**
874
843
  * color using a98-rgb
875
844
  */
876
- ColorType[ColorType["A98_RGB"] = 15] = "A98_RGB";
845
+ ColorType[ColorType["A98_RGB"] = 16] = "A98_RGB";
877
846
  /**
878
847
  * color using rec2020
879
848
  */
880
- ColorType[ColorType["REC2020"] = 16] = "REC2020";
849
+ ColorType[ColorType["REC2020"] = 17] = "REC2020";
881
850
  /**
882
851
  * color using display-p3
883
852
  */
884
- ColorType[ColorType["DISPLAY_P3"] = 17] = "DISPLAY_P3";
853
+ ColorType[ColorType["DISPLAY_P3"] = 18] = "DISPLAY_P3";
885
854
  /**
886
855
  * color using srgb-linear
887
856
  */
888
- ColorType[ColorType["SRGB_LINEAR"] = 18] = "SRGB_LINEAR";
857
+ ColorType[ColorType["SRGB_LINEAR"] = 19] = "SRGB_LINEAR";
889
858
  /**
890
859
  * color using xyz-d50
891
860
  */
892
- ColorType[ColorType["XYZ_D50"] = 19] = "XYZ_D50";
861
+ ColorType[ColorType["XYZ_D50"] = 20] = "XYZ_D50";
893
862
  /**
894
863
  * color using xyz-d65
895
864
  */
896
- ColorType[ColorType["XYZ_D65"] = 20] = "XYZ_D65";
865
+ ColorType[ColorType["XYZ_D65"] = 21] = "XYZ_D65";
897
866
  /**
898
867
  * light-dark() color function
899
868
  */
900
- ColorType[ColorType["LIGHT_DARK"] = 21] = "LIGHT_DARK";
869
+ ColorType[ColorType["LIGHT_DARK"] = 22] = "LIGHT_DARK";
901
870
  /**
902
871
  * color-mix() color function
903
872
  */
904
- ColorType[ColorType["COLOR_MIX"] = 22] = "COLOR_MIX";
873
+ ColorType[ColorType["COLOR_MIX"] = 23] = "COLOR_MIX";
905
874
  /**
906
875
  * non-standard color
907
876
  */
908
- ColorType[ColorType["NON_STD"] = 23] = "NON_STD";
877
+ ColorType[ColorType["NON_STD"] = 24] = "NON_STD";
909
878
  /**
910
879
  * custom color
911
880
  */
912
- ColorType[ColorType["CUSTOM_COLOR"] = 24] = "CUSTOM_COLOR";
881
+ ColorType[ColorType["CUSTOM_COLOR"] = 25] = "CUSTOM_COLOR";
913
882
  /**
914
883
  * alpha() color function
915
884
  */
916
- ColorType[ColorType["ALPHA"] = 25] = "ALPHA";
885
+ ColorType[ColorType["ALPHA"] = 26] = "ALPHA";
917
886
  /**
918
887
  * color using display-p3-linear
919
888
  */
920
- ColorType[ColorType["DISPLAY_P3_LINEAR"] = 26] = "DISPLAY_P3_LINEAR";
889
+ ColorType[ColorType["DISPLAY_P3_LINEAR"] = 27] = "DISPLAY_P3_LINEAR";
921
890
  /**
922
891
  * Contrast color
923
892
  */
924
- ColorType[ColorType["CONTRAST_COLOR"] = 27] = "CONTRAST_COLOR";
893
+ ColorType[ColorType["CONTRAST_COLOR"] = 28] = "CONTRAST_COLOR";
925
894
  /**
926
895
  * color layers
927
896
  */
928
- ColorType[ColorType["COLOR_LAYERS"] = 28] = "COLOR_LAYERS";
897
+ ColorType[ColorType["COLOR_LAYERS"] = 29] = "COLOR_LAYERS";
929
898
  /**
930
899
  * alias for rgba
931
900
  */
932
- ColorType[ColorType["RGB"] = 4] = "RGB";
901
+ ColorType[ColorType["RGB"] = 5] = "RGB";
933
902
  /**
934
903
  * alias for hsl
935
904
  */
936
- ColorType[ColorType["HSL"] = 5] = "HSL";
905
+ ColorType[ColorType["HSL"] = 6] = "HSL";
937
906
  /**
938
907
  * alias for xyz-d65
939
908
  */
940
- ColorType[ColorType["XYZ"] = 20] = "XYZ";
909
+ ColorType[ColorType["XYZ"] = 21] = "XYZ";
941
910
  /**
942
911
  * alias for cmyk
943
912
  */
944
- ColorType[ColorType["DEVICE_CMYK"] = 7] = "DEVICE_CMYK";
913
+ ColorType[ColorType["DEVICE_CMYK"] = 8] = "DEVICE_CMYK";
945
914
  })(ColorType || (ColorType = {}));
946
915
  /**
947
916
  * Supported module case transform
@@ -1011,5 +980,41 @@ var ModuleScopeEnumOptions;
1011
980
  */
1012
981
  ModuleScopeEnumOptions[ModuleScopeEnumOptions["Shortest"] = 512] = "Shortest";
1013
982
  })(ModuleScopeEnumOptions || (ModuleScopeEnumOptions = {}));
983
+ /**
984
+ * Options returned by the filters of {@link AstArena.walk} and {@link AstArena.walkValues}
985
+ */
986
+ var WalkerOptionEnum;
987
+ (function (WalkerOptionEnum) {
988
+ /**
989
+ * ignore the current node and its children
990
+ */
991
+ WalkerOptionEnum[WalkerOptionEnum["Ignore"] = 1] = "Ignore";
992
+ /**
993
+ * stop walking the tree
994
+ */
995
+ WalkerOptionEnum[WalkerOptionEnum["Stop"] = 2] = "Stop";
996
+ /**
997
+ * ignore the current node and process its children
998
+ */
999
+ WalkerOptionEnum[WalkerOptionEnum["Children"] = 4] = "Children";
1000
+ /**
1001
+ * ignore the current node children
1002
+ */
1003
+ WalkerOptionEnum[WalkerOptionEnum["IgnoreChildren"] = 8] = "IgnoreChildren";
1004
+ })(WalkerOptionEnum || (WalkerOptionEnum = {}));
1005
+ /**
1006
+ * Event types of the {@link AstArena.walkValues} filter
1007
+ */
1008
+ var WalkerEvent;
1009
+ (function (WalkerEvent) {
1010
+ /**
1011
+ * enter node
1012
+ */
1013
+ WalkerEvent[WalkerEvent["Enter"] = 1] = "Enter";
1014
+ /**
1015
+ * leave node
1016
+ */
1017
+ WalkerEvent[WalkerEvent["Leave"] = 2] = "Leave";
1018
+ })(WalkerEvent || (WalkerEvent = {}));
1014
1019
 
1015
- export { ColorType, EnumAstNodeStatus, EnumToken, ModuleCaseTransformEnum, ModuleScopeEnumOptions, SyntaxValidationResult, ValidationLevel };
1020
+ export { ColorType, EnumAstNodeStatus, EnumToken, ModuleCaseTransformEnum, ModuleScopeEnumOptions, SyntaxValidationResult, WalkerEvent, WalkerOptionEnum };