meriyah 6.0.6 → 6.1.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.
- package/CHANGELOG.md +32 -11
- package/README.md +7 -10
- package/dist/meriyah.cjs +236 -259
- package/dist/meriyah.min.mjs +1 -1
- package/dist/meriyah.mjs +237 -259
- package/dist/meriyah.umd.js +236 -259
- package/dist/meriyah.umd.min.js +1 -1
- package/dist/{src → types}/chars.d.ts +0 -1
- package/dist/{src → types}/common.d.ts +2 -3
- package/dist/{src → types}/errors.d.ts +4 -5
- package/dist/{src → types}/estree.d.ts +16 -18
- package/dist/{src → types}/lexer/charClassifier.d.ts +0 -1
- package/dist/{src → types}/lexer/comments.d.ts +1 -2
- package/dist/{src → types}/lexer/common.d.ts +1 -2
- package/dist/{src → types}/lexer/decodeHTML.d.ts +0 -1
- package/dist/{src → types}/lexer/identifier.d.ts +1 -2
- package/dist/{src → types}/lexer/index.d.ts +3 -4
- package/dist/{src → types}/lexer/jsx.d.ts +1 -2
- package/dist/{src → types}/lexer/numeric.d.ts +1 -2
- package/dist/{src → types}/lexer/regexp.d.ts +1 -2
- package/dist/{src → types}/lexer/scan.d.ts +1 -2
- package/dist/{src → types}/lexer/string.d.ts +1 -2
- package/dist/{src → types}/lexer/template.d.ts +1 -2
- package/dist/{src → types}/meriyah.d.ts +6 -6
- package/dist/{src → types}/parser.d.ts +6 -7
- package/dist/{src → types}/token.d.ts +4 -5
- package/dist/types/unicode.d.ts +3 -0
- package/package.json +31 -30
- package/dist/src/chars.d.ts.map +0 -1
- package/dist/src/common.d.ts.map +0 -1
- package/dist/src/errors.d.ts.map +0 -1
- package/dist/src/estree.d.ts.map +0 -1
- package/dist/src/lexer/charClassifier.d.ts.map +0 -1
- package/dist/src/lexer/comments.d.ts.map +0 -1
- package/dist/src/lexer/common.d.ts.map +0 -1
- package/dist/src/lexer/decodeHTML.d.ts.map +0 -1
- package/dist/src/lexer/identifier.d.ts.map +0 -1
- package/dist/src/lexer/index.d.ts.map +0 -1
- package/dist/src/lexer/jsx.d.ts.map +0 -1
- package/dist/src/lexer/numeric.d.ts.map +0 -1
- package/dist/src/lexer/regexp.d.ts.map +0 -1
- package/dist/src/lexer/scan.d.ts.map +0 -1
- package/dist/src/lexer/string.d.ts.map +0 -1
- package/dist/src/lexer/template.d.ts.map +0 -1
- package/dist/src/meriyah.d.ts.map +0 -1
- package/dist/src/parser.d.ts.map +0 -1
- package/dist/src/token.d.ts.map +0 -1
- package/dist/src/unicode.d.ts +0 -6
- package/dist/src/unicode.d.ts.map +0 -1
package/dist/meriyah.cjs
CHANGED
|
@@ -177,29 +177,21 @@ const errorMessages = {
|
|
|
177
177
|
[174]: "The only valid meta property for import is 'import.meta'",
|
|
178
178
|
[175]: "'import.meta' must not contain escaped characters",
|
|
179
179
|
[176]: 'cannot use "await" as identifier inside an async function',
|
|
180
|
-
[177]: 'cannot use "await" in static blocks'
|
|
180
|
+
[177]: 'cannot use "await" in static blocks',
|
|
181
181
|
};
|
|
182
182
|
class ParseError extends SyntaxError {
|
|
183
183
|
constructor(start, startLine, startColumn, end, endLine, endColumn, type, ...params) {
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
startColumn +
|
|
188
|
-
'-' +
|
|
189
|
-
endLine +
|
|
190
|
-
':' +
|
|
191
|
-
endColumn +
|
|
192
|
-
']: ' +
|
|
193
|
-
errorMessages[type].replace(/%(\d+)/g, (_, i) => params[i]);
|
|
194
|
-
super(`${message}`);
|
|
184
|
+
const description = errorMessages[type].replace(/%(\d+)/g, (_, i) => params[i]);
|
|
185
|
+
const message = '[' + startLine + ':' + startColumn + '-' + endLine + ':' + endColumn + ']: ' + description;
|
|
186
|
+
super(message);
|
|
195
187
|
this.start = start;
|
|
196
188
|
this.end = end;
|
|
197
189
|
this.range = [start, end];
|
|
198
190
|
this.loc = {
|
|
199
191
|
start: { line: startLine, column: startColumn },
|
|
200
|
-
end: { line: endLine, column: endColumn }
|
|
192
|
+
end: { line: endLine, column: endColumn },
|
|
201
193
|
};
|
|
202
|
-
this.description =
|
|
194
|
+
this.description = description;
|
|
203
195
|
}
|
|
204
196
|
}
|
|
205
197
|
function report(parser, type, ...params) {
|
|
@@ -215,12 +207,6 @@ function reportScannerError(tokenIndex, tokenLine, tokenColumn, index, line, col
|
|
|
215
207
|
throw new ParseError(tokenIndex, tokenLine, tokenColumn, index, line, column, type);
|
|
216
208
|
}
|
|
217
209
|
|
|
218
|
-
function isIDContinue(code) {
|
|
219
|
-
return (unicodeLookup[(code >>> 5) + 0] >>> code & 31 & 1) !== 0;
|
|
220
|
-
}
|
|
221
|
-
function isIDStart(code) {
|
|
222
|
-
return (unicodeLookup[(code >>> 5) + 34816] >>> code & 31 & 1) !== 0;
|
|
223
|
-
}
|
|
224
210
|
const unicodeLookup = ((compressed, lookup) => {
|
|
225
211
|
const result = new Uint32Array(104448);
|
|
226
212
|
let index = 0;
|
|
@@ -244,6 +230,8 @@ const unicodeLookup = ((compressed, lookup) => {
|
|
|
244
230
|
}
|
|
245
231
|
return result;
|
|
246
232
|
})([-1, 2, 26, 2, 27, 2, 5, -1, 0, 77595648, 3, 44, 2, 3, 0, 14, 2, 63, 2, 64, 3, 0, 3, 0, 3168796671, 0, 4294956992, 2, 1, 2, 0, 2, 41, 3, 0, 4, 0, 4294966523, 3, 0, 4, 2, 16, 2, 65, 2, 0, 0, 4294836735, 0, 3221225471, 0, 4294901942, 2, 66, 0, 134152192, 3, 0, 2, 0, 4294951935, 3, 0, 2, 0, 2683305983, 0, 2684354047, 2, 18, 2, 0, 0, 4294961151, 3, 0, 2, 2, 19, 2, 0, 0, 608174079, 2, 0, 2, 60, 2, 7, 2, 6, 0, 4286611199, 3, 0, 2, 2, 1, 3, 0, 3, 0, 4294901711, 2, 40, 0, 4089839103, 0, 2961209759, 0, 1342439375, 0, 4294543342, 0, 3547201023, 0, 1577204103, 0, 4194240, 0, 4294688750, 2, 2, 0, 80831, 0, 4261478351, 0, 4294549486, 2, 2, 0, 2967484831, 0, 196559, 0, 3594373100, 0, 3288319768, 0, 8469959, 2, 203, 2, 3, 0, 4093640191, 0, 660618719, 0, 65487, 0, 4294828015, 0, 4092591615, 0, 1616920031, 0, 982991, 2, 3, 2, 0, 0, 2163244511, 0, 4227923919, 0, 4236247022, 2, 71, 0, 4284449919, 0, 851904, 2, 4, 2, 12, 0, 67076095, -1, 2, 72, 0, 1073741743, 0, 4093607775, -1, 0, 50331649, 0, 3265266687, 2, 33, 0, 4294844415, 0, 4278190047, 2, 20, 2, 137, -1, 3, 0, 2, 2, 23, 2, 0, 2, 10, 2, 0, 2, 15, 2, 22, 3, 0, 10, 2, 74, 2, 0, 2, 75, 2, 76, 2, 77, 2, 0, 2, 78, 2, 0, 2, 11, 0, 261632, 2, 25, 3, 0, 2, 2, 13, 2, 4, 3, 0, 18, 2, 79, 2, 5, 3, 0, 2, 2, 80, 0, 2151677951, 2, 29, 2, 9, 0, 909311, 3, 0, 2, 0, 814743551, 2, 49, 0, 67090432, 3, 0, 2, 2, 42, 2, 0, 2, 6, 2, 0, 2, 30, 2, 8, 0, 268374015, 2, 110, 2, 51, 2, 0, 2, 81, 0, 134153215, -1, 2, 7, 2, 0, 2, 8, 0, 2684354559, 0, 67044351, 0, 3221160064, 2, 17, -1, 3, 0, 2, 2, 53, 0, 1046528, 3, 0, 3, 2, 9, 2, 0, 2, 54, 0, 4294960127, 2, 10, 2, 6, 2, 11, 0, 4294377472, 2, 12, 3, 0, 16, 2, 13, 2, 0, 2, 82, 2, 10, 2, 0, 2, 83, 2, 84, 2, 85, 2, 210, 2, 55, 0, 1048577, 2, 86, 2, 14, -1, 2, 14, 0, 131042, 2, 87, 2, 88, 2, 89, 2, 0, 2, 34, -83, 3, 0, 7, 0, 1046559, 2, 0, 2, 15, 2, 0, 0, 2147516671, 2, 21, 3, 90, 2, 2, 0, -16, 2, 91, 0, 524222462, 2, 4, 2, 0, 0, 4269801471, 2, 4, 3, 0, 2, 2, 28, 2, 16, 3, 0, 2, 2, 17, 2, 0, -1, 2, 18, -16, 3, 0, 206, -2, 3, 0, 692, 2, 73, -1, 2, 18, 2, 10, 3, 0, 8, 2, 93, 2, 133, 2, 0, 0, 3220242431, 3, 0, 3, 2, 19, 2, 94, 2, 95, 3, 0, 2, 2, 96, 2, 0, 2, 97, 2, 46, 2, 0, 0, 4351, 2, 0, 2, 9, 3, 0, 2, 0, 67043391, 0, 3909091327, 2, 0, 2, 24, 2, 9, 2, 20, 3, 0, 2, 0, 67076097, 2, 8, 2, 0, 2, 21, 0, 67059711, 0, 4236247039, 3, 0, 2, 0, 939524103, 0, 8191999, 2, 101, 2, 102, 2, 22, 2, 23, 3, 0, 3, 0, 67057663, 3, 0, 349, 2, 103, 2, 104, 2, 7, -264, 3, 0, 11, 2, 24, 3, 0, 2, 2, 32, -1, 0, 3774349439, 2, 105, 2, 106, 3, 0, 2, 2, 19, 2, 107, 3, 0, 10, 2, 10, 2, 18, 2, 0, 2, 47, 2, 0, 2, 31, 2, 108, 2, 25, 0, 1638399, 2, 183, 2, 109, 3, 0, 3, 2, 20, 2, 26, 2, 27, 2, 5, 2, 28, 2, 0, 2, 8, 2, 111, -1, 2, 112, 2, 113, 2, 114, -1, 3, 0, 3, 2, 12, -2, 2, 0, 2, 29, -3, 2, 163, -4, 2, 20, 2, 0, 2, 36, 0, 1, 2, 0, 2, 67, 2, 6, 2, 12, 2, 10, 2, 0, 2, 115, -1, 3, 0, 4, 2, 10, 2, 23, 2, 116, 2, 7, 2, 0, 2, 117, 2, 0, 2, 118, 2, 119, 2, 120, 2, 0, 2, 9, 3, 0, 9, 2, 21, 2, 30, 2, 31, 2, 121, 2, 122, -2, 2, 123, 2, 124, 2, 30, 2, 21, 2, 8, -2, 2, 125, 2, 30, 2, 32, -2, 2, 0, 2, 39, -2, 0, 4277137519, 0, 2269118463, -1, 3, 20, 2, -1, 2, 33, 2, 38, 2, 0, 3, 30, 2, 2, 35, 2, 19, -3, 3, 0, 2, 2, 34, -1, 2, 0, 2, 35, 2, 0, 2, 35, 2, 0, 2, 48, 2, 0, 0, 4294950463, 2, 37, -7, 2, 0, 0, 203775, 2, 57, 2, 167, 2, 20, 2, 43, 2, 36, 2, 18, 2, 37, 2, 18, 2, 126, 2, 21, 3, 0, 2, 2, 38, 0, 2151677888, 2, 0, 2, 12, 0, 4294901764, 2, 144, 2, 0, 2, 58, 2, 56, 0, 5242879, 3, 0, 2, 0, 402644511, -1, 2, 128, 2, 39, 0, 3, -1, 2, 129, 2, 130, 2, 0, 0, 67045375, 2, 40, 0, 4226678271, 0, 3766565279, 0, 2039759, 2, 132, 2, 41, 0, 1046437, 0, 6, 3, 0, 2, 0, 3288270847, 0, 3, 3, 0, 2, 0, 67043519, -5, 2, 0, 0, 4282384383, 0, 1056964609, -1, 3, 0, 2, 0, 67043345, -1, 2, 0, 2, 42, 2, 23, 2, 50, 2, 11, 2, 61, 2, 38, -5, 2, 0, 2, 12, -3, 3, 0, 2, 0, 2147484671, 2, 134, 0, 4190109695, 2, 52, -2, 2, 135, 0, 4244635647, 0, 27, 2, 0, 2, 8, 2, 43, 2, 0, 2, 68, 2, 18, 2, 0, 2, 42, -6, 2, 0, 2, 45, 2, 59, 2, 44, 2, 45, 2, 46, 2, 47, 0, 8388351, -2, 2, 136, 0, 3028287487, 2, 48, 2, 138, 0, 33259519, 2, 49, -9, 2, 21, 0, 4294836223, 0, 3355443199, 0, 134152199, -2, 2, 69, -2, 3, 0, 28, 2, 32, -3, 3, 0, 3, 2, 17, 3, 0, 6, 2, 50, -81, 2, 18, 3, 0, 2, 2, 36, 3, 0, 33, 2, 25, 2, 30, 3, 0, 124, 2, 12, 3, 0, 18, 2, 38, -213, 2, 0, 2, 32, -54, 3, 0, 17, 2, 42, 2, 8, 2, 23, 2, 0, 2, 8, 2, 23, 2, 51, 2, 0, 2, 21, 2, 52, 2, 139, 2, 25, -13, 2, 0, 2, 53, -6, 3, 0, 2, -4, 3, 0, 2, 0, 4294936575, 2, 0, 0, 4294934783, -2, 0, 196635, 3, 0, 191, 2, 54, 3, 0, 38, 2, 30, 2, 55, 2, 34, -278, 2, 140, 3, 0, 9, 2, 141, 2, 142, 2, 56, 3, 0, 11, 2, 7, -72, 3, 0, 3, 2, 143, 0, 1677656575, -130, 2, 26, -16, 2, 0, 2, 24, 2, 38, -16, 0, 4161266656, 0, 4071, 2, 205, -4, 2, 57, -13, 3, 0, 2, 2, 58, 2, 0, 2, 145, 2, 146, 2, 62, 2, 0, 2, 147, 2, 148, 2, 149, 3, 0, 10, 2, 150, 2, 151, 2, 22, 3, 58, 2, 3, 152, 2, 3, 59, 2, 0, 4294954999, 2, 0, -16, 2, 0, 2, 92, 2, 0, 0, 2105343, 0, 4160749584, 2, 177, -34, 2, 8, 2, 154, -6, 0, 4194303871, 0, 4294903771, 2, 0, 2, 60, 2, 100, -3, 2, 0, 0, 1073684479, 0, 17407, -9, 2, 18, 2, 17, 2, 0, 2, 32, -14, 2, 18, 2, 32, -6, 2, 18, 2, 12, -15, 2, 155, 3, 0, 6, 0, 8323103, -1, 3, 0, 2, 2, 61, -37, 2, 62, 2, 156, 2, 157, 2, 158, 2, 159, 2, 160, -105, 2, 26, -32, 3, 0, 1335, -1, 3, 0, 129, 2, 32, 3, 0, 6, 2, 10, 3, 0, 180, 2, 161, 3, 0, 233, 2, 162, 3, 0, 18, 2, 10, -77, 3, 0, 16, 2, 10, -47, 3, 0, 154, 2, 6, 3, 0, 130, 2, 25, -22250, 3, 0, 7, 2, 25, -6130, 3, 5, 2, -1, 0, 69207040, 3, 44, 2, 3, 0, 14, 2, 63, 2, 64, -3, 0, 3168731136, 0, 4294956864, 2, 1, 2, 0, 2, 41, 3, 0, 4, 0, 4294966275, 3, 0, 4, 2, 16, 2, 65, 2, 0, 2, 34, -1, 2, 18, 2, 66, -1, 2, 0, 0, 2047, 0, 4294885376, 3, 0, 2, 0, 3145727, 0, 2617294944, 0, 4294770688, 2, 25, 2, 67, 3, 0, 2, 0, 131135, 2, 98, 0, 70256639, 0, 71303167, 0, 272, 2, 42, 2, 6, 0, 32511, 2, 0, 2, 49, -1, 2, 99, 2, 68, 0, 4278255616, 0, 4294836227, 0, 4294549473, 0, 600178175, 0, 2952806400, 0, 268632067, 0, 4294543328, 0, 57540095, 0, 1577058304, 0, 1835008, 0, 4294688736, 2, 70, 2, 69, 0, 33554435, 2, 131, 2, 70, 2, 164, 0, 131075, 0, 3594373096, 0, 67094296, 2, 69, -1, 0, 4294828000, 0, 603979263, 0, 654311424, 0, 3, 0, 4294828001, 0, 602930687, 2, 171, 0, 393219, 0, 4294828016, 0, 671088639, 0, 2154840064, 0, 4227858435, 0, 4236247008, 2, 71, 2, 38, -1, 2, 4, 0, 917503, 2, 38, -1, 2, 72, 0, 537788335, 0, 4026531935, -1, 0, 1, -1, 2, 33, 2, 73, 0, 7936, -3, 2, 0, 0, 2147485695, 0, 1010761728, 0, 4292984930, 0, 16387, 2, 0, 2, 15, 2, 22, 3, 0, 10, 2, 74, 2, 0, 2, 75, 2, 76, 2, 77, 2, 0, 2, 78, 2, 0, 2, 12, -1, 2, 25, 3, 0, 2, 2, 13, 2, 4, 3, 0, 18, 2, 79, 2, 5, 3, 0, 2, 2, 80, 0, 2147745791, 3, 19, 2, 0, 122879, 2, 0, 2, 9, 0, 276824064, -2, 3, 0, 2, 2, 42, 2, 0, 0, 4294903295, 2, 0, 2, 30, 2, 8, -1, 2, 18, 2, 51, 2, 0, 2, 81, 2, 49, -1, 2, 21, 2, 0, 2, 29, -2, 0, 128, -2, 2, 28, 2, 9, 0, 8160, -1, 2, 127, 0, 4227907585, 2, 0, 2, 37, 2, 0, 2, 50, 2, 184, 2, 10, 2, 6, 2, 11, -1, 0, 74440192, 3, 0, 6, -2, 3, 0, 8, 2, 13, 2, 0, 2, 82, 2, 10, 2, 0, 2, 83, 2, 84, 2, 85, -3, 2, 86, 2, 14, -3, 2, 87, 2, 88, 2, 89, 2, 0, 2, 34, -83, 3, 0, 7, 0, 817183, 2, 0, 2, 15, 2, 0, 0, 33023, 2, 21, 3, 90, 2, -17, 2, 91, 0, 524157950, 2, 4, 2, 0, 2, 92, 2, 4, 2, 0, 2, 22, 2, 28, 2, 16, 3, 0, 2, 2, 17, 2, 0, -1, 2, 18, -16, 3, 0, 206, -2, 3, 0, 692, 2, 73, -1, 2, 18, 2, 10, 3, 0, 8, 2, 93, 0, 3072, 2, 0, 0, 2147516415, 2, 10, 3, 0, 2, 2, 25, 2, 94, 2, 95, 3, 0, 2, 2, 96, 2, 0, 2, 97, 2, 46, 0, 4294965179, 0, 7, 2, 0, 2, 9, 2, 95, 2, 9, -1, 0, 1761345536, 2, 98, 0, 4294901823, 2, 38, 2, 20, 2, 99, 2, 35, 2, 100, 0, 2080440287, 2, 0, 2, 34, 2, 153, 0, 3296722943, 2, 0, 0, 1046675455, 0, 939524101, 0, 1837055, 2, 101, 2, 102, 2, 22, 2, 23, 3, 0, 3, 0, 7, 3, 0, 349, 2, 103, 2, 104, 2, 7, -264, 3, 0, 11, 2, 24, 3, 0, 2, 2, 32, -1, 0, 2700607615, 2, 105, 2, 106, 3, 0, 2, 2, 19, 2, 107, 3, 0, 10, 2, 10, 2, 18, 2, 0, 2, 47, 2, 0, 2, 31, 2, 108, -3, 2, 109, 3, 0, 3, 2, 20, -1, 3, 5, 2, 2, 110, 2, 0, 2, 8, 2, 111, -1, 2, 112, 2, 113, 2, 114, -1, 3, 0, 3, 2, 12, -2, 2, 0, 2, 29, -8, 2, 20, 2, 0, 2, 36, -1, 2, 0, 2, 67, 2, 6, 2, 30, 2, 10, 2, 0, 2, 115, -1, 3, 0, 4, 2, 10, 2, 18, 2, 116, 2, 7, 2, 0, 2, 117, 2, 0, 2, 118, 2, 119, 2, 120, 2, 0, 2, 9, 3, 0, 9, 2, 21, 2, 30, 2, 31, 2, 121, 2, 122, -2, 2, 123, 2, 124, 2, 30, 2, 21, 2, 8, -2, 2, 125, 2, 30, 2, 32, -2, 2, 0, 2, 39, -2, 0, 4277075969, 2, 30, -1, 3, 20, 2, -1, 2, 33, 2, 126, 2, 0, 3, 30, 2, 2, 35, 2, 19, -3, 3, 0, 2, 2, 34, -1, 2, 0, 2, 35, 2, 0, 2, 35, 2, 0, 2, 50, 2, 98, 0, 4294934591, 2, 37, -7, 2, 0, 0, 197631, 2, 57, -1, 2, 20, 2, 43, 2, 37, 2, 18, 0, 3, 2, 18, 2, 126, 2, 21, 2, 127, 2, 54, -1, 0, 2490368, 2, 127, 2, 25, 2, 18, 2, 34, 2, 127, 2, 38, 0, 4294901904, 0, 4718591, 2, 127, 2, 35, 0, 335544350, -1, 2, 128, 0, 2147487743, 0, 1, -1, 2, 129, 2, 130, 2, 8, -1, 2, 131, 2, 70, 0, 3758161920, 0, 3, 2, 132, 0, 12582911, 0, 655360, -1, 2, 0, 2, 29, 0, 2147485568, 0, 3, 2, 0, 2, 25, 0, 176, -5, 2, 0, 2, 17, 2, 192, -1, 2, 0, 2, 25, 2, 209, -1, 2, 0, 0, 16779263, -2, 2, 12, -1, 2, 38, -5, 2, 0, 2, 133, -3, 3, 0, 2, 2, 55, 2, 134, 0, 2147549183, 0, 2, -2, 2, 135, 2, 36, 0, 10, 0, 4294965249, 0, 67633151, 0, 4026597376, 2, 0, 0, 536871935, 2, 18, 2, 0, 2, 42, -6, 2, 0, 0, 1, 2, 59, 2, 17, 0, 1, 2, 46, 2, 25, -3, 2, 136, 2, 36, 2, 137, 2, 138, 0, 16778239, -10, 2, 35, 0, 4294836212, 2, 9, -3, 2, 69, -2, 3, 0, 28, 2, 32, -3, 3, 0, 3, 2, 17, 3, 0, 6, 2, 50, -81, 2, 18, 3, 0, 2, 2, 36, 3, 0, 33, 2, 25, 0, 126, 3, 0, 124, 2, 12, 3, 0, 18, 2, 38, -213, 2, 10, -55, 3, 0, 17, 2, 42, 2, 8, 2, 18, 2, 0, 2, 8, 2, 18, 2, 60, 2, 0, 2, 25, 2, 50, 2, 139, 2, 25, -13, 2, 0, 2, 73, -6, 3, 0, 2, -4, 3, 0, 2, 0, 67583, -1, 2, 107, -2, 0, 11, 3, 0, 191, 2, 54, 3, 0, 38, 2, 30, 2, 55, 2, 34, -278, 2, 140, 3, 0, 9, 2, 141, 2, 142, 2, 56, 3, 0, 11, 2, 7, -72, 3, 0, 3, 2, 143, 2, 144, -187, 3, 0, 2, 2, 58, 2, 0, 2, 145, 2, 146, 2, 62, 2, 0, 2, 147, 2, 148, 2, 149, 3, 0, 10, 2, 150, 2, 151, 2, 22, 3, 58, 2, 3, 152, 2, 3, 59, 2, 2, 153, -57, 2, 8, 2, 154, -7, 2, 18, 2, 0, 2, 60, -4, 2, 0, 0, 1065361407, 0, 16384, -9, 2, 18, 2, 60, 2, 0, 2, 133, -14, 2, 18, 2, 133, -6, 2, 18, 0, 81919, -15, 2, 155, 3, 0, 6, 2, 126, -1, 3, 0, 2, 0, 2063, -37, 2, 62, 2, 156, 2, 157, 2, 158, 2, 159, 2, 160, -138, 3, 0, 1335, -1, 3, 0, 129, 2, 32, 3, 0, 6, 2, 10, 3, 0, 180, 2, 161, 3, 0, 233, 2, 162, 3, 0, 18, 2, 10, -77, 3, 0, 16, 2, 10, -47, 3, 0, 154, 2, 6, 3, 0, 130, 2, 25, -28386, 2, 0, 0, 1, -1, 2, 55, 2, 0, 0, 8193, -21, 2, 201, 0, 10255, 0, 4, -11, 2, 69, 2, 182, -1, 0, 71680, -1, 2, 174, 0, 4292900864, 0, 268435519, -5, 2, 163, -1, 2, 173, -1, 0, 6144, -2, 2, 46, -1, 2, 168, -1, 0, 2147532800, 2, 164, 2, 170, 0, 8355840, -2, 0, 4, -4, 2, 198, 0, 205128192, 0, 1333757536, 0, 2147483696, 0, 423953, 0, 747766272, 0, 2717763192, 0, 4286578751, 0, 278545, 2, 165, 0, 4294886464, 0, 33292336, 0, 417809, 2, 165, 0, 1327482464, 0, 4278190128, 0, 700594195, 0, 1006647527, 0, 4286497336, 0, 4160749631, 2, 166, 0, 201327104, 0, 3634348576, 0, 8323120, 2, 166, 0, 202375680, 0, 2678047264, 0, 4293984304, 2, 166, -1, 0, 983584, 0, 48, 0, 58720273, 0, 3489923072, 0, 10517376, 0, 4293066815, 0, 1, 2, 213, 2, 167, 2, 0, 0, 2089, 0, 3221225552, 0, 201359520, 2, 0, -2, 0, 256, 0, 122880, 0, 16777216, 2, 163, 0, 4160757760, 2, 0, -6, 2, 179, -11, 0, 3263218176, -1, 0, 49664, 0, 2160197632, 0, 8388802, -1, 0, 12713984, -1, 2, 168, 2, 186, 2, 187, -2, 2, 175, -20, 0, 3758096385, -2, 2, 169, 2, 195, 2, 94, 2, 180, 0, 4294057984, -2, 2, 176, 2, 172, 0, 4227874816, -2, 2, 169, -1, 2, 170, -1, 2, 181, 2, 55, 0, 4026593280, 0, 14, 0, 4292919296, -1, 2, 178, 0, 939588608, -1, 0, 805306368, -1, 2, 55, 2, 171, 2, 172, 2, 173, 2, 211, 2, 0, -2, 0, 8192, -4, 0, 267386880, -1, 0, 117440512, 0, 7168, -1, 2, 170, 2, 168, 2, 174, 2, 188, -16, 2, 175, -1, 0, 1426112704, 2, 176, -1, 2, 196, 0, 271581216, 0, 2149777408, 2, 25, 2, 174, 2, 55, 0, 851967, 2, 189, -1, 2, 177, 2, 190, -4, 2, 178, -20, 2, 98, 2, 208, -56, 0, 3145728, 2, 191, -10, 0, 32505856, -1, 2, 179, -1, 0, 2147385088, 2, 94, 1, 2155905152, 2, -3, 2, 176, 2, 0, 0, 67108864, -2, 2, 180, -6, 2, 181, 2, 25, 0, 1, -1, 0, 1, -1, 2, 182, -3, 2, 126, 2, 69, -2, 2, 100, -2, 0, 32704, 2, 55, -915, 2, 183, -1, 2, 207, -10, 2, 194, -5, 2, 185, -6, 0, 3759456256, 2, 19, -1, 2, 184, -1, 2, 185, -2, 0, 4227874752, -3, 0, 2146435072, 2, 186, -2, 0, 1006649344, 2, 55, -1, 2, 94, 0, 201375744, -3, 0, 134217720, 2, 94, 0, 4286677377, 0, 32896, -1, 2, 178, -3, 0, 4227907584, -349, 0, 65520, 0, 1920, 2, 167, 3, 0, 264, -11, 2, 173, -2, 2, 187, 2, 0, 0, 520617856, 0, 2692743168, 0, 36, -3, 0, 524280, -13, 2, 193, -1, 0, 4294934272, 2, 25, 2, 187, -1, 2, 215, 0, 2158720, -3, 2, 186, 0, 1, -4, 2, 55, 0, 3808625411, 0, 3489628288, 0, 4096, 0, 1207959680, 0, 3221274624, 2, 0, -3, 2, 188, 0, 120, 0, 7340032, -2, 2, 189, 2, 4, 2, 25, 2, 176, 3, 0, 4, 2, 186, -1, 2, 190, 2, 167, -1, 0, 8176, 2, 170, 2, 188, 0, 1073741824, -1, 0, 4290773232, 2, 0, -4, 2, 176, 2, 197, 0, 15728640, 2, 167, -1, 2, 174, -1, 0, 134250480, 0, 4720640, 0, 3825467396, -1, 2, 180, -9, 2, 94, 2, 181, 0, 4294967040, 2, 137, 0, 4160880640, 3, 0, 2, 0, 704, 0, 1849688064, 2, 191, -1, 2, 55, 0, 4294901887, 2, 0, 0, 130547712, 0, 1879048192, 2, 212, 3, 0, 2, -1, 2, 192, 2, 193, -1, 0, 17829776, 0, 2025848832, 0, 4261477888, -2, 2, 0, -1, 0, 4286580608, -1, 0, 29360128, 2, 200, 0, 16252928, 0, 3791388672, 2, 130, 3, 0, 2, -2, 2, 206, 2, 0, -1, 2, 107, -1, 0, 66584576, -1, 2, 199, -1, 0, 448, 0, 4294918080, 3, 0, 6, 2, 55, -1, 0, 4294755328, 0, 4294967267, 2, 7, -1, 2, 174, 2, 187, 2, 25, 2, 98, 2, 25, 2, 194, 2, 94, -2, 0, 245760, 2, 195, -1, 2, 163, 2, 202, 0, 4227923456, -1, 2, 196, 2, 174, 2, 94, -3, 0, 4292870145, 0, 262144, -1, 2, 95, 2, 0, 0, 1073758848, 2, 197, -1, 0, 4227921920, 2, 198, 0, 68289024, 0, 528402016, 0, 4292927536, 0, 46080, 2, 191, 0, 4265609306, 0, 4294967289, -2, 0, 268435456, 2, 95, -2, 2, 199, 3, 0, 5, -1, 2, 200, 2, 176, 2, 0, -2, 0, 4227923936, 2, 67, -1, 2, 187, 2, 197, 2, 99, 2, 168, 2, 178, 2, 204, 3, 0, 5, -1, 2, 167, 3, 0, 3, -2, 0, 2146959360, 0, 9440640, 0, 104857600, 0, 4227923840, 3, 0, 2, 0, 768, 2, 201, 2, 28, -2, 2, 174, -2, 2, 202, -1, 2, 169, 2, 98, 3, 0, 5, -1, 0, 4227923964, 0, 512, 0, 8388608, 2, 203, 2, 183, 2, 193, 0, 4286578944, 3, 0, 2, 0, 1152, 0, 1266679808, 2, 199, 0, 576, 0, 4261707776, 2, 98, 3, 0, 9, 2, 169, 0, 131072, 0, 939524096, 2, 188, 3, 0, 2, 2, 16, -1, 0, 2147221504, -28, 2, 187, 3, 0, 3, -3, 0, 4292902912, -6, 2, 99, 3, 0, 81, 2, 25, -2, 2, 107, -33, 2, 18, 2, 181, -124, 2, 188, -18, 2, 204, 3, 0, 213, -1, 2, 187, 3, 0, 54, -17, 2, 169, 2, 55, 2, 205, -1, 2, 55, 2, 197, 0, 4290822144, -2, 0, 67174336, 0, 520093700, 2, 18, 3, 0, 13, -1, 2, 187, 3, 0, 6, -2, 2, 188, 3, 0, 3, -2, 0, 30720, -1, 0, 32512, 3, 0, 2, 0, 4294770656, -191, 2, 185, -38, 2, 181, 2, 8, 2, 206, 3, 0, 278, 0, 2417033215, -9, 0, 4294705144, 0, 4292411391, 0, 65295, -11, 2, 167, 3, 0, 72, -3, 0, 3758159872, 0, 201391616, 3, 0, 123, -7, 2, 187, -13, 2, 180, 3, 0, 2, -1, 2, 173, 2, 207, -3, 2, 99, 2, 0, -7, 2, 181, -1, 0, 384, -1, 0, 133693440, -3, 2, 208, -2, 2, 110, 3, 0, 3, 3, 180, 2, -2, 2, 94, 2, 169, 3, 0, 4, -2, 2, 196, -1, 2, 163, 0, 335552923, 2, 209, -1, 0, 538974272, 0, 2214592512, 0, 132000, -10, 0, 192, -8, 2, 210, -21, 0, 134213632, 2, 162, 3, 0, 34, 2, 55, 0, 4294965279, 3, 0, 6, 0, 100663424, 0, 63524, -1, 2, 214, 2, 152, 3, 0, 3, -1, 0, 3221282816, 0, 4294917120, 3, 0, 9, 2, 25, 2, 211, -1, 2, 212, 3, 0, 14, 2, 25, 2, 187, 3, 0, 6, 2, 25, 2, 213, 3, 0, 15, 0, 2147520640, -6, 0, 4286578784, 2, 0, -2, 0, 1006694400, 3, 0, 24, 2, 36, -1, 0, 4292870144, 3, 0, 2, 0, 1, 2, 176, 3, 0, 6, 2, 209, 0, 4110942569, 0, 1432950139, 0, 2701658217, 0, 4026532864, 0, 4026532881, 2, 0, 2, 47, 3, 0, 8, -1, 2, 178, -2, 2, 180, 0, 98304, 0, 65537, 2, 181, -5, 2, 214, 2, 0, 2, 37, 2, 202, 2, 167, 0, 4294770176, 2, 110, 3, 0, 4, -30, 2, 192, 0, 3758153728, -3, 0, 125829120, -2, 2, 187, 0, 4294897664, 2, 178, -1, 2, 199, -1, 2, 174, 0, 4026580992, 2, 95, 2, 0, -10, 2, 180, 0, 3758145536, 0, 31744, -1, 0, 1610628992, 0, 4261477376, -4, 2, 215, -2, 2, 187, 3, 0, 32, -1335, 2, 0, -129, 2, 187, -6, 2, 176, -180, 0, 65532, -233, 2, 177, -18, 2, 176, 3, 0, 77, -16, 2, 176, 3, 0, 47, -154, 2, 170, -130, 2, 18, 3, 0, 22250, -7, 2, 18, 3, 0, 6128], [4294967295, 4294967291, 4092460543, 4294828031, 4294967294, 134217726, 4294903807, 268435455, 2147483647, 1048575, 1073741823, 3892314111, 134217727, 1061158911, 536805376, 4294910143, 4294901759, 32767, 4294901760, 262143, 536870911, 8388607, 4160749567, 4294902783, 4294918143, 65535, 67043328, 2281701374, 4294967264, 2097151, 4194303, 255, 67108863, 4294967039, 511, 524287, 131071, 63, 127, 3238002687, 4294549487, 4290772991, 33554431, 4294901888, 4286578687, 67043329, 4294705152, 4294770687, 67043583, 1023, 15, 2047999, 67043343, 67051519, 16777215, 2147483648, 4294902000, 28, 4292870143, 4294966783, 16383, 67047423, 4294967279, 262083, 20511, 41943039, 493567, 4294959104, 603979775, 65536, 602799615, 805044223, 4294965206, 8191, 1031749119, 4294917631, 2134769663, 4286578493, 4282253311, 4294942719, 33540095, 4294905855, 2868854591, 1608515583, 265232348, 534519807, 2147614720, 1060109444, 4093640016, 17376, 2139062143, 224, 4169138175, 4294909951, 4286578688, 4294967292, 4294965759, 535511039, 4294966272, 4294967280, 32768, 8289918, 4294934399, 4294901775, 4294965375, 1602223615, 4294967259, 4294443008, 268369920, 4292804608, 4294967232, 486341884, 4294963199, 3087007615, 1073692671, 4128527, 4279238655, 4294902015, 4160684047, 4290246655, 469499899, 4294967231, 134086655, 4294966591, 2445279231, 3670015, 31, 4294967288, 4294705151, 3221208447, 4294902271, 4294549472, 4294921215, 4095, 4285526655, 4294966527, 4294966143, 64, 4294966719, 3774873592, 1877934080, 262151, 2555904, 536807423, 67043839, 3758096383, 3959414372, 3755993023, 2080374783, 4294835295, 4294967103, 4160749565, 4294934527, 4087, 2016, 2147446655, 184024726, 2862017156, 1593309078, 268434431, 268434414, 4294901763, 4294901761, 536870912, 2952790016, 202506752, 139264, 4026531840, 402653184, 4261412864, 63488, 1610612736, 4227922944, 49152, 65280, 3233808384, 3221225472, 65534, 61440, 57152, 4293918720, 4290772992, 25165824, 57344, 4227915776, 4278190080, 3758096384, 4227858432, 4160749568, 3758129152, 4294836224, 4194304, 251658240, 196608, 4294963200, 2143289344, 2097152, 64512, 417808, 4227923712, 12582912, 50331648, 65528, 65472, 4294967168, 15360, 4294966784, 65408, 4294965248, 16, 12288, 4294934528, 2080374784, 2013265920, 4294950912, 524288]);
|
|
233
|
+
const isIDContinue = (code) => (unicodeLookup[(code >>> 5) + 0] >>> code & 31 & 1) !== 0;
|
|
234
|
+
const isIDStart = (code) => (unicodeLookup[(code >>> 5) + 34816] >>> code & 31 & 1) !== 0;
|
|
247
235
|
|
|
248
236
|
function advanceChar(parser) {
|
|
249
237
|
parser.column++;
|
|
@@ -754,12 +742,12 @@ function skipSingleLineComment(parser, source, state, type, start, line, column)
|
|
|
754
742
|
const loc = {
|
|
755
743
|
start: {
|
|
756
744
|
line,
|
|
757
|
-
column
|
|
745
|
+
column,
|
|
758
746
|
},
|
|
759
747
|
end: {
|
|
760
748
|
line: parser.tokenLine,
|
|
761
|
-
column: parser.tokenColumn
|
|
762
|
-
}
|
|
749
|
+
column: parser.tokenColumn,
|
|
750
|
+
},
|
|
763
751
|
};
|
|
764
752
|
parser.onComment(CommentTypes[type & 0xff], source.slice(index, parser.tokenIndex), start, parser.tokenIndex, loc);
|
|
765
753
|
}
|
|
@@ -781,12 +769,12 @@ function skipMultiLineComment(parser, source, state) {
|
|
|
781
769
|
const loc = {
|
|
782
770
|
start: {
|
|
783
771
|
line: parser.tokenLine,
|
|
784
|
-
column: parser.tokenColumn
|
|
772
|
+
column: parser.tokenColumn,
|
|
785
773
|
},
|
|
786
774
|
end: {
|
|
787
775
|
line: parser.line,
|
|
788
|
-
column: parser.column
|
|
789
|
-
}
|
|
776
|
+
column: parser.column,
|
|
777
|
+
},
|
|
790
778
|
};
|
|
791
779
|
parser.onComment(CommentTypes[1 & 0xff], source.slice(index, parser.index - 2), index - 2, parser.index, loc);
|
|
792
780
|
}
|
|
@@ -1798,7 +1786,7 @@ const TokenLookup = [
|
|
|
1798
1786
|
8389702,
|
|
1799
1787
|
1074790415,
|
|
1800
1788
|
16842799,
|
|
1801
|
-
128
|
|
1789
|
+
128,
|
|
1802
1790
|
];
|
|
1803
1791
|
function nextToken(parser, context) {
|
|
1804
1792
|
parser.flags = (parser.flags | 1) ^ 1;
|
|
@@ -4255,7 +4243,7 @@ const entities = {
|
|
|
4255
4243
|
zopf: '\uD835\uDD6B',
|
|
4256
4244
|
zscr: '\uD835\uDCCF',
|
|
4257
4245
|
zwj: '\u200D',
|
|
4258
|
-
zwnj: '\u200C'
|
|
4246
|
+
zwnj: '\u200C',
|
|
4259
4247
|
};
|
|
4260
4248
|
const decodeMap = {
|
|
4261
4249
|
'0': 65533,
|
|
@@ -4285,7 +4273,7 @@ const decodeMap = {
|
|
|
4285
4273
|
'155': 8250,
|
|
4286
4274
|
'156': 339,
|
|
4287
4275
|
'158': 382,
|
|
4288
|
-
'159': 376
|
|
4276
|
+
'159': 376,
|
|
4289
4277
|
};
|
|
4290
4278
|
function decodeHTMLStrict(text) {
|
|
4291
4279
|
return text.replace(/&(?:[a-zA-Z]+|#[xX][\da-fA-F]+|#\d+);/g, (key) => {
|
|
@@ -4551,12 +4539,12 @@ function finishNode(parser, context, start, line, column, node) {
|
|
|
4551
4539
|
node.loc = {
|
|
4552
4540
|
start: {
|
|
4553
4541
|
line,
|
|
4554
|
-
column
|
|
4542
|
+
column,
|
|
4555
4543
|
},
|
|
4556
4544
|
end: {
|
|
4557
4545
|
line: parser.startLine,
|
|
4558
|
-
column: parser.startColumn
|
|
4559
|
-
}
|
|
4546
|
+
column: parser.startColumn,
|
|
4547
|
+
},
|
|
4560
4548
|
};
|
|
4561
4549
|
if (parser.sourceFile) {
|
|
4562
4550
|
node.loc.source = parser.sourceFile;
|
|
@@ -4589,26 +4577,26 @@ function recordScopeError(parser, type, ...params) {
|
|
|
4589
4577
|
column,
|
|
4590
4578
|
tokenIndex,
|
|
4591
4579
|
tokenLine,
|
|
4592
|
-
tokenColumn
|
|
4580
|
+
tokenColumn,
|
|
4593
4581
|
};
|
|
4594
4582
|
}
|
|
4595
4583
|
function createScope() {
|
|
4596
4584
|
return {
|
|
4597
4585
|
parent: void 0,
|
|
4598
|
-
type: 2
|
|
4586
|
+
type: 2,
|
|
4599
4587
|
};
|
|
4600
4588
|
}
|
|
4601
4589
|
function addChildScope(parent, type) {
|
|
4602
4590
|
return {
|
|
4603
4591
|
parent,
|
|
4604
4592
|
type,
|
|
4605
|
-
scopeError: void 0
|
|
4593
|
+
scopeError: void 0,
|
|
4606
4594
|
};
|
|
4607
4595
|
}
|
|
4608
4596
|
function addChildPrivateScope(parent) {
|
|
4609
4597
|
return {
|
|
4610
4598
|
parent,
|
|
4611
|
-
refs: Object.create(null)
|
|
4599
|
+
refs: Object.create(null),
|
|
4612
4600
|
};
|
|
4613
4601
|
}
|
|
4614
4602
|
function addVarOrBlock(parser, context, scope, name, kind, origin) {
|
|
@@ -4695,7 +4683,7 @@ function addPrivateIdentifierRef(parser, scope, name) {
|
|
|
4695
4683
|
scope.refs[name].push({
|
|
4696
4684
|
index: parser.tokenIndex,
|
|
4697
4685
|
line: parser.tokenLine,
|
|
4698
|
-
column: parser.tokenColumn
|
|
4686
|
+
column: parser.tokenColumn,
|
|
4699
4687
|
});
|
|
4700
4688
|
}
|
|
4701
4689
|
function isPrivateIdentifierDefined(name, scope) {
|
|
@@ -4730,7 +4718,7 @@ function pushComment(context, array) {
|
|
|
4730
4718
|
return function (type, value, start, end, loc) {
|
|
4731
4719
|
const comment = {
|
|
4732
4720
|
type,
|
|
4733
|
-
value
|
|
4721
|
+
value,
|
|
4734
4722
|
};
|
|
4735
4723
|
if (context & 2) {
|
|
4736
4724
|
comment.start = start;
|
|
@@ -4746,7 +4734,7 @@ function pushComment(context, array) {
|
|
|
4746
4734
|
function pushToken(context, array) {
|
|
4747
4735
|
return function (token, start, end, loc) {
|
|
4748
4736
|
const tokens = {
|
|
4749
|
-
token
|
|
4737
|
+
token,
|
|
4750
4738
|
};
|
|
4751
4739
|
if (context & 2) {
|
|
4752
4740
|
tokens.start = start;
|
|
@@ -4806,12 +4794,12 @@ function create(source, sourceFile, onComment, onToken, onInsertedSemicolon) {
|
|
|
4806
4794
|
const loc = {
|
|
4807
4795
|
start: {
|
|
4808
4796
|
line: this.tokenLine,
|
|
4809
|
-
column: this.tokenColumn
|
|
4797
|
+
column: this.tokenColumn,
|
|
4810
4798
|
},
|
|
4811
4799
|
end: {
|
|
4812
4800
|
line: this.line,
|
|
4813
|
-
column: this.column
|
|
4814
|
-
}
|
|
4801
|
+
column: this.column,
|
|
4802
|
+
},
|
|
4815
4803
|
};
|
|
4816
4804
|
if (!replaceLast && lastOnToken) {
|
|
4817
4805
|
onToken(...lastOnToken);
|
|
@@ -4837,7 +4825,7 @@ function create(source, sourceFile, onComment, onToken, onInsertedSemicolon) {
|
|
|
4837
4825
|
onComment,
|
|
4838
4826
|
onToken,
|
|
4839
4827
|
onInsertedSemicolon,
|
|
4840
|
-
leadingDecorators: []
|
|
4828
|
+
leadingDecorators: [],
|
|
4841
4829
|
};
|
|
4842
4830
|
}
|
|
4843
4831
|
function parseSource(source, options, context) {
|
|
@@ -4902,7 +4890,7 @@ function parseSource(source, options, context) {
|
|
|
4902
4890
|
const node = {
|
|
4903
4891
|
type: 'Program',
|
|
4904
4892
|
sourceType,
|
|
4905
|
-
body
|
|
4893
|
+
body,
|
|
4906
4894
|
};
|
|
4907
4895
|
if (context & 2) {
|
|
4908
4896
|
node.start = 0;
|
|
@@ -4912,7 +4900,7 @@ function parseSource(source, options, context) {
|
|
|
4912
4900
|
if (context & 4) {
|
|
4913
4901
|
node.loc = {
|
|
4914
4902
|
start: { line: 1, column: 0 },
|
|
4915
|
-
end: { line: parser.line, column: parser.column }
|
|
4903
|
+
end: { line: parser.line, column: parser.column },
|
|
4916
4904
|
};
|
|
4917
4905
|
if (parser.sourceFile)
|
|
4918
4906
|
node.loc.source = sourceFile;
|
|
@@ -5080,7 +5068,7 @@ function parseExpressionOrLabelledStatement(parser, context, scope, privateScope
|
|
|
5080
5068
|
}
|
|
5081
5069
|
return parseExpressionStatement(parser, context, expr, start, line, column);
|
|
5082
5070
|
}
|
|
5083
|
-
function parseBlock(parser, context, scope, privateScope, labels, start, line, column) {
|
|
5071
|
+
function parseBlock(parser, context, scope, privateScope, labels, start, line, column, type = 'BlockStatement') {
|
|
5084
5072
|
const body = [];
|
|
5085
5073
|
consume(parser, context | 8192, 2162700);
|
|
5086
5074
|
while (parser.getToken() !== 1074790415) {
|
|
@@ -5088,8 +5076,8 @@ function parseBlock(parser, context, scope, privateScope, labels, start, line, c
|
|
|
5088
5076
|
}
|
|
5089
5077
|
consume(parser, context | 8192, 1074790415);
|
|
5090
5078
|
return finishNode(parser, context, start, line, column, {
|
|
5091
|
-
type
|
|
5092
|
-
body
|
|
5079
|
+
type,
|
|
5080
|
+
body,
|
|
5093
5081
|
});
|
|
5094
5082
|
}
|
|
5095
5083
|
function parseReturnStatement(parser, context, privateScope, start, line, column) {
|
|
@@ -5102,14 +5090,14 @@ function parseReturnStatement(parser, context, privateScope, start, line, column
|
|
|
5102
5090
|
matchOrInsertSemicolon(parser, context | 8192);
|
|
5103
5091
|
return finishNode(parser, context, start, line, column, {
|
|
5104
5092
|
type: 'ReturnStatement',
|
|
5105
|
-
argument
|
|
5093
|
+
argument,
|
|
5106
5094
|
});
|
|
5107
5095
|
}
|
|
5108
5096
|
function parseExpressionStatement(parser, context, expression, start, line, column) {
|
|
5109
5097
|
matchOrInsertSemicolon(parser, context | 8192);
|
|
5110
5098
|
return finishNode(parser, context, start, line, column, {
|
|
5111
5099
|
type: 'ExpressionStatement',
|
|
5112
|
-
expression
|
|
5100
|
+
expression,
|
|
5113
5101
|
});
|
|
5114
5102
|
}
|
|
5115
5103
|
function parseLabelledStatement(parser, context, scope, privateScope, origin, labels, value, expr, token, allowFuncDecl, start, line, column) {
|
|
@@ -5125,7 +5113,7 @@ function parseLabelledStatement(parser, context, scope, privateScope, origin, la
|
|
|
5125
5113
|
return finishNode(parser, context, start, line, column, {
|
|
5126
5114
|
type: 'LabeledStatement',
|
|
5127
5115
|
label: expr,
|
|
5128
|
-
body
|
|
5116
|
+
body,
|
|
5129
5117
|
});
|
|
5130
5118
|
}
|
|
5131
5119
|
function parseAsyncArrowOrAsyncFunctionDeclaration(parser, context, scope, privateScope, origin, labels, allowFuncDecl, start, line, column) {
|
|
@@ -5187,17 +5175,17 @@ function parseDirective(parser, context, expression, token, start, line, column)
|
|
|
5187
5175
|
? finishNode(parser, context, start, line, column, {
|
|
5188
5176
|
type: 'ExpressionStatement',
|
|
5189
5177
|
expression,
|
|
5190
|
-
directive: parser.source.slice(start + 1, endIndex - 1)
|
|
5178
|
+
directive: parser.source.slice(start + 1, endIndex - 1),
|
|
5191
5179
|
})
|
|
5192
5180
|
: finishNode(parser, context, start, line, column, {
|
|
5193
5181
|
type: 'ExpressionStatement',
|
|
5194
|
-
expression
|
|
5182
|
+
expression,
|
|
5195
5183
|
});
|
|
5196
5184
|
}
|
|
5197
5185
|
function parseEmptyStatement(parser, context, start, line, column) {
|
|
5198
5186
|
nextToken(parser, context | 8192);
|
|
5199
5187
|
return finishNode(parser, context, start, line, column, {
|
|
5200
|
-
type: 'EmptyStatement'
|
|
5188
|
+
type: 'EmptyStatement',
|
|
5201
5189
|
});
|
|
5202
5190
|
}
|
|
5203
5191
|
function parseThrowStatement(parser, context, privateScope, start, line, column) {
|
|
@@ -5208,7 +5196,7 @@ function parseThrowStatement(parser, context, privateScope, start, line, column)
|
|
|
5208
5196
|
matchOrInsertSemicolon(parser, context | 8192);
|
|
5209
5197
|
return finishNode(parser, context, start, line, column, {
|
|
5210
5198
|
type: 'ThrowStatement',
|
|
5211
|
-
argument
|
|
5199
|
+
argument,
|
|
5212
5200
|
});
|
|
5213
5201
|
}
|
|
5214
5202
|
function parseIfStatement(parser, context, scope, privateScope, labels, start, line, column) {
|
|
@@ -5227,7 +5215,7 @@ function parseIfStatement(parser, context, scope, privateScope, labels, start, l
|
|
|
5227
5215
|
type: 'IfStatement',
|
|
5228
5216
|
test,
|
|
5229
5217
|
consequent,
|
|
5230
|
-
alternate
|
|
5218
|
+
alternate,
|
|
5231
5219
|
});
|
|
5232
5220
|
}
|
|
5233
5221
|
function parseConsequentOrAlternative(parser, context, scope, privateScope, labels, start, line, column) {
|
|
@@ -5265,20 +5253,20 @@ function parseSwitchStatement(parser, context, scope, privateScope, labels, star
|
|
|
5265
5253
|
parser.getToken() !== 1074790415 &&
|
|
5266
5254
|
parser.getToken() !== 20561) {
|
|
5267
5255
|
consequent.push(parseStatementListItem(parser, context | 1024, scope, privateScope, 2, {
|
|
5268
|
-
$: labels
|
|
5256
|
+
$: labels,
|
|
5269
5257
|
}));
|
|
5270
5258
|
}
|
|
5271
5259
|
cases.push(finishNode(parser, context, tokenIndex, tokenLine, tokenColumn, {
|
|
5272
5260
|
type: 'SwitchCase',
|
|
5273
5261
|
test,
|
|
5274
|
-
consequent
|
|
5262
|
+
consequent,
|
|
5275
5263
|
}));
|
|
5276
5264
|
}
|
|
5277
5265
|
consume(parser, context | 8192, 1074790415);
|
|
5278
5266
|
return finishNode(parser, context, start, line, column, {
|
|
5279
5267
|
type: 'SwitchStatement',
|
|
5280
5268
|
discriminant,
|
|
5281
|
-
cases
|
|
5269
|
+
cases,
|
|
5282
5270
|
});
|
|
5283
5271
|
}
|
|
5284
5272
|
function parseWhileStatement(parser, context, scope, privateScope, labels, start, line, column) {
|
|
@@ -5290,7 +5278,7 @@ function parseWhileStatement(parser, context, scope, privateScope, labels, start
|
|
|
5290
5278
|
return finishNode(parser, context, start, line, column, {
|
|
5291
5279
|
type: 'WhileStatement',
|
|
5292
5280
|
test,
|
|
5293
|
-
body
|
|
5281
|
+
body,
|
|
5294
5282
|
});
|
|
5295
5283
|
}
|
|
5296
5284
|
function parseIterationStatementBody(parser, context, scope, privateScope, labels) {
|
|
@@ -5310,7 +5298,7 @@ function parseContinueStatement(parser, context, labels, start, line, column) {
|
|
|
5310
5298
|
matchOrInsertSemicolon(parser, context | 8192);
|
|
5311
5299
|
return finishNode(parser, context, start, line, column, {
|
|
5312
5300
|
type: 'ContinueStatement',
|
|
5313
|
-
label
|
|
5301
|
+
label,
|
|
5314
5302
|
});
|
|
5315
5303
|
}
|
|
5316
5304
|
function parseBreakStatement(parser, context, labels, start, line, column) {
|
|
@@ -5328,7 +5316,7 @@ function parseBreakStatement(parser, context, labels, start, line, column) {
|
|
|
5328
5316
|
matchOrInsertSemicolon(parser, context | 8192);
|
|
5329
5317
|
return finishNode(parser, context, start, line, column, {
|
|
5330
5318
|
type: 'BreakStatement',
|
|
5331
|
-
label
|
|
5319
|
+
label,
|
|
5332
5320
|
});
|
|
5333
5321
|
}
|
|
5334
5322
|
function parseWithStatement(parser, context, scope, privateScope, labels, start, line, column) {
|
|
@@ -5342,14 +5330,14 @@ function parseWithStatement(parser, context, scope, privateScope, labels, start,
|
|
|
5342
5330
|
return finishNode(parser, context, start, line, column, {
|
|
5343
5331
|
type: 'WithStatement',
|
|
5344
5332
|
object,
|
|
5345
|
-
body
|
|
5333
|
+
body,
|
|
5346
5334
|
});
|
|
5347
5335
|
}
|
|
5348
5336
|
function parseDebuggerStatement(parser, context, start, line, column) {
|
|
5349
5337
|
nextToken(parser, context | 8192);
|
|
5350
5338
|
matchOrInsertSemicolon(parser, context | 8192);
|
|
5351
5339
|
return finishNode(parser, context, start, line, column, {
|
|
5352
|
-
type: 'DebuggerStatement'
|
|
5340
|
+
type: 'DebuggerStatement',
|
|
5353
5341
|
});
|
|
5354
5342
|
}
|
|
5355
5343
|
function parseTryStatement(parser, context, scope, privateScope, labels, start, line, column) {
|
|
@@ -5364,7 +5352,8 @@ function parseTryStatement(parser, context, scope, privateScope, labels, start,
|
|
|
5364
5352
|
if (parser.getToken() === 20566) {
|
|
5365
5353
|
nextToken(parser, context | 8192);
|
|
5366
5354
|
const finalizerScope = firstScope ? addChildScope(scope, 4) : void 0;
|
|
5367
|
-
|
|
5355
|
+
const block = parseBlock(parser, context, finalizerScope, privateScope, { $: labels }, parser.tokenIndex, parser.tokenLine, parser.tokenColumn);
|
|
5356
|
+
finalizer = block;
|
|
5368
5357
|
}
|
|
5369
5358
|
if (!handler && !finalizer) {
|
|
5370
5359
|
report(parser, 88);
|
|
@@ -5373,7 +5362,7 @@ function parseTryStatement(parser, context, scope, privateScope, labels, start,
|
|
|
5373
5362
|
type: 'TryStatement',
|
|
5374
5363
|
block,
|
|
5375
5364
|
handler,
|
|
5376
|
-
finalizer
|
|
5365
|
+
finalizer,
|
|
5377
5366
|
});
|
|
5378
5367
|
}
|
|
5379
5368
|
function parseCatchBlock(parser, context, scope, privateScope, labels, start, line, column) {
|
|
@@ -5399,7 +5388,7 @@ function parseCatchBlock(parser, context, scope, privateScope, labels, start, li
|
|
|
5399
5388
|
return finishNode(parser, context, start, line, column, {
|
|
5400
5389
|
type: 'CatchClause',
|
|
5401
5390
|
param,
|
|
5402
|
-
body
|
|
5391
|
+
body,
|
|
5403
5392
|
});
|
|
5404
5393
|
}
|
|
5405
5394
|
function parseStaticBlock(parser, context, scope, privateScope, start, line, column) {
|
|
@@ -5412,11 +5401,7 @@ function parseStaticBlock(parser, context, scope, privateScope, start, line, col
|
|
|
5412
5401
|
524288 |
|
|
5413
5402
|
268435456 |
|
|
5414
5403
|
16777216;
|
|
5415
|
-
|
|
5416
|
-
return finishNode(parser, context, start, line, column, {
|
|
5417
|
-
type: 'StaticBlock',
|
|
5418
|
-
body
|
|
5419
|
-
});
|
|
5404
|
+
return parseBlock(parser, context, scope, privateScope, {}, start, line, column, 'StaticBlock');
|
|
5420
5405
|
}
|
|
5421
5406
|
function parseDoWhileStatement(parser, context, scope, privateScope, labels, start, line, column) {
|
|
5422
5407
|
nextToken(parser, context | 8192);
|
|
@@ -5429,7 +5414,7 @@ function parseDoWhileStatement(parser, context, scope, privateScope, labels, sta
|
|
|
5429
5414
|
return finishNode(parser, context, start, line, column, {
|
|
5430
5415
|
type: 'DoWhileStatement',
|
|
5431
5416
|
body,
|
|
5432
|
-
test
|
|
5417
|
+
test,
|
|
5433
5418
|
});
|
|
5434
5419
|
}
|
|
5435
5420
|
function parseLetIdentOrVarDeclarationStatement(parser, context, scope, privateScope, origin, start, line, column) {
|
|
@@ -5442,7 +5427,7 @@ function parseLetIdentOrVarDeclarationStatement(parser, context, scope, privateS
|
|
|
5442
5427
|
return finishNode(parser, context, start, line, column, {
|
|
5443
5428
|
type: 'VariableDeclaration',
|
|
5444
5429
|
kind: 'let',
|
|
5445
|
-
declarations
|
|
5430
|
+
declarations,
|
|
5446
5431
|
});
|
|
5447
5432
|
}
|
|
5448
5433
|
parser.assignable = 1;
|
|
@@ -5474,7 +5459,7 @@ function parseLexicalDeclaration(parser, context, scope, privateScope, kind, ori
|
|
|
5474
5459
|
return finishNode(parser, context, start, line, column, {
|
|
5475
5460
|
type: 'VariableDeclaration',
|
|
5476
5461
|
kind: kind & 8 ? 'let' : 'const',
|
|
5477
|
-
declarations
|
|
5462
|
+
declarations,
|
|
5478
5463
|
});
|
|
5479
5464
|
}
|
|
5480
5465
|
function parseVariableStatement(parser, context, scope, privateScope, origin, start, line, column) {
|
|
@@ -5484,13 +5469,13 @@ function parseVariableStatement(parser, context, scope, privateScope, origin, st
|
|
|
5484
5469
|
return finishNode(parser, context, start, line, column, {
|
|
5485
5470
|
type: 'VariableDeclaration',
|
|
5486
5471
|
kind: 'var',
|
|
5487
|
-
declarations
|
|
5472
|
+
declarations,
|
|
5488
5473
|
});
|
|
5489
5474
|
}
|
|
5490
5475
|
function parseVariableDeclarationList(parser, context, scope, privateScope, kind, origin) {
|
|
5491
5476
|
let bindingCount = 1;
|
|
5492
5477
|
const list = [
|
|
5493
|
-
parseVariableDeclaration(parser, context, scope, privateScope, kind, origin)
|
|
5478
|
+
parseVariableDeclaration(parser, context, scope, privateScope, kind, origin),
|
|
5494
5479
|
];
|
|
5495
5480
|
while (consumeOpt(parser, context, 18)) {
|
|
5496
5481
|
bindingCount++;
|
|
@@ -5524,7 +5509,7 @@ function parseVariableDeclaration(parser, context, scope, privateScope, kind, or
|
|
|
5524
5509
|
return finishNode(parser, context, tokenIndex, tokenLine, tokenColumn, {
|
|
5525
5510
|
type: 'VariableDeclarator',
|
|
5526
5511
|
id,
|
|
5527
|
-
init
|
|
5512
|
+
init,
|
|
5528
5513
|
});
|
|
5529
5514
|
}
|
|
5530
5515
|
function parseForStatement(parser, context, scope, privateScope, labels, start, line, column) {
|
|
@@ -5556,7 +5541,7 @@ function parseForStatement(parser, context, scope, privateScope, labels, start,
|
|
|
5556
5541
|
init = finishNode(parser, context, tokenIndex, tokenLine, tokenColumn, {
|
|
5557
5542
|
type: 'VariableDeclaration',
|
|
5558
5543
|
kind: 'let',
|
|
5559
|
-
declarations: parseVariableDeclarationList(parser, context | 33554432, scope, privateScope, 8, 32)
|
|
5544
|
+
declarations: parseVariableDeclarationList(parser, context | 33554432, scope, privateScope, 8, 32),
|
|
5560
5545
|
});
|
|
5561
5546
|
}
|
|
5562
5547
|
parser.assignable = 1;
|
|
@@ -5578,12 +5563,12 @@ function parseForStatement(parser, context, scope, privateScope, labels, start,
|
|
|
5578
5563
|
? {
|
|
5579
5564
|
type: 'VariableDeclaration',
|
|
5580
5565
|
kind: 'var',
|
|
5581
|
-
declarations: parseVariableDeclarationList(parser, context | 33554432, scope, privateScope, 4, 32)
|
|
5566
|
+
declarations: parseVariableDeclarationList(parser, context | 33554432, scope, privateScope, 4, 32),
|
|
5582
5567
|
}
|
|
5583
5568
|
: {
|
|
5584
5569
|
type: 'VariableDeclaration',
|
|
5585
5570
|
kind: 'const',
|
|
5586
|
-
declarations: parseVariableDeclarationList(parser, context | 33554432, scope, privateScope, 16, 32)
|
|
5571
|
+
declarations: parseVariableDeclarationList(parser, context | 33554432, scope, privateScope, 16, 32),
|
|
5587
5572
|
});
|
|
5588
5573
|
parser.assignable = 1;
|
|
5589
5574
|
}
|
|
@@ -5622,7 +5607,7 @@ function parseForStatement(parser, context, scope, privateScope, labels, start,
|
|
|
5622
5607
|
left: init,
|
|
5623
5608
|
right,
|
|
5624
5609
|
body,
|
|
5625
|
-
await: forAwait
|
|
5610
|
+
await: forAwait,
|
|
5626
5611
|
});
|
|
5627
5612
|
}
|
|
5628
5613
|
if (parser.assignable & 2)
|
|
@@ -5638,7 +5623,7 @@ function parseForStatement(parser, context, scope, privateScope, labels, start,
|
|
|
5638
5623
|
type: 'ForInStatement',
|
|
5639
5624
|
body,
|
|
5640
5625
|
left: init,
|
|
5641
|
-
right
|
|
5626
|
+
right,
|
|
5642
5627
|
});
|
|
5643
5628
|
}
|
|
5644
5629
|
if (forAwait)
|
|
@@ -5664,7 +5649,7 @@ function parseForStatement(parser, context, scope, privateScope, labels, start,
|
|
|
5664
5649
|
init,
|
|
5665
5650
|
test,
|
|
5666
5651
|
update,
|
|
5667
|
-
body
|
|
5652
|
+
body,
|
|
5668
5653
|
});
|
|
5669
5654
|
}
|
|
5670
5655
|
function parseRestrictedIdentifier(parser, context, scope) {
|
|
@@ -5693,8 +5678,8 @@ function parseImportDeclaration(parser, context, scope) {
|
|
|
5693
5678
|
specifiers = [
|
|
5694
5679
|
finishNode(parser, context, tokenIndex, tokenLine, tokenColumn, {
|
|
5695
5680
|
type: 'ImportDefaultSpecifier',
|
|
5696
|
-
local
|
|
5697
|
-
})
|
|
5681
|
+
local,
|
|
5682
|
+
}),
|
|
5698
5683
|
];
|
|
5699
5684
|
if (consumeOpt(parser, context, 18)) {
|
|
5700
5685
|
switch (parser.getToken()) {
|
|
@@ -5727,14 +5712,13 @@ function parseImportDeclaration(parser, context, scope) {
|
|
|
5727
5712
|
}
|
|
5728
5713
|
source = parseModuleSpecifier(parser, context);
|
|
5729
5714
|
}
|
|
5715
|
+
const attributes = parseImportAttributes(parser, context, specifiers);
|
|
5730
5716
|
const node = {
|
|
5731
5717
|
type: 'ImportDeclaration',
|
|
5732
5718
|
specifiers,
|
|
5733
|
-
source
|
|
5719
|
+
source,
|
|
5720
|
+
attributes,
|
|
5734
5721
|
};
|
|
5735
|
-
if (context & 1) {
|
|
5736
|
-
node.attributes = parseImportAttributes(parser, context, specifiers);
|
|
5737
|
-
}
|
|
5738
5722
|
matchOrInsertSemicolon(parser, context | 8192);
|
|
5739
5723
|
return finishNode(parser, context, start, line, column, node);
|
|
5740
5724
|
}
|
|
@@ -5747,7 +5731,7 @@ function parseImportNamespaceSpecifier(parser, context, scope) {
|
|
|
5747
5731
|
}
|
|
5748
5732
|
return finishNode(parser, context, tokenIndex, tokenLine, tokenColumn, {
|
|
5749
5733
|
type: 'ImportNamespaceSpecifier',
|
|
5750
|
-
local: parseRestrictedIdentifier(parser, context, scope)
|
|
5734
|
+
local: parseRestrictedIdentifier(parser, context, scope),
|
|
5751
5735
|
});
|
|
5752
5736
|
}
|
|
5753
5737
|
function parseModuleSpecifier(parser, context) {
|
|
@@ -5786,7 +5770,7 @@ function parseImportSpecifierOrNamedImports(parser, context, scope, specifiers)
|
|
|
5786
5770
|
specifiers.push(finishNode(parser, context, tokenIndex, tokenLine, tokenColumn, {
|
|
5787
5771
|
type: 'ImportSpecifier',
|
|
5788
5772
|
local,
|
|
5789
|
-
imported
|
|
5773
|
+
imported,
|
|
5790
5774
|
}));
|
|
5791
5775
|
if (parser.getToken() !== 1074790415)
|
|
5792
5776
|
consume(parser, context, 18);
|
|
@@ -5797,7 +5781,7 @@ function parseImportSpecifierOrNamedImports(parser, context, scope, specifiers)
|
|
|
5797
5781
|
function parseImportMetaDeclaration(parser, context, start, line, column) {
|
|
5798
5782
|
let expr = parseImportMetaExpression(parser, context, finishNode(parser, context, start, line, column, {
|
|
5799
5783
|
type: 'Identifier',
|
|
5800
|
-
name: 'import'
|
|
5784
|
+
name: 'import',
|
|
5801
5785
|
}), start, line, column);
|
|
5802
5786
|
expr = parseMemberOrUpdateExpression(parser, context, undefined, expr, 0, 0, start, line, column);
|
|
5803
5787
|
expr = parseAssignmentExpression(parser, context, undefined, 0, 0, start, line, column, expr);
|
|
@@ -5822,7 +5806,7 @@ function parseExportDeclaration(parser, context, scope) {
|
|
|
5822
5806
|
const specifiers = [];
|
|
5823
5807
|
let declaration = null;
|
|
5824
5808
|
let source = null;
|
|
5825
|
-
let attributes =
|
|
5809
|
+
let attributes = [];
|
|
5826
5810
|
if (consumeOpt(parser, context | 8192, 20561)) {
|
|
5827
5811
|
switch (parser.getToken()) {
|
|
5828
5812
|
case 86104: {
|
|
@@ -5865,7 +5849,7 @@ function parseExportDeclaration(parser, context, scope) {
|
|
|
5865
5849
|
declareUnboundVariable(parser, 'default');
|
|
5866
5850
|
return finishNode(parser, context, start, line, column, {
|
|
5867
5851
|
type: 'ExportDefaultDeclaration',
|
|
5868
|
-
declaration
|
|
5852
|
+
declaration,
|
|
5869
5853
|
});
|
|
5870
5854
|
}
|
|
5871
5855
|
switch (parser.getToken()) {
|
|
@@ -5882,14 +5866,13 @@ function parseExportDeclaration(parser, context, scope) {
|
|
|
5882
5866
|
if (parser.getToken() !== 134283267)
|
|
5883
5867
|
report(parser, 105, 'Export');
|
|
5884
5868
|
source = parseLiteral(parser, context);
|
|
5869
|
+
const attributes = parseImportAttributes(parser, context);
|
|
5885
5870
|
const node = {
|
|
5886
5871
|
type: 'ExportAllDeclaration',
|
|
5887
5872
|
source,
|
|
5888
|
-
exported
|
|
5873
|
+
exported,
|
|
5874
|
+
attributes,
|
|
5889
5875
|
};
|
|
5890
|
-
if (context & 1) {
|
|
5891
|
-
node.attributes = parseImportAttributes(parser, context);
|
|
5892
|
-
}
|
|
5893
5876
|
matchOrInsertSemicolon(parser, context | 8192);
|
|
5894
5877
|
return finishNode(parser, context, start, line, column, node);
|
|
5895
5878
|
}
|
|
@@ -5926,7 +5909,7 @@ function parseExportDeclaration(parser, context, scope) {
|
|
|
5926
5909
|
specifiers.push(finishNode(parser, context, tokenIndex, tokenLine, tokenColumn, {
|
|
5927
5910
|
type: 'ExportSpecifier',
|
|
5928
5911
|
local,
|
|
5929
|
-
exported
|
|
5912
|
+
exported,
|
|
5930
5913
|
}));
|
|
5931
5914
|
if (parser.getToken() !== 1074790415)
|
|
5932
5915
|
consume(parser, context, 18);
|
|
@@ -5936,9 +5919,7 @@ function parseExportDeclaration(parser, context, scope) {
|
|
|
5936
5919
|
if (parser.getToken() !== 134283267)
|
|
5937
5920
|
report(parser, 105, 'Export');
|
|
5938
5921
|
source = parseLiteral(parser, context);
|
|
5939
|
-
|
|
5940
|
-
attributes = parseImportAttributes(parser, context, specifiers);
|
|
5941
|
-
}
|
|
5922
|
+
attributes = parseImportAttributes(parser, context, specifiers);
|
|
5942
5923
|
if (scope) {
|
|
5943
5924
|
tmpExportedNames.forEach((n) => declareUnboundVariable(parser, n));
|
|
5944
5925
|
}
|
|
@@ -5985,11 +5966,9 @@ function parseExportDeclaration(parser, context, scope) {
|
|
|
5985
5966
|
type: 'ExportNamedDeclaration',
|
|
5986
5967
|
declaration,
|
|
5987
5968
|
specifiers,
|
|
5988
|
-
source
|
|
5969
|
+
source,
|
|
5970
|
+
attributes: attributes,
|
|
5989
5971
|
};
|
|
5990
|
-
if (attributes) {
|
|
5991
|
-
node.attributes = attributes;
|
|
5992
|
-
}
|
|
5993
5972
|
return finishNode(parser, context, start, line, column, node);
|
|
5994
5973
|
}
|
|
5995
5974
|
function parseExpression(parser, context, privateScope, canAssign, inGroup, start, line, column) {
|
|
@@ -6004,7 +5983,7 @@ function parseSequenceExpression(parser, context, privateScope, inGroup, start,
|
|
|
6004
5983
|
}
|
|
6005
5984
|
return finishNode(parser, context, start, line, column, {
|
|
6006
5985
|
type: 'SequenceExpression',
|
|
6007
|
-
expressions
|
|
5986
|
+
expressions,
|
|
6008
5987
|
});
|
|
6009
5988
|
}
|
|
6010
5989
|
function parseExpressions(parser, context, privateScope, inGroup, canAssign, start, line, column) {
|
|
@@ -6029,13 +6008,13 @@ function parseAssignmentExpression(parser, context, privateScope, inGroup, isPat
|
|
|
6029
6008
|
? {
|
|
6030
6009
|
type: 'AssignmentPattern',
|
|
6031
6010
|
left,
|
|
6032
|
-
right
|
|
6011
|
+
right,
|
|
6033
6012
|
}
|
|
6034
6013
|
: {
|
|
6035
6014
|
type: 'AssignmentExpression',
|
|
6036
6015
|
left,
|
|
6037
6016
|
operator: KeywordDescTable[token & 255],
|
|
6038
|
-
right
|
|
6017
|
+
right,
|
|
6039
6018
|
});
|
|
6040
6019
|
}
|
|
6041
6020
|
if ((token & 8388608) === 8388608) {
|
|
@@ -6054,13 +6033,13 @@ function parseAssignmentExpressionOrPattern(parser, context, privateScope, inGro
|
|
|
6054
6033
|
? {
|
|
6055
6034
|
type: 'AssignmentPattern',
|
|
6056
6035
|
left,
|
|
6057
|
-
right
|
|
6036
|
+
right,
|
|
6058
6037
|
}
|
|
6059
6038
|
: {
|
|
6060
6039
|
type: 'AssignmentExpression',
|
|
6061
6040
|
left,
|
|
6062
6041
|
operator: KeywordDescTable[token & 255],
|
|
6063
|
-
right
|
|
6042
|
+
right,
|
|
6064
6043
|
});
|
|
6065
6044
|
parser.assignable = 2;
|
|
6066
6045
|
return left;
|
|
@@ -6075,28 +6054,28 @@ function parseConditionalExpression(parser, context, privateScope, test, start,
|
|
|
6075
6054
|
type: 'ConditionalExpression',
|
|
6076
6055
|
test,
|
|
6077
6056
|
consequent,
|
|
6078
|
-
alternate
|
|
6057
|
+
alternate,
|
|
6079
6058
|
});
|
|
6080
6059
|
}
|
|
6081
|
-
function parseBinaryExpression(parser, context, privateScope, inGroup, start, line, column,
|
|
6060
|
+
function parseBinaryExpression(parser, context, privateScope, inGroup, start, line, column, minPrecedence, operator, left) {
|
|
6082
6061
|
const bit = -((context & 33554432) > 0) & 8673330;
|
|
6083
6062
|
let t;
|
|
6084
|
-
let
|
|
6063
|
+
let precedence;
|
|
6085
6064
|
parser.assignable = 2;
|
|
6086
6065
|
while (parser.getToken() & 8388608) {
|
|
6087
6066
|
t = parser.getToken();
|
|
6088
|
-
|
|
6067
|
+
precedence = t & 3840;
|
|
6089
6068
|
if ((t & 524288 && operator & 268435456) || (operator & 524288 && t & 268435456)) {
|
|
6090
6069
|
report(parser, 165);
|
|
6091
6070
|
}
|
|
6092
|
-
if (
|
|
6071
|
+
if (precedence + ((t === 8391735) << 8) - ((bit === t) << 12) <= minPrecedence)
|
|
6093
6072
|
break;
|
|
6094
6073
|
nextToken(parser, context | 8192);
|
|
6095
6074
|
left = finishNode(parser, context, start, line, column, {
|
|
6096
6075
|
type: t & 524288 || t & 268435456 ? 'LogicalExpression' : 'BinaryExpression',
|
|
6097
6076
|
left,
|
|
6098
|
-
right: parseBinaryExpression(parser, context, privateScope, inGroup, parser.tokenIndex, parser.tokenLine, parser.tokenColumn,
|
|
6099
|
-
operator: KeywordDescTable[t & 255]
|
|
6077
|
+
right: parseBinaryExpression(parser, context, privateScope, inGroup, parser.tokenIndex, parser.tokenLine, parser.tokenColumn, precedence, t, parseLeftHandSideExpression(parser, context, privateScope, 0, inGroup, 1, parser.tokenIndex, parser.tokenLine, parser.tokenColumn)),
|
|
6078
|
+
operator: KeywordDescTable[t & 255],
|
|
6100
6079
|
});
|
|
6101
6080
|
}
|
|
6102
6081
|
if (parser.getToken() === 1077936155)
|
|
@@ -6124,7 +6103,7 @@ function parseUnaryExpression(parser, context, privateScope, isLHS, start, line,
|
|
|
6124
6103
|
type: 'UnaryExpression',
|
|
6125
6104
|
operator: KeywordDescTable[unaryOperator & 255],
|
|
6126
6105
|
argument: arg,
|
|
6127
|
-
prefix: true
|
|
6106
|
+
prefix: true,
|
|
6128
6107
|
});
|
|
6129
6108
|
}
|
|
6130
6109
|
function parseAsyncExpression(parser, context, privateScope, inGroup, isLHS, canAssign, inNew, start, line, column) {
|
|
@@ -6185,7 +6164,7 @@ function parseYieldExpressionOrIdentifier(parser, context, privateScope, inGroup
|
|
|
6185
6164
|
return finishNode(parser, context, start, line, column, {
|
|
6186
6165
|
type: 'YieldExpression',
|
|
6187
6166
|
argument,
|
|
6188
|
-
delegate
|
|
6167
|
+
delegate,
|
|
6189
6168
|
});
|
|
6190
6169
|
}
|
|
6191
6170
|
if (context & 256)
|
|
@@ -6197,8 +6176,8 @@ function parseAwaitExpressionOrIdentifier(parser, context, privateScope, inNew,
|
|
|
6197
6176
|
parser.destructible |= 128;
|
|
6198
6177
|
if (context & 268435456)
|
|
6199
6178
|
report(parser, 177);
|
|
6200
|
-
const
|
|
6201
|
-
const isIdentifier =
|
|
6179
|
+
const possibleIdentifierOrArrowFunc = parseIdentifierOrArrow(parser, context, privateScope, start, line, column);
|
|
6180
|
+
const isIdentifier = possibleIdentifierOrArrowFunc.type === 'ArrowFunctionExpression' ||
|
|
6202
6181
|
(parser.getToken() & 65536) === 0;
|
|
6203
6182
|
if (isIdentifier) {
|
|
6204
6183
|
if (context & 524288)
|
|
@@ -6207,7 +6186,7 @@ function parseAwaitExpressionOrIdentifier(parser, context, privateScope, inNew,
|
|
|
6207
6186
|
reportMessageAt(start, line, column, parser.startIndex, parser.startLine, parser.startColumn, 110);
|
|
6208
6187
|
if (context & 2097152 && context & 524288)
|
|
6209
6188
|
reportMessageAt(start, line, column, parser.startIndex, parser.startLine, parser.startColumn, 110);
|
|
6210
|
-
return
|
|
6189
|
+
return possibleIdentifierOrArrowFunc;
|
|
6211
6190
|
}
|
|
6212
6191
|
if (context & 2097152) {
|
|
6213
6192
|
reportMessageAt(start, line, column, parser.startIndex, parser.startLine, parser.startColumn, 31);
|
|
@@ -6221,12 +6200,12 @@ function parseAwaitExpressionOrIdentifier(parser, context, privateScope, inNew,
|
|
|
6221
6200
|
parser.assignable = 2;
|
|
6222
6201
|
return finishNode(parser, context, start, line, column, {
|
|
6223
6202
|
type: 'AwaitExpression',
|
|
6224
|
-
argument
|
|
6203
|
+
argument,
|
|
6225
6204
|
});
|
|
6226
6205
|
}
|
|
6227
6206
|
if (context & 512)
|
|
6228
6207
|
reportMessageAt(start, line, column, parser.startIndex, parser.startLine, parser.startColumn, 98);
|
|
6229
|
-
return
|
|
6208
|
+
return possibleIdentifierOrArrowFunc;
|
|
6230
6209
|
}
|
|
6231
6210
|
function parseFunctionBody(parser, context, scope, privateScope, origin, funcNameToken, scopeError) {
|
|
6232
6211
|
const { tokenIndex, tokenLine, tokenColumn } = parser;
|
|
@@ -6281,7 +6260,7 @@ function parseFunctionBody(parser, context, scope, privateScope, origin, funcNam
|
|
|
6281
6260
|
report(parser, 26);
|
|
6282
6261
|
return finishNode(parser, context, tokenIndex, tokenLine, tokenColumn, {
|
|
6283
6262
|
type: 'BlockStatement',
|
|
6284
|
-
body
|
|
6263
|
+
body,
|
|
6285
6264
|
});
|
|
6286
6265
|
}
|
|
6287
6266
|
function parseSuperExpression(parser, context, start, line, column) {
|
|
@@ -6321,7 +6300,7 @@ function parseUpdateExpression(parser, context, expr, start, line, column) {
|
|
|
6321
6300
|
type: 'UpdateExpression',
|
|
6322
6301
|
argument: expr,
|
|
6323
6302
|
operator: KeywordDescTable[token & 255],
|
|
6324
|
-
prefix: false
|
|
6303
|
+
prefix: false,
|
|
6325
6304
|
});
|
|
6326
6305
|
}
|
|
6327
6306
|
function parseMemberOrUpdateExpression(parser, context, privateScope, expr, inGroup, inChain, start, line, column) {
|
|
@@ -6342,7 +6321,7 @@ function parseMemberOrUpdateExpression(parser, context, privateScope, expr, inGr
|
|
|
6342
6321
|
type: 'MemberExpression',
|
|
6343
6322
|
object: expr,
|
|
6344
6323
|
computed: false,
|
|
6345
|
-
property
|
|
6324
|
+
property,
|
|
6346
6325
|
});
|
|
6347
6326
|
break;
|
|
6348
6327
|
}
|
|
@@ -6361,7 +6340,7 @@ function parseMemberOrUpdateExpression(parser, context, privateScope, expr, inGr
|
|
|
6361
6340
|
type: 'MemberExpression',
|
|
6362
6341
|
object: expr,
|
|
6363
6342
|
computed: true,
|
|
6364
|
-
property
|
|
6343
|
+
property,
|
|
6365
6344
|
});
|
|
6366
6345
|
if (restoreHasOptionalChaining) {
|
|
6367
6346
|
parser.flags |= 2048;
|
|
@@ -6383,7 +6362,7 @@ function parseMemberOrUpdateExpression(parser, context, privateScope, expr, inGr
|
|
|
6383
6362
|
expr = finishNode(parser, context, start, line, column, {
|
|
6384
6363
|
type: 'CallExpression',
|
|
6385
6364
|
callee: expr,
|
|
6386
|
-
arguments: args
|
|
6365
|
+
arguments: args,
|
|
6387
6366
|
});
|
|
6388
6367
|
if (restoreHasOptionalChaining) {
|
|
6389
6368
|
parser.flags |= 2048;
|
|
@@ -6407,7 +6386,7 @@ function parseMemberOrUpdateExpression(parser, context, privateScope, expr, inGr
|
|
|
6407
6386
|
tag: expr,
|
|
6408
6387
|
quasi: parser.getToken() === 67174408
|
|
6409
6388
|
? parseTemplate(parser, context | 16384, privateScope)
|
|
6410
|
-
: parseTemplateLiteral(parser, context, parser.tokenIndex, parser.tokenLine, parser.tokenColumn)
|
|
6389
|
+
: parseTemplateLiteral(parser, context, parser.tokenIndex, parser.tokenLine, parser.tokenColumn),
|
|
6411
6390
|
});
|
|
6412
6391
|
}
|
|
6413
6392
|
expr = parseMemberOrUpdateExpression(parser, context, privateScope, expr, 0, 1, start, line, column);
|
|
@@ -6416,7 +6395,7 @@ function parseMemberOrUpdateExpression(parser, context, privateScope, expr, inGr
|
|
|
6416
6395
|
parser.flags = (parser.flags | 2048) ^ 2048;
|
|
6417
6396
|
expr = finishNode(parser, context, start, line, column, {
|
|
6418
6397
|
type: 'ChainExpression',
|
|
6419
|
-
expression: expr
|
|
6398
|
+
expression: expr,
|
|
6420
6399
|
});
|
|
6421
6400
|
}
|
|
6422
6401
|
return expr;
|
|
@@ -6441,7 +6420,7 @@ function parseOptionalChain(parser, context, privateScope, expr, start, line, co
|
|
|
6441
6420
|
object: expr,
|
|
6442
6421
|
computed: true,
|
|
6443
6422
|
optional: true,
|
|
6444
|
-
property
|
|
6423
|
+
property,
|
|
6445
6424
|
});
|
|
6446
6425
|
}
|
|
6447
6426
|
else if (parser.getToken() === 67174411) {
|
|
@@ -6451,7 +6430,7 @@ function parseOptionalChain(parser, context, privateScope, expr, start, line, co
|
|
|
6451
6430
|
type: 'CallExpression',
|
|
6452
6431
|
callee: expr,
|
|
6453
6432
|
arguments: args,
|
|
6454
|
-
optional: true
|
|
6433
|
+
optional: true,
|
|
6455
6434
|
});
|
|
6456
6435
|
}
|
|
6457
6436
|
else {
|
|
@@ -6462,7 +6441,7 @@ function parseOptionalChain(parser, context, privateScope, expr, start, line, co
|
|
|
6462
6441
|
object: expr,
|
|
6463
6442
|
computed: false,
|
|
6464
6443
|
optional: true,
|
|
6465
|
-
property
|
|
6444
|
+
property,
|
|
6466
6445
|
});
|
|
6467
6446
|
}
|
|
6468
6447
|
if (restoreHasOptionalChaining) {
|
|
@@ -6497,7 +6476,7 @@ function parseUpdateExpressionPrefixed(parser, context, privateScope, inNew, isL
|
|
|
6497
6476
|
type: 'UpdateExpression',
|
|
6498
6477
|
argument: arg,
|
|
6499
6478
|
operator: KeywordDescTable[token & 255],
|
|
6500
|
-
prefix: true
|
|
6479
|
+
prefix: true,
|
|
6501
6480
|
});
|
|
6502
6481
|
}
|
|
6503
6482
|
function parsePrimaryExpression(parser, context, privateScope, kind, inNew, canAssign, inGroup, isLHS, start, line, column) {
|
|
@@ -6622,7 +6601,7 @@ function parseImportMetaExpression(parser, context, meta, start, line, column) {
|
|
|
6622
6601
|
return finishNode(parser, context, start, line, column, {
|
|
6623
6602
|
type: 'MetaProperty',
|
|
6624
6603
|
meta,
|
|
6625
|
-
property: parseIdentifier(parser, context)
|
|
6604
|
+
property: parseIdentifier(parser, context),
|
|
6626
6605
|
});
|
|
6627
6606
|
}
|
|
6628
6607
|
function parseImportExpression(parser, context, privateScope, inGroup, start, line, column) {
|
|
@@ -6630,22 +6609,20 @@ function parseImportExpression(parser, context, privateScope, inGroup, start, li
|
|
|
6630
6609
|
if (parser.getToken() === 14)
|
|
6631
6610
|
report(parser, 143);
|
|
6632
6611
|
const source = parseExpression(parser, context, privateScope, 1, inGroup, parser.tokenIndex, parser.tokenLine, parser.tokenColumn);
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
if (parser.getToken() === 18) {
|
|
6640
|
-
consume(parser, context, 18);
|
|
6641
|
-
if (parser.getToken() !== 16) {
|
|
6642
|
-
const expContext = (context | 33554432) ^ 33554432;
|
|
6643
|
-
options = parseExpression(parser, expContext, privateScope, 1, inGroup, parser.tokenIndex, parser.tokenLine, parser.tokenColumn);
|
|
6644
|
-
}
|
|
6612
|
+
let options = null;
|
|
6613
|
+
if (parser.getToken() === 18) {
|
|
6614
|
+
consume(parser, context, 18);
|
|
6615
|
+
if (parser.getToken() !== 16) {
|
|
6616
|
+
const expContext = (context | 33554432) ^ 33554432;
|
|
6617
|
+
options = parseExpression(parser, expContext, privateScope, 1, inGroup, parser.tokenIndex, parser.tokenLine, parser.tokenColumn);
|
|
6645
6618
|
}
|
|
6646
|
-
node.options = options;
|
|
6647
6619
|
consumeOpt(parser, context, 18);
|
|
6648
6620
|
}
|
|
6621
|
+
const node = {
|
|
6622
|
+
type: 'ImportExpression',
|
|
6623
|
+
source,
|
|
6624
|
+
options,
|
|
6625
|
+
};
|
|
6649
6626
|
consume(parser, context, 16);
|
|
6650
6627
|
return finishNode(parser, context, start, line, column, node);
|
|
6651
6628
|
}
|
|
@@ -6685,7 +6662,7 @@ function parseImportAttributes(parser, context, specifiers = null) {
|
|
|
6685
6662
|
attributes.push(finishNode(parser, context, start, line, column, {
|
|
6686
6663
|
type: 'ImportAttribute',
|
|
6687
6664
|
key,
|
|
6688
|
-
value
|
|
6665
|
+
value,
|
|
6689
6666
|
}));
|
|
6690
6667
|
if (parser.getToken() !== 1074790415) {
|
|
6691
6668
|
consume(parser, context, 18);
|
|
@@ -6740,30 +6717,27 @@ function parseBigIntLiteral(parser, context, start, line, column) {
|
|
|
6740
6717
|
const { tokenRaw, tokenValue } = parser;
|
|
6741
6718
|
nextToken(parser, context);
|
|
6742
6719
|
parser.assignable = 2;
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
value: tokenValue,
|
|
6753
|
-
bigint: tokenRaw.slice(0, -1)
|
|
6754
|
-
});
|
|
6720
|
+
const node = {
|
|
6721
|
+
type: 'Literal',
|
|
6722
|
+
value: tokenValue,
|
|
6723
|
+
bigint: String(tokenValue),
|
|
6724
|
+
};
|
|
6725
|
+
if (context & 128) {
|
|
6726
|
+
node.raw = tokenRaw;
|
|
6727
|
+
}
|
|
6728
|
+
return finishNode(parser, context, start, line, column, node);
|
|
6755
6729
|
}
|
|
6756
6730
|
function parseTemplateLiteral(parser, context, start, line, column) {
|
|
6757
6731
|
parser.assignable = 2;
|
|
6758
6732
|
const { tokenValue, tokenRaw, tokenIndex, tokenLine, tokenColumn } = parser;
|
|
6759
6733
|
consume(parser, context, 67174409);
|
|
6760
6734
|
const quasis = [
|
|
6761
|
-
parseTemplateElement(parser, context, tokenValue, tokenRaw, tokenIndex, tokenLine, tokenColumn, true)
|
|
6735
|
+
parseTemplateElement(parser, context, tokenValue, tokenRaw, tokenIndex, tokenLine, tokenColumn, true),
|
|
6762
6736
|
];
|
|
6763
6737
|
return finishNode(parser, context, start, line, column, {
|
|
6764
6738
|
type: 'TemplateLiteral',
|
|
6765
6739
|
expressions: [],
|
|
6766
|
-
quasis
|
|
6740
|
+
quasis,
|
|
6767
6741
|
});
|
|
6768
6742
|
}
|
|
6769
6743
|
function parseTemplate(parser, context, privateScope) {
|
|
@@ -6771,10 +6745,10 @@ function parseTemplate(parser, context, privateScope) {
|
|
|
6771
6745
|
const { tokenValue, tokenRaw, tokenIndex, tokenLine, tokenColumn } = parser;
|
|
6772
6746
|
consume(parser, (context & -16385) | 8192, 67174408);
|
|
6773
6747
|
const quasis = [
|
|
6774
|
-
parseTemplateElement(parser, context, tokenValue, tokenRaw, tokenIndex, tokenLine, tokenColumn, false)
|
|
6748
|
+
parseTemplateElement(parser, context, tokenValue, tokenRaw, tokenIndex, tokenLine, tokenColumn, false),
|
|
6775
6749
|
];
|
|
6776
6750
|
const expressions = [
|
|
6777
|
-
parseExpressions(parser, context & -16385, privateScope, 0, 1, parser.tokenIndex, parser.tokenLine, parser.tokenColumn)
|
|
6751
|
+
parseExpressions(parser, context & -16385, privateScope, 0, 1, parser.tokenIndex, parser.tokenLine, parser.tokenColumn),
|
|
6778
6752
|
];
|
|
6779
6753
|
if (parser.getToken() !== 1074790415)
|
|
6780
6754
|
report(parser, 83);
|
|
@@ -6794,7 +6768,7 @@ function parseTemplate(parser, context, privateScope) {
|
|
|
6794
6768
|
return finishNode(parser, context, tokenIndex, tokenLine, tokenColumn, {
|
|
6795
6769
|
type: 'TemplateLiteral',
|
|
6796
6770
|
expressions,
|
|
6797
|
-
quasis
|
|
6771
|
+
quasis,
|
|
6798
6772
|
});
|
|
6799
6773
|
}
|
|
6800
6774
|
function parseTemplateElement(parser, context, cooked, raw, start, line, col, tail) {
|
|
@@ -6802,9 +6776,9 @@ function parseTemplateElement(parser, context, cooked, raw, start, line, col, ta
|
|
|
6802
6776
|
type: 'TemplateElement',
|
|
6803
6777
|
value: {
|
|
6804
6778
|
cooked,
|
|
6805
|
-
raw
|
|
6779
|
+
raw,
|
|
6806
6780
|
},
|
|
6807
|
-
tail
|
|
6781
|
+
tail,
|
|
6808
6782
|
});
|
|
6809
6783
|
const tailSize = tail ? 1 : 2;
|
|
6810
6784
|
if (context & 2) {
|
|
@@ -6826,7 +6800,7 @@ function parseSpreadElement(parser, context, privateScope, start, line, column)
|
|
|
6826
6800
|
parser.assignable = 1;
|
|
6827
6801
|
return finishNode(parser, context, start, line, column, {
|
|
6828
6802
|
type: 'SpreadElement',
|
|
6829
|
-
argument
|
|
6803
|
+
argument,
|
|
6830
6804
|
});
|
|
6831
6805
|
}
|
|
6832
6806
|
function parseArguments(parser, context, privateScope, inGroup) {
|
|
@@ -6858,7 +6832,7 @@ function parseIdentifier(parser, context) {
|
|
|
6858
6832
|
nextToken(parser, context | (allowRegex ? 8192 : 0));
|
|
6859
6833
|
return finishNode(parser, context, tokenIndex, tokenLine, tokenColumn, {
|
|
6860
6834
|
type: 'Identifier',
|
|
6861
|
-
name: tokenValue
|
|
6835
|
+
name: tokenValue,
|
|
6862
6836
|
});
|
|
6863
6837
|
}
|
|
6864
6838
|
function parseLiteral(parser, context) {
|
|
@@ -6872,11 +6846,11 @@ function parseLiteral(parser, context) {
|
|
|
6872
6846
|
? {
|
|
6873
6847
|
type: 'Literal',
|
|
6874
6848
|
value: tokenValue,
|
|
6875
|
-
raw: tokenRaw
|
|
6849
|
+
raw: tokenRaw,
|
|
6876
6850
|
}
|
|
6877
6851
|
: {
|
|
6878
6852
|
type: 'Literal',
|
|
6879
|
-
value: tokenValue
|
|
6853
|
+
value: tokenValue,
|
|
6880
6854
|
});
|
|
6881
6855
|
}
|
|
6882
6856
|
function parseNullOrTrueOrFalseLiteral(parser, context, start, line, column) {
|
|
@@ -6888,11 +6862,11 @@ function parseNullOrTrueOrFalseLiteral(parser, context, start, line, column) {
|
|
|
6888
6862
|
? {
|
|
6889
6863
|
type: 'Literal',
|
|
6890
6864
|
value,
|
|
6891
|
-
raw
|
|
6865
|
+
raw,
|
|
6892
6866
|
}
|
|
6893
6867
|
: {
|
|
6894
6868
|
type: 'Literal',
|
|
6895
|
-
value
|
|
6869
|
+
value,
|
|
6896
6870
|
});
|
|
6897
6871
|
}
|
|
6898
6872
|
function parseThisExpression(parser, context) {
|
|
@@ -6900,7 +6874,7 @@ function parseThisExpression(parser, context) {
|
|
|
6900
6874
|
nextToken(parser, context);
|
|
6901
6875
|
parser.assignable = 2;
|
|
6902
6876
|
return finishNode(parser, context, tokenIndex, tokenLine, tokenColumn, {
|
|
6903
|
-
type: 'ThisExpression'
|
|
6877
|
+
type: 'ThisExpression',
|
|
6904
6878
|
});
|
|
6905
6879
|
}
|
|
6906
6880
|
function parseFunctionDeclaration(parser, context, scope, privateScope, origin, allowGen, flags, isAsync, start, line, column) {
|
|
@@ -6940,30 +6914,32 @@ function parseFunctionDeclaration(parser, context, scope, privateScope, origin,
|
|
|
6940
6914
|
report(parser, 30, KeywordDescTable[parser.getToken() & 255]);
|
|
6941
6915
|
}
|
|
6942
6916
|
}
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
|
|
6917
|
+
{
|
|
6918
|
+
const modifierFlags = 65536 |
|
|
6919
|
+
131072 |
|
|
6920
|
+
262144 |
|
|
6921
|
+
524288 |
|
|
6922
|
+
2097152 |
|
|
6923
|
+
4194304;
|
|
6924
|
+
context =
|
|
6925
|
+
((context | modifierFlags) ^ modifierFlags) |
|
|
6926
|
+
16777216 |
|
|
6927
|
+
(isAsync ? 524288 : 0) |
|
|
6928
|
+
(isGenerator ? 262144 : 0) |
|
|
6929
|
+
(isGenerator ? 0 : 67108864);
|
|
6930
|
+
}
|
|
6955
6931
|
if (scope)
|
|
6956
6932
|
functionScope = addChildScope(functionScope, 512);
|
|
6957
6933
|
const params = parseFormalParametersOrFormalList(parser, (context | 2097152) & -268435457, functionScope, privateScope, 0, 1);
|
|
6958
|
-
const
|
|
6959
|
-
const body = parseFunctionBody(parser, ((context |
|
|
6934
|
+
const modifierFlags = 2048 | 1024 | 32768 | 268435456;
|
|
6935
|
+
const body = parseFunctionBody(parser, ((context | modifierFlags) ^ modifierFlags) | 8388608 | 1048576, scope ? addChildScope(functionScope, 128) : functionScope, privateScope, 8, funcNameToken, functionScope?.scopeError);
|
|
6960
6936
|
return finishNode(parser, context, start, line, column, {
|
|
6961
6937
|
type: 'FunctionDeclaration',
|
|
6962
6938
|
id,
|
|
6963
6939
|
params,
|
|
6964
6940
|
body,
|
|
6965
6941
|
async: isAsync === 1,
|
|
6966
|
-
generator: isGenerator === 1
|
|
6942
|
+
generator: isGenerator === 1,
|
|
6967
6943
|
});
|
|
6968
6944
|
}
|
|
6969
6945
|
function parseFunctionExpression(parser, context, privateScope, isAsync, inGroup, start, line, column) {
|
|
@@ -7005,7 +6981,7 @@ function parseFunctionExpression(parser, context, privateScope, isAsync, inGroup
|
|
|
7005
6981
|
params,
|
|
7006
6982
|
body,
|
|
7007
6983
|
async: isAsync === 1,
|
|
7008
|
-
generator: isGenerator === 1
|
|
6984
|
+
generator: isGenerator === 1,
|
|
7009
6985
|
});
|
|
7010
6986
|
}
|
|
7011
6987
|
function parseArrayLiteral(parser, context, privateScope, skipInitializer, inGroup, start, line, column) {
|
|
@@ -7044,13 +7020,13 @@ function parseArrayExpressionOrPattern(parser, context, scope, privateScope, ski
|
|
|
7044
7020
|
? {
|
|
7045
7021
|
type: 'AssignmentPattern',
|
|
7046
7022
|
left,
|
|
7047
|
-
right
|
|
7023
|
+
right,
|
|
7048
7024
|
}
|
|
7049
7025
|
: {
|
|
7050
7026
|
type: 'AssignmentExpression',
|
|
7051
7027
|
operator: '=',
|
|
7052
7028
|
left,
|
|
7053
|
-
right
|
|
7029
|
+
right,
|
|
7054
7030
|
});
|
|
7055
7031
|
destructible |=
|
|
7056
7032
|
parser.destructible & 256
|
|
@@ -7161,7 +7137,7 @@ function parseArrayExpressionOrPattern(parser, context, scope, privateScope, ski
|
|
|
7161
7137
|
consume(parser, context, 20);
|
|
7162
7138
|
const node = finishNode(parser, context, start, line, column, {
|
|
7163
7139
|
type: isPattern ? 'ArrayPattern' : 'ArrayExpression',
|
|
7164
|
-
elements
|
|
7140
|
+
elements,
|
|
7165
7141
|
});
|
|
7166
7142
|
if (!skipInitializer && parser.getToken() & 4194304) {
|
|
7167
7143
|
return parseArrayOrObjectAssignmentPattern(parser, context, privateScope, destructible, inGroup, isPattern, start, line, column, node);
|
|
@@ -7188,13 +7164,13 @@ function parseArrayOrObjectAssignmentPattern(parser, context, privateScope, dest
|
|
|
7188
7164
|
? {
|
|
7189
7165
|
type: 'AssignmentPattern',
|
|
7190
7166
|
left: node,
|
|
7191
|
-
right
|
|
7167
|
+
right,
|
|
7192
7168
|
}
|
|
7193
7169
|
: {
|
|
7194
7170
|
type: 'AssignmentExpression',
|
|
7195
7171
|
left: node,
|
|
7196
7172
|
operator: '=',
|
|
7197
|
-
right
|
|
7173
|
+
right,
|
|
7198
7174
|
});
|
|
7199
7175
|
}
|
|
7200
7176
|
function parseSpreadOrRestElement(parser, context, scope, privateScope, closingToken, kind, origin, isAsync, inGroup, isPattern, start, line, column) {
|
|
@@ -7291,7 +7267,7 @@ function parseSpreadOrRestElement(parser, context, scope, privateScope, closingT
|
|
|
7291
7267
|
report(parser, 161);
|
|
7292
7268
|
return finishNode(parser, context, start, line, column, {
|
|
7293
7269
|
type: isPattern ? 'RestElement' : 'SpreadElement',
|
|
7294
|
-
argument: argument
|
|
7270
|
+
argument: argument,
|
|
7295
7271
|
});
|
|
7296
7272
|
}
|
|
7297
7273
|
if (parser.getToken() !== closingToken) {
|
|
@@ -7306,13 +7282,13 @@ function parseSpreadOrRestElement(parser, context, scope, privateScope, closingT
|
|
|
7306
7282
|
? {
|
|
7307
7283
|
type: 'AssignmentPattern',
|
|
7308
7284
|
left: argument,
|
|
7309
|
-
right
|
|
7285
|
+
right,
|
|
7310
7286
|
}
|
|
7311
7287
|
: {
|
|
7312
7288
|
type: 'AssignmentExpression',
|
|
7313
7289
|
left: argument,
|
|
7314
7290
|
operator: '=',
|
|
7315
|
-
right
|
|
7291
|
+
right,
|
|
7316
7292
|
});
|
|
7317
7293
|
destructible = 16;
|
|
7318
7294
|
}
|
|
@@ -7323,7 +7299,7 @@ function parseSpreadOrRestElement(parser, context, scope, privateScope, closingT
|
|
|
7323
7299
|
parser.destructible = destructible;
|
|
7324
7300
|
return finishNode(parser, context, start, line, column, {
|
|
7325
7301
|
type: isPattern ? 'RestElement' : 'SpreadElement',
|
|
7326
|
-
argument: argument
|
|
7302
|
+
argument: argument,
|
|
7327
7303
|
});
|
|
7328
7304
|
}
|
|
7329
7305
|
function parseMethodDefinition(parser, context, privateScope, kind, inGroup, start, line, column) {
|
|
@@ -7352,7 +7328,7 @@ function parseMethodDefinition(parser, context, privateScope, kind, inGroup, sta
|
|
|
7352
7328
|
body,
|
|
7353
7329
|
async: (kind & 16) > 0,
|
|
7354
7330
|
generator: (kind & 8) > 0,
|
|
7355
|
-
id: null
|
|
7331
|
+
id: null,
|
|
7356
7332
|
});
|
|
7357
7333
|
}
|
|
7358
7334
|
function parseObjectLiteral(parser, context, privateScope, skipInitializer, inGroup, start, line, column) {
|
|
@@ -7411,7 +7387,7 @@ function parseObjectLiteralOrPattern(parser, context, scope, privateScope, skipI
|
|
|
7411
7387
|
value = finishNode(parser, context, tokenIndex, tokenLine, tokenColumn, {
|
|
7412
7388
|
type: 'AssignmentPattern',
|
|
7413
7389
|
left: context & 134217728 ? Object.assign({}, key) : key,
|
|
7414
|
-
right
|
|
7390
|
+
right,
|
|
7415
7391
|
});
|
|
7416
7392
|
}
|
|
7417
7393
|
else {
|
|
@@ -7872,7 +7848,7 @@ function parseObjectLiteralOrPattern(parser, context, scope, privateScope, skipI
|
|
|
7872
7848
|
kind: !(state & 768) ? 'init' : state & 512 ? 'set' : 'get',
|
|
7873
7849
|
computed: (state & 2) > 0,
|
|
7874
7850
|
method: (state & 1) > 0,
|
|
7875
|
-
shorthand: (state & 4) > 0
|
|
7851
|
+
shorthand: (state & 4) > 0,
|
|
7876
7852
|
}));
|
|
7877
7853
|
}
|
|
7878
7854
|
destructible |= parser.destructible;
|
|
@@ -7885,7 +7861,7 @@ function parseObjectLiteralOrPattern(parser, context, scope, privateScope, skipI
|
|
|
7885
7861
|
destructible |= 64;
|
|
7886
7862
|
const node = finishNode(parser, context, start, line, column, {
|
|
7887
7863
|
type: isPattern ? 'ObjectPattern' : 'ObjectExpression',
|
|
7888
|
-
properties
|
|
7864
|
+
properties,
|
|
7889
7865
|
});
|
|
7890
7866
|
if (!skipInitializer && parser.getToken() & 4194304) {
|
|
7891
7867
|
return parseArrayOrObjectAssignmentPattern(parser, context, privateScope, destructible, inGroup, isPattern, start, line, column, node);
|
|
@@ -7948,7 +7924,7 @@ function parseMethodFormals(parser, context, scope, privateScope, kind, type, in
|
|
|
7948
7924
|
left = finishNode(parser, context, tokenIndex, tokenLine, tokenColumn, {
|
|
7949
7925
|
type: 'AssignmentPattern',
|
|
7950
7926
|
left: left,
|
|
7951
|
-
right
|
|
7927
|
+
right,
|
|
7952
7928
|
});
|
|
7953
7929
|
}
|
|
7954
7930
|
setterArgs++;
|
|
@@ -8073,12 +8049,17 @@ function parseParenthesizedExpression(parser, context, privateScope, canAssign,
|
|
|
8073
8049
|
parser.assignable = 2;
|
|
8074
8050
|
expr = finishNode(parser, context, iStart, lStart, cStart, {
|
|
8075
8051
|
type: 'SequenceExpression',
|
|
8076
|
-
expressions
|
|
8052
|
+
expressions,
|
|
8077
8053
|
});
|
|
8078
8054
|
}
|
|
8079
8055
|
consume(parser, context, 16);
|
|
8080
8056
|
parser.destructible = destructible;
|
|
8081
|
-
return
|
|
8057
|
+
return context & 32
|
|
8058
|
+
? finishNode(parser, context, piStart, plStart, pcStart, {
|
|
8059
|
+
type: 'ParenthesizedExpression',
|
|
8060
|
+
expression: expr,
|
|
8061
|
+
})
|
|
8062
|
+
: expr;
|
|
8082
8063
|
}
|
|
8083
8064
|
if (isSequence && (parser.getToken() === 16 || parser.getToken() === 18)) {
|
|
8084
8065
|
expressions.push(expr);
|
|
@@ -8098,7 +8079,7 @@ function parseParenthesizedExpression(parser, context, privateScope, canAssign,
|
|
|
8098
8079
|
parser.assignable = 2;
|
|
8099
8080
|
expr = finishNode(parser, context, iStart, lStart, cStart, {
|
|
8100
8081
|
type: 'SequenceExpression',
|
|
8101
|
-
expressions
|
|
8082
|
+
expressions,
|
|
8102
8083
|
});
|
|
8103
8084
|
}
|
|
8104
8085
|
consume(parser, context, 16);
|
|
@@ -8134,7 +8115,7 @@ function parseParenthesizedExpression(parser, context, privateScope, canAssign,
|
|
|
8134
8115
|
return context & 32
|
|
8135
8116
|
? finishNode(parser, context, piStart, plStart, pcStart, {
|
|
8136
8117
|
type: 'ParenthesizedExpression',
|
|
8137
|
-
expression: expr
|
|
8118
|
+
expression: expr,
|
|
8138
8119
|
})
|
|
8139
8120
|
: expr;
|
|
8140
8121
|
}
|
|
@@ -8227,7 +8208,8 @@ function parseArrowFunctionExpression(parser, context, scope, privateScope, para
|
|
|
8227
8208
|
params,
|
|
8228
8209
|
body,
|
|
8229
8210
|
async: isAsync === 1,
|
|
8230
|
-
expression
|
|
8211
|
+
expression,
|
|
8212
|
+
generator: false,
|
|
8231
8213
|
});
|
|
8232
8214
|
}
|
|
8233
8215
|
function parseFormalParametersOrFormalList(parser, context, scope, privateScope, inGroup, kind) {
|
|
@@ -8278,7 +8260,7 @@ function parseFormalParametersOrFormalList(parser, context, scope, privateScope,
|
|
|
8278
8260
|
left = finishNode(parser, context, tokenIndex, tokenLine, tokenColumn, {
|
|
8279
8261
|
type: 'AssignmentPattern',
|
|
8280
8262
|
left,
|
|
8281
|
-
right
|
|
8263
|
+
right,
|
|
8282
8264
|
});
|
|
8283
8265
|
}
|
|
8284
8266
|
params.push(left);
|
|
@@ -8296,18 +8278,18 @@ function parseFormalParametersOrFormalList(parser, context, scope, privateScope,
|
|
|
8296
8278
|
consume(parser, context, 16);
|
|
8297
8279
|
return params;
|
|
8298
8280
|
}
|
|
8299
|
-
function
|
|
8281
|
+
function parseMemberExpressionNoCall(parser, context, privateScope, expr, inGroup, start, line, column) {
|
|
8300
8282
|
const token = parser.getToken();
|
|
8301
8283
|
if (token & 67108864) {
|
|
8302
8284
|
if (token === 67108877) {
|
|
8303
8285
|
nextToken(parser, context | 67108864);
|
|
8304
8286
|
parser.assignable = 1;
|
|
8305
8287
|
const property = parsePropertyOrPrivatePropertyName(parser, context, privateScope);
|
|
8306
|
-
return
|
|
8288
|
+
return parseMemberExpressionNoCall(parser, context, privateScope, finishNode(parser, context, start, line, column, {
|
|
8307
8289
|
type: 'MemberExpression',
|
|
8308
8290
|
object: expr,
|
|
8309
8291
|
computed: false,
|
|
8310
|
-
property
|
|
8292
|
+
property,
|
|
8311
8293
|
}), 0, start, line, column);
|
|
8312
8294
|
}
|
|
8313
8295
|
else if (token === 69271571) {
|
|
@@ -8316,21 +8298,21 @@ function parseMembeExpressionNoCall(parser, context, privateScope, expr, inGroup
|
|
|
8316
8298
|
const property = parseExpressions(parser, context, privateScope, inGroup, 1, tokenIndex, tokenLine, tokenColumn);
|
|
8317
8299
|
consume(parser, context, 20);
|
|
8318
8300
|
parser.assignable = 1;
|
|
8319
|
-
return
|
|
8301
|
+
return parseMemberExpressionNoCall(parser, context, privateScope, finishNode(parser, context, start, line, column, {
|
|
8320
8302
|
type: 'MemberExpression',
|
|
8321
8303
|
object: expr,
|
|
8322
8304
|
computed: true,
|
|
8323
|
-
property
|
|
8305
|
+
property,
|
|
8324
8306
|
}), 0, start, line, column);
|
|
8325
8307
|
}
|
|
8326
8308
|
else if (token === 67174408 || token === 67174409) {
|
|
8327
8309
|
parser.assignable = 2;
|
|
8328
|
-
return
|
|
8310
|
+
return parseMemberExpressionNoCall(parser, context, privateScope, finishNode(parser, context, start, line, column, {
|
|
8329
8311
|
type: 'TaggedTemplateExpression',
|
|
8330
8312
|
tag: expr,
|
|
8331
8313
|
quasi: parser.getToken() === 67174408
|
|
8332
8314
|
? parseTemplate(parser, context | 16384, privateScope)
|
|
8333
|
-
: parseTemplateLiteral(parser, context | 16384, parser.tokenIndex, parser.tokenLine, parser.tokenColumn)
|
|
8315
|
+
: parseTemplateLiteral(parser, context | 16384, parser.tokenIndex, parser.tokenLine, parser.tokenColumn),
|
|
8334
8316
|
}), 0, start, line, column);
|
|
8335
8317
|
}
|
|
8336
8318
|
}
|
|
@@ -8354,12 +8336,12 @@ function parseNewExpression(parser, context, privateScope, inGroup, start, line,
|
|
|
8354
8336
|
context = (context | 33554432) ^ 33554432;
|
|
8355
8337
|
if (parser.getToken() === 67108990)
|
|
8356
8338
|
report(parser, 168);
|
|
8357
|
-
const callee =
|
|
8339
|
+
const callee = parseMemberExpressionNoCall(parser, context, privateScope, expr, inGroup, tokenIndex, tokenLine, tokenColumn);
|
|
8358
8340
|
parser.assignable = 2;
|
|
8359
8341
|
return finishNode(parser, context, start, line, column, {
|
|
8360
8342
|
type: 'NewExpression',
|
|
8361
8343
|
callee,
|
|
8362
|
-
arguments: parser.getToken() === 67174411 ? parseArguments(parser, context, privateScope, inGroup) : []
|
|
8344
|
+
arguments: parser.getToken() === 67174411 ? parseArguments(parser, context, privateScope, inGroup) : [],
|
|
8363
8345
|
});
|
|
8364
8346
|
}
|
|
8365
8347
|
function parseMetaProperty(parser, context, meta, start, line, column) {
|
|
@@ -8367,7 +8349,7 @@ function parseMetaProperty(parser, context, meta, start, line, column) {
|
|
|
8367
8349
|
return finishNode(parser, context, start, line, column, {
|
|
8368
8350
|
type: 'MetaProperty',
|
|
8369
8351
|
meta,
|
|
8370
|
-
property
|
|
8352
|
+
property,
|
|
8371
8353
|
});
|
|
8372
8354
|
}
|
|
8373
8355
|
function parseAsyncArrowAfterIdent(parser, context, privateScope, canAssign, start, line, column) {
|
|
@@ -8395,7 +8377,7 @@ function parseAsyncArrowOrCallExpression(parser, context, privateScope, callee,
|
|
|
8395
8377
|
return finishNode(parser, context, start, line, column, {
|
|
8396
8378
|
type: 'CallExpression',
|
|
8397
8379
|
callee,
|
|
8398
|
-
arguments: []
|
|
8380
|
+
arguments: [],
|
|
8399
8381
|
});
|
|
8400
8382
|
}
|
|
8401
8383
|
let destructible = 0;
|
|
@@ -8477,7 +8459,7 @@ function parseAsyncArrowOrCallExpression(parser, context, privateScope, callee,
|
|
|
8477
8459
|
return finishNode(parser, context, start, line, column, {
|
|
8478
8460
|
type: 'CallExpression',
|
|
8479
8461
|
callee,
|
|
8480
|
-
arguments: params
|
|
8462
|
+
arguments: params,
|
|
8481
8463
|
});
|
|
8482
8464
|
}
|
|
8483
8465
|
params.push(expr);
|
|
@@ -8514,7 +8496,7 @@ function parseAsyncArrowOrCallExpression(parser, context, privateScope, callee,
|
|
|
8514
8496
|
return finishNode(parser, context, start, line, column, {
|
|
8515
8497
|
type: 'CallExpression',
|
|
8516
8498
|
callee,
|
|
8517
|
-
arguments: params
|
|
8499
|
+
arguments: params,
|
|
8518
8500
|
});
|
|
8519
8501
|
}
|
|
8520
8502
|
function parseRegExpLiteral(parser, context, start, line, column) {
|
|
@@ -8526,12 +8508,12 @@ function parseRegExpLiteral(parser, context, start, line, column) {
|
|
|
8526
8508
|
type: 'Literal',
|
|
8527
8509
|
value: tokenValue,
|
|
8528
8510
|
regex: tokenRegExp,
|
|
8529
|
-
raw: tokenRaw
|
|
8511
|
+
raw: tokenRaw,
|
|
8530
8512
|
})
|
|
8531
8513
|
: finishNode(parser, context, start, line, column, {
|
|
8532
8514
|
type: 'Literal',
|
|
8533
8515
|
value: tokenValue,
|
|
8534
|
-
regex: tokenRegExp
|
|
8516
|
+
regex: tokenRegExp,
|
|
8535
8517
|
});
|
|
8536
8518
|
}
|
|
8537
8519
|
function parseClassDeclaration(parser, context, scope, privateScope, flags, start, line, column) {
|
|
@@ -8586,7 +8568,7 @@ function parseClassDeclaration(parser, context, scope, privateScope, flags, star
|
|
|
8586
8568
|
id,
|
|
8587
8569
|
superClass,
|
|
8588
8570
|
body,
|
|
8589
|
-
...(context & 1 ? { decorators } : null)
|
|
8571
|
+
...(context & 1 ? { decorators } : null),
|
|
8590
8572
|
});
|
|
8591
8573
|
}
|
|
8592
8574
|
function parseClassExpression(parser, context, privateScope, inGroup, start, line, column) {
|
|
@@ -8623,7 +8605,7 @@ function parseClassExpression(parser, context, privateScope, inGroup, start, lin
|
|
|
8623
8605
|
id,
|
|
8624
8606
|
superClass,
|
|
8625
8607
|
body,
|
|
8626
|
-
...(context & 1 ? { decorators } : null)
|
|
8608
|
+
...(context & 1 ? { decorators } : null),
|
|
8627
8609
|
});
|
|
8628
8610
|
}
|
|
8629
8611
|
function parseDecorators(parser, context, privateScope) {
|
|
@@ -8641,7 +8623,7 @@ function parseDecoratorList(parser, context, privateScope, start, line, column)
|
|
|
8641
8623
|
expression = parseMemberOrUpdateExpression(parser, context, privateScope, expression, 0, 0, start, line, column);
|
|
8642
8624
|
return finishNode(parser, context, start, line, column, {
|
|
8643
8625
|
type: 'Decorator',
|
|
8644
|
-
expression
|
|
8626
|
+
expression,
|
|
8645
8627
|
});
|
|
8646
8628
|
}
|
|
8647
8629
|
function parseClassBody(parser, context, inheritedContext, scope, parentScope, kind, origin, inGroup) {
|
|
@@ -8676,7 +8658,7 @@ function parseClassBody(parser, context, inheritedContext, scope, parentScope, k
|
|
|
8676
8658
|
parser.flags = (parser.flags & -33) | hasConstr;
|
|
8677
8659
|
return finishNode(parser, context, tokenIndex, tokenLine, tokenColumn, {
|
|
8678
8660
|
type: 'ClassBody',
|
|
8679
|
-
body
|
|
8661
|
+
body,
|
|
8680
8662
|
});
|
|
8681
8663
|
}
|
|
8682
8664
|
function parseClassElementList(parser, context, scope, privateScope, inheritedContext, type, decorators, isStatic, inGroup, start, line, column) {
|
|
@@ -8749,7 +8731,7 @@ function parseClassElementList(parser, context, scope, privateScope, inheritedCo
|
|
|
8749
8731
|
kind |= 128;
|
|
8750
8732
|
}
|
|
8751
8733
|
else if (isStatic && token === 2162700) {
|
|
8752
|
-
return parseStaticBlock(parser, context | 4096, scope, privateScope,
|
|
8734
|
+
return parseStaticBlock(parser, context | 4096, scope, privateScope, start, line, column);
|
|
8753
8735
|
}
|
|
8754
8736
|
else if (token === -2147483527) {
|
|
8755
8737
|
key = parseIdentifier(parser, context);
|
|
@@ -8820,7 +8802,7 @@ function parseClassElementList(parser, context, scope, privateScope, inheritedCo
|
|
|
8820
8802
|
computed: (kind & 2) > 0,
|
|
8821
8803
|
key,
|
|
8822
8804
|
value,
|
|
8823
|
-
...(context & 1 ? { decorators } : null)
|
|
8805
|
+
...(context & 1 ? { decorators } : null),
|
|
8824
8806
|
});
|
|
8825
8807
|
}
|
|
8826
8808
|
function parsePrivateIdentifier(parser, context, privateScope, kind, start, line, column) {
|
|
@@ -8841,7 +8823,7 @@ function parsePrivateIdentifier(parser, context, privateScope, kind, start, line
|
|
|
8841
8823
|
nextToken(parser, context);
|
|
8842
8824
|
return finishNode(parser, context, start, line, column, {
|
|
8843
8825
|
type: 'PrivateIdentifier',
|
|
8844
|
-
name: tokenValue
|
|
8826
|
+
name: tokenValue,
|
|
8845
8827
|
});
|
|
8846
8828
|
}
|
|
8847
8829
|
function parsePropertyDefinition(parser, context, privateScope, key, state, decorators, start, line, column) {
|
|
@@ -8878,7 +8860,7 @@ function parsePropertyDefinition(parser, context, privateScope, key, state, deco
|
|
|
8878
8860
|
value,
|
|
8879
8861
|
static: (state & 32) > 0,
|
|
8880
8862
|
computed: (state & 2) > 0,
|
|
8881
|
-
...(context & 1 ? { decorators } : null)
|
|
8863
|
+
...(context & 1 ? { decorators } : null),
|
|
8882
8864
|
});
|
|
8883
8865
|
}
|
|
8884
8866
|
function parseBindingPattern(parser, context, scope, privateScope, type, origin, start, line, column) {
|
|
@@ -8931,7 +8913,7 @@ function parseAndClassifyIdentifier(parser, context, scope, kind, origin, start,
|
|
|
8931
8913
|
addVarOrBlock(parser, context, scope, tokenValue, kind, origin);
|
|
8932
8914
|
return finishNode(parser, context, start, line, column, {
|
|
8933
8915
|
type: 'Identifier',
|
|
8934
|
-
name: tokenValue
|
|
8916
|
+
name: tokenValue,
|
|
8935
8917
|
});
|
|
8936
8918
|
}
|
|
8937
8919
|
function parseJSXRootElementOrFragment(parser, context, privateScope, inJSXChild, start, line, column) {
|
|
@@ -8944,7 +8926,7 @@ function parseJSXRootElementOrFragment(parser, context, privateScope, inJSXChild
|
|
|
8944
8926
|
type: 'JSXFragment',
|
|
8945
8927
|
openingFragment,
|
|
8946
8928
|
children,
|
|
8947
|
-
closingFragment
|
|
8929
|
+
closingFragment,
|
|
8948
8930
|
});
|
|
8949
8931
|
}
|
|
8950
8932
|
if (parser.getToken() === 8457014)
|
|
@@ -8962,13 +8944,13 @@ function parseJSXRootElementOrFragment(parser, context, privateScope, inJSXChild
|
|
|
8962
8944
|
type: 'JSXElement',
|
|
8963
8945
|
children,
|
|
8964
8946
|
openingElement,
|
|
8965
|
-
closingElement
|
|
8947
|
+
closingElement,
|
|
8966
8948
|
});
|
|
8967
8949
|
}
|
|
8968
8950
|
function parseOpeningFragment(parser, context, start, line, column) {
|
|
8969
8951
|
nextJSXToken(parser, context);
|
|
8970
8952
|
return finishNode(parser, context, start, line, column, {
|
|
8971
|
-
type: 'JSXOpeningFragment'
|
|
8953
|
+
type: 'JSXOpeningFragment',
|
|
8972
8954
|
});
|
|
8973
8955
|
}
|
|
8974
8956
|
function parseJSXClosingElement(parser, context, inJSXChild, start, line, column) {
|
|
@@ -8985,7 +8967,7 @@ function parseJSXClosingElement(parser, context, inJSXChild, start, line, column
|
|
|
8985
8967
|
}
|
|
8986
8968
|
return finishNode(parser, context, start, line, column, {
|
|
8987
8969
|
type: 'JSXClosingElement',
|
|
8988
|
-
name
|
|
8970
|
+
name,
|
|
8989
8971
|
});
|
|
8990
8972
|
}
|
|
8991
8973
|
function parseJSXClosingFragment(parser, context, inJSXChild, start, line, column) {
|
|
@@ -9000,7 +8982,7 @@ function parseJSXClosingFragment(parser, context, inJSXChild, start, line, colum
|
|
|
9000
8982
|
nextToken(parser, context);
|
|
9001
8983
|
}
|
|
9002
8984
|
return finishNode(parser, context, start, line, column, {
|
|
9003
|
-
type: 'JSXClosingFragment'
|
|
8985
|
+
type: 'JSXClosingFragment',
|
|
9004
8986
|
});
|
|
9005
8987
|
}
|
|
9006
8988
|
function parseJSXChildrenAndClosingElement(parser, context, privateScope, inJSXChild) {
|
|
@@ -9053,7 +9035,7 @@ function parseJSXText(parser, context, start, line, column) {
|
|
|
9053
9035
|
nextToken(parser, context);
|
|
9054
9036
|
const node = {
|
|
9055
9037
|
type: 'JSXText',
|
|
9056
|
-
value: parser.tokenValue
|
|
9038
|
+
value: parser.tokenValue,
|
|
9057
9039
|
};
|
|
9058
9040
|
if (context & 128) {
|
|
9059
9041
|
node.raw = parser.tokenRaw;
|
|
@@ -9082,7 +9064,7 @@ function parseJSXOpeningElementOrSelfCloseElement(parser, context, privateScope,
|
|
|
9082
9064
|
type: 'JSXOpeningElement',
|
|
9083
9065
|
name: tagName,
|
|
9084
9066
|
attributes,
|
|
9085
|
-
selfClosing
|
|
9067
|
+
selfClosing,
|
|
9086
9068
|
});
|
|
9087
9069
|
}
|
|
9088
9070
|
function parseJSXElementName(parser, context, start, line, column) {
|
|
@@ -9101,7 +9083,7 @@ function parseJSXMemberExpression(parser, context, object, start, line, column)
|
|
|
9101
9083
|
return finishNode(parser, context, start, line, column, {
|
|
9102
9084
|
type: 'JSXMemberExpression',
|
|
9103
9085
|
object,
|
|
9104
|
-
property
|
|
9086
|
+
property,
|
|
9105
9087
|
});
|
|
9106
9088
|
}
|
|
9107
9089
|
function parseJSXAttributes(parser, context, privateScope) {
|
|
@@ -9120,7 +9102,7 @@ function parseJSXSpreadAttribute(parser, context, privateScope, start, line, col
|
|
|
9120
9102
|
consume(parser, context, 1074790415);
|
|
9121
9103
|
return finishNode(parser, context, start, line, column, {
|
|
9122
9104
|
type: 'JSXSpreadAttribute',
|
|
9123
|
-
argument: expression
|
|
9105
|
+
argument: expression,
|
|
9124
9106
|
});
|
|
9125
9107
|
}
|
|
9126
9108
|
function parseJsxAttribute(parser, context, privateScope, start, line, column) {
|
|
@@ -9152,7 +9134,7 @@ function parseJsxAttribute(parser, context, privateScope, start, line, column) {
|
|
|
9152
9134
|
return finishNode(parser, context, start, line, column, {
|
|
9153
9135
|
type: 'JSXAttribute',
|
|
9154
9136
|
value,
|
|
9155
|
-
name
|
|
9137
|
+
name,
|
|
9156
9138
|
});
|
|
9157
9139
|
}
|
|
9158
9140
|
function parseJSXNamespacedName(parser, context, namespace, start, line, column) {
|
|
@@ -9161,7 +9143,7 @@ function parseJSXNamespacedName(parser, context, namespace, start, line, column)
|
|
|
9161
9143
|
return finishNode(parser, context, start, line, column, {
|
|
9162
9144
|
type: 'JSXNamespacedName',
|
|
9163
9145
|
namespace,
|
|
9164
|
-
name
|
|
9146
|
+
name,
|
|
9165
9147
|
});
|
|
9166
9148
|
}
|
|
9167
9149
|
function parseJSXExpressionContainer(parser, context, privateScope, inJSXChild, isAttr, start, line, column) {
|
|
@@ -9189,7 +9171,7 @@ function parseJSXExpressionContainer(parser, context, privateScope, inJSXChild,
|
|
|
9189
9171
|
}
|
|
9190
9172
|
return finishNode(parser, context, start, line, column, {
|
|
9191
9173
|
type: 'JSXExpressionContainer',
|
|
9192
|
-
expression
|
|
9174
|
+
expression,
|
|
9193
9175
|
});
|
|
9194
9176
|
}
|
|
9195
9177
|
function parseJSXSpreadChild(parser, context, privateScope, start, line, column) {
|
|
@@ -9198,7 +9180,7 @@ function parseJSXSpreadChild(parser, context, privateScope, start, line, column)
|
|
|
9198
9180
|
consume(parser, context, 1074790415);
|
|
9199
9181
|
return finishNode(parser, context, start, line, column, {
|
|
9200
9182
|
type: 'JSXSpreadChild',
|
|
9201
|
-
expression
|
|
9183
|
+
expression,
|
|
9202
9184
|
});
|
|
9203
9185
|
}
|
|
9204
9186
|
function parseJSXEmptyExpression(parser, context, start, line, column) {
|
|
@@ -9206,7 +9188,7 @@ function parseJSXEmptyExpression(parser, context, start, line, column) {
|
|
|
9206
9188
|
parser.startLine = parser.tokenLine;
|
|
9207
9189
|
parser.startColumn = parser.tokenColumn;
|
|
9208
9190
|
return finishNode(parser, context, start, line, column, {
|
|
9209
|
-
type: 'JSXEmptyExpression'
|
|
9191
|
+
type: 'JSXEmptyExpression',
|
|
9210
9192
|
});
|
|
9211
9193
|
}
|
|
9212
9194
|
function parseJSXIdentifier(parser, context, start, line, column) {
|
|
@@ -9217,15 +9199,11 @@ function parseJSXIdentifier(parser, context, start, line, column) {
|
|
|
9217
9199
|
nextToken(parser, context);
|
|
9218
9200
|
return finishNode(parser, context, start, line, column, {
|
|
9219
9201
|
type: 'JSXIdentifier',
|
|
9220
|
-
name: tokenValue
|
|
9202
|
+
name: tokenValue,
|
|
9221
9203
|
});
|
|
9222
9204
|
}
|
|
9223
9205
|
|
|
9224
|
-
var
|
|
9225
|
-
__proto__: null
|
|
9226
|
-
});
|
|
9227
|
-
|
|
9228
|
-
var version$1 = "6.0.6";
|
|
9206
|
+
var version$1 = "6.1.0";
|
|
9229
9207
|
|
|
9230
9208
|
const version = version$1;
|
|
9231
9209
|
function parseScript(source, options) {
|
|
@@ -9238,7 +9216,6 @@ function parse(source, options) {
|
|
|
9238
9216
|
return parseSource(source, options, 0);
|
|
9239
9217
|
}
|
|
9240
9218
|
|
|
9241
|
-
exports.ESTree = estree;
|
|
9242
9219
|
exports.parse = parse;
|
|
9243
9220
|
exports.parseModule = parseModule;
|
|
9244
9221
|
exports.parseScript = parseScript;
|