@putout/babel 2.4.0 → 2.6.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/README.md +1 -1
- package/bundle/index.d.ts +7 -7
- package/bundle/index.js +721 -790
- package/package.json +9 -9
package/bundle/index.js
CHANGED
|
@@ -363,7 +363,7 @@ var __export = function(target, all) {
|
|
|
363
363
|
});
|
|
364
364
|
};
|
|
365
365
|
var __copyProps = function(to, from, except, desc) {
|
|
366
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
366
|
+
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
367
367
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
368
368
|
try {
|
|
369
369
|
var _loop = function() {
|
|
@@ -409,8 +409,7 @@ var __toCommonJS = function(mod) {
|
|
|
409
409
|
}), mod);
|
|
410
410
|
};
|
|
411
411
|
var __publicField = function(obj, key, value1) {
|
|
412
|
-
__defNormalProp(obj, (typeof key === "undefined" ? "undefined" : _type_of(key)) !== "symbol" ? key + "" : key, value1);
|
|
413
|
-
return value1;
|
|
412
|
+
return __defNormalProp(obj, (typeof key === "undefined" ? "undefined" : _type_of(key)) !== "symbol" ? key + "" : key, value1);
|
|
414
413
|
};
|
|
415
414
|
// node_modules/to-fast-properties/index.js
|
|
416
415
|
var require_to_fast_properties = __commonJS({
|
|
@@ -1257,8 +1256,9 @@ var require_js_tokens = __commonJS({
|
|
|
1257
1256
|
// node_modules/picocolors/picocolors.js
|
|
1258
1257
|
var require_picocolors = __commonJS({
|
|
1259
1258
|
"node_modules/picocolors/picocolors.js": function(exports2, module2) {
|
|
1260
|
-
var
|
|
1261
|
-
var
|
|
1259
|
+
var argv = process.argv || [];
|
|
1260
|
+
var env = process.env;
|
|
1261
|
+
var isColorSupported = !("NO_COLOR" in env || argv.includes("--no-color")) && ("FORCE_COLOR" in env || argv.includes("--color") || process.platform === "win32" || require != null && require("tty").isatty(1) && env.TERM !== "dumb" || "CI" in env);
|
|
1262
1262
|
var formatter = function(open, close) {
|
|
1263
1263
|
var replace = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : open;
|
|
1264
1264
|
return function(input) {
|
|
@@ -1268,42 +1268,47 @@ var require_picocolors = __commonJS({
|
|
|
1268
1268
|
};
|
|
1269
1269
|
};
|
|
1270
1270
|
var replaceClose = function(string, close, replace, index3) {
|
|
1271
|
-
var
|
|
1272
|
-
var
|
|
1273
|
-
|
|
1274
|
-
|
|
1271
|
+
var result = "";
|
|
1272
|
+
var cursor = 0;
|
|
1273
|
+
do {
|
|
1274
|
+
result += string.substring(cursor, index3) + replace;
|
|
1275
|
+
cursor = index3 + close.length;
|
|
1276
|
+
index3 = string.indexOf(close, cursor);
|
|
1277
|
+
}while (~index3);
|
|
1278
|
+
return result + string.substring(cursor);
|
|
1275
1279
|
};
|
|
1276
1280
|
var createColors3 = function() {
|
|
1277
1281
|
var enabled = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : isColorSupported;
|
|
1282
|
+
var init = enabled ? formatter : function() {
|
|
1283
|
+
return String;
|
|
1284
|
+
};
|
|
1278
1285
|
return {
|
|
1279
1286
|
isColorSupported: enabled,
|
|
1280
|
-
reset:
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String,
|
|
1306
|
-
bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String
|
|
1287
|
+
reset: init("\x1B[0m", "\x1B[0m"),
|
|
1288
|
+
bold: init("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
1289
|
+
dim: init("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
1290
|
+
italic: init("\x1B[3m", "\x1B[23m"),
|
|
1291
|
+
underline: init("\x1B[4m", "\x1B[24m"),
|
|
1292
|
+
inverse: init("\x1B[7m", "\x1B[27m"),
|
|
1293
|
+
hidden: init("\x1B[8m", "\x1B[28m"),
|
|
1294
|
+
strikethrough: init("\x1B[9m", "\x1B[29m"),
|
|
1295
|
+
black: init("\x1B[30m", "\x1B[39m"),
|
|
1296
|
+
red: init("\x1B[31m", "\x1B[39m"),
|
|
1297
|
+
green: init("\x1B[32m", "\x1B[39m"),
|
|
1298
|
+
yellow: init("\x1B[33m", "\x1B[39m"),
|
|
1299
|
+
blue: init("\x1B[34m", "\x1B[39m"),
|
|
1300
|
+
magenta: init("\x1B[35m", "\x1B[39m"),
|
|
1301
|
+
cyan: init("\x1B[36m", "\x1B[39m"),
|
|
1302
|
+
white: init("\x1B[37m", "\x1B[39m"),
|
|
1303
|
+
gray: init("\x1B[90m", "\x1B[39m"),
|
|
1304
|
+
bgBlack: init("\x1B[40m", "\x1B[49m"),
|
|
1305
|
+
bgRed: init("\x1B[41m", "\x1B[49m"),
|
|
1306
|
+
bgGreen: init("\x1B[42m", "\x1B[49m"),
|
|
1307
|
+
bgYellow: init("\x1B[43m", "\x1B[49m"),
|
|
1308
|
+
bgBlue: init("\x1B[44m", "\x1B[49m"),
|
|
1309
|
+
bgMagenta: init("\x1B[45m", "\x1B[49m"),
|
|
1310
|
+
bgCyan: init("\x1B[46m", "\x1B[49m"),
|
|
1311
|
+
bgWhite: init("\x1B[47m", "\x1B[49m")
|
|
1307
1312
|
};
|
|
1308
1313
|
};
|
|
1309
1314
|
module2.exports = createColors3();
|
|
@@ -2260,10 +2265,10 @@ var require_node = __commonJS({
|
|
|
2260
2265
|
var _this = this, name = _this.namespace, useColors2 = _this.useColors;
|
|
2261
2266
|
if (useColors2) {
|
|
2262
2267
|
var c = this.color;
|
|
2263
|
-
var colorCode = "\
|
|
2268
|
+
var colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
2264
2269
|
var prefix2 = " ".concat(colorCode, ";1m").concat(name, " \x1b[0m");
|
|
2265
2270
|
args[0] = prefix2 + args[0].split("\n").join("\n" + prefix2);
|
|
2266
|
-
args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\
|
|
2271
|
+
args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
|
|
2267
2272
|
} else {
|
|
2268
2273
|
args[0] = getDate() + name + " " + args[0];
|
|
2269
2274
|
}
|
|
@@ -2279,7 +2284,9 @@ var require_node = __commonJS({
|
|
|
2279
2284
|
args[_key] = arguments[_key];
|
|
2280
2285
|
}
|
|
2281
2286
|
var _util;
|
|
2282
|
-
return process.stderr.write((_util = util).
|
|
2287
|
+
return process.stderr.write((_util = util).formatWithOptions.apply(_util, [
|
|
2288
|
+
exports2.inspectOpts
|
|
2289
|
+
].concat(_to_consumable_array(args))) + "\n");
|
|
2283
2290
|
}
|
|
2284
2291
|
function save(namespaces) {
|
|
2285
2292
|
if (namespaces) {
|
|
@@ -8372,8 +8379,8 @@ __export(lib_exports, {
|
|
|
8372
8379
|
});
|
|
8373
8380
|
var import_to_fast_properties = __toESM(require_to_fast_properties(), 1);
|
|
8374
8381
|
// node_modules/@babel/helper-validator-identifier/lib/index.js
|
|
8375
|
-
var nonASCIIidentifierStartChars = "\
|
|
8376
|
-
var nonASCIIidentifierChars = "
|
|
8382
|
+
var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
|
|
8383
|
+
var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";
|
|
8377
8384
|
var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
|
|
8378
8385
|
var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
|
|
8379
8386
|
nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
|
|
@@ -12629,7 +12636,7 @@ function defineType$5(type) {
|
|
|
12629
12636
|
var key = _step.value;
|
|
12630
12637
|
var field = inherits2.fields[key];
|
|
12631
12638
|
var def = field.default;
|
|
12632
|
-
if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
|
|
12639
|
+
if (Array.isArray(def) ? def.length > 0 : def && (typeof def === "undefined" ? "undefined" : _type_of(def)) === "object") {
|
|
12633
12640
|
throw new Error("field defaults can only be primitives or empty arrays currently");
|
|
12634
12641
|
}
|
|
12635
12642
|
fields[key] = {
|
|
@@ -12945,7 +12952,7 @@ defineType$4("CallExpression", {
|
|
|
12945
12952
|
validate: assertNodeType("Expression", "Super", "V8IntrinsicIdentifier")
|
|
12946
12953
|
},
|
|
12947
12954
|
arguments: {
|
|
12948
|
-
validate: chain(assertValueType("array"), assertEach(assertNodeType("Expression", "SpreadElement", "
|
|
12955
|
+
validate: chain(assertValueType("array"), assertEach(assertNodeType("Expression", "SpreadElement", "ArgumentPlaceholder")))
|
|
12949
12956
|
}
|
|
12950
12957
|
}, !process.env.BABEL_TYPES_8_BREAKING ? {
|
|
12951
12958
|
optional: {
|
|
@@ -14934,7 +14941,7 @@ defineType$4("OptionalCallExpression", {
|
|
|
14934
14941
|
validate: assertNodeType("Expression")
|
|
14935
14942
|
},
|
|
14936
14943
|
arguments: {
|
|
14937
|
-
validate: chain(assertValueType("array"), assertEach(assertNodeType("Expression", "SpreadElement", "
|
|
14944
|
+
validate: chain(assertValueType("array"), assertEach(assertNodeType("Expression", "SpreadElement", "ArgumentPlaceholder")))
|
|
14938
14945
|
},
|
|
14939
14946
|
optional: {
|
|
14940
14947
|
validate: !process.env.BABEL_TYPES_8_BREAKING ? assertValueType("boolean") : chain(assertValueType("boolean"), assertOptionalChainStart())
|
|
@@ -20840,7 +20847,7 @@ function isRegExp(value1) {
|
|
|
20840
20847
|
return objectToString(value1) === "[object RegExp]";
|
|
20841
20848
|
}
|
|
20842
20849
|
function isPlainObject(value1) {
|
|
20843
|
-
if (typeof value1 !== "object" || value1 === null || Object.prototype.toString.call(value1) !== "[object Object]") {
|
|
20850
|
+
if ((typeof value1 === "undefined" ? "undefined" : _type_of(value1)) !== "object" || value1 === null || Object.prototype.toString.call(value1) !== "[object Object]") {
|
|
20844
20851
|
return false;
|
|
20845
20852
|
}
|
|
20846
20853
|
var proto = Object.getPrototypeOf(value1);
|
|
@@ -21006,10 +21013,9 @@ function getBindingIdentifiers(node, duplicates, outerOnly, newBindingsOnly) {
|
|
|
21006
21013
|
while(search.length){
|
|
21007
21014
|
var id = search.shift();
|
|
21008
21015
|
if (!id) continue;
|
|
21009
|
-
if (newBindingsOnly && (isAssignmentExpression(id) || isUnaryExpression(id))) {
|
|
21016
|
+
if (newBindingsOnly && (isAssignmentExpression(id) || isUnaryExpression(id) || isUpdateExpression(id))) {
|
|
21010
21017
|
continue;
|
|
21011
21018
|
}
|
|
21012
|
-
var keys = getBindingIdentifiers.keys[id.type];
|
|
21013
21019
|
if (isIdentifier(id)) {
|
|
21014
21020
|
if (duplicates) {
|
|
21015
21021
|
var _ids = ids[id.name] = ids[id.name] || [];
|
|
@@ -21030,10 +21036,11 @@ function getBindingIdentifiers(node, duplicates, outerOnly, newBindingsOnly) {
|
|
|
21030
21036
|
search.push(id.id);
|
|
21031
21037
|
continue;
|
|
21032
21038
|
}
|
|
21033
|
-
if (isFunctionExpression(id)) {
|
|
21039
|
+
if (isFunctionExpression(id) || isClassExpression(id)) {
|
|
21034
21040
|
continue;
|
|
21035
21041
|
}
|
|
21036
21042
|
}
|
|
21043
|
+
var keys = getBindingIdentifiers.keys[id.type];
|
|
21037
21044
|
if (keys) {
|
|
21038
21045
|
for(var i = 0; i < keys.length; i++){
|
|
21039
21046
|
var key = keys[i];
|
|
@@ -21262,7 +21269,7 @@ function isImmutable(node) {
|
|
|
21262
21269
|
return false;
|
|
21263
21270
|
}
|
|
21264
21271
|
function isNodesEquivalent(a, b) {
|
|
21265
|
-
if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
|
|
21272
|
+
if ((typeof a === "undefined" ? "undefined" : _type_of(a)) !== "object" || (typeof b === "undefined" ? "undefined" : _type_of(b)) !== "object" || a == null || b == null) {
|
|
21266
21273
|
return a === b;
|
|
21267
21274
|
}
|
|
21268
21275
|
if (a.type !== b.type) {
|
|
@@ -21298,7 +21305,7 @@ function isNodesEquivalent(a, b) {
|
|
|
21298
21305
|
}
|
|
21299
21306
|
continue;
|
|
21300
21307
|
}
|
|
21301
|
-
if (typeof val_a === "object" && !(visitorKeys === null || visitorKeys === void 0 ? void 0 : visitorKeys.includes(field))) {
|
|
21308
|
+
if ((typeof val_a === "undefined" ? "undefined" : _type_of(val_a)) === "object" && !(visitorKeys === null || visitorKeys === void 0 ? void 0 : visitorKeys.includes(field))) {
|
|
21302
21309
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
21303
21310
|
try {
|
|
21304
21311
|
for(var _iterator1 = Object.keys(val_a)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
@@ -21557,9 +21564,8 @@ var NodeDescriptions = {
|
|
|
21557
21564
|
VariableDeclarator: "variable declaration",
|
|
21558
21565
|
YieldExpression: "yield expression"
|
|
21559
21566
|
};
|
|
21560
|
-
var toNodeDescription = function(
|
|
21561
|
-
|
|
21562
|
-
return type === "UpdateExpression" ? NodeDescriptions.UpdateExpression[String(prefix2)] : NodeDescriptions[type];
|
|
21567
|
+
var toNodeDescription = function(node) {
|
|
21568
|
+
return node.type === "UpdateExpression" ? NodeDescriptions.UpdateExpression["".concat(node.prefix)] : NodeDescriptions[node.type];
|
|
21563
21569
|
};
|
|
21564
21570
|
var StandardErrors = {
|
|
21565
21571
|
AccessorIsGenerator: function(param) {
|
|
@@ -21801,6 +21807,7 @@ var StandardErrors = {
|
|
|
21801
21807
|
UnterminatedRegExp: "Unterminated regular expression.",
|
|
21802
21808
|
UnterminatedString: "Unterminated string constant.",
|
|
21803
21809
|
UnterminatedTemplate: "Unterminated template.",
|
|
21810
|
+
UsingDeclarationExport: "Using declaration cannot be exported.",
|
|
21804
21811
|
UsingDeclarationHasBindingPattern: "Using declaration cannot have destructuring patterns.",
|
|
21805
21812
|
VarRedeclaration: function(param) {
|
|
21806
21813
|
var identifierName = param.identifierName;
|
|
@@ -22184,6 +22191,13 @@ var estree = function(superClass) {
|
|
|
22184
22191
|
return this.finishNode(node, "MethodDefinition");
|
|
22185
22192
|
}
|
|
22186
22193
|
},
|
|
22194
|
+
{
|
|
22195
|
+
key: "nameIsConstructor",
|
|
22196
|
+
value: function nameIsConstructor(key) {
|
|
22197
|
+
if (key.type === "Literal") return key.value === "constructor";
|
|
22198
|
+
return _get(_get_prototype_of(ESTreeParserMixin.prototype), "nameIsConstructor", this).call(this, key);
|
|
22199
|
+
}
|
|
22200
|
+
},
|
|
22187
22201
|
{
|
|
22188
22202
|
key: "parseClassProperty",
|
|
22189
22203
|
value: function parseClassProperty() {
|
|
@@ -22271,9 +22285,9 @@ var estree = function(superClass) {
|
|
|
22271
22285
|
{
|
|
22272
22286
|
key: "toAssignableObjectExpressionProp",
|
|
22273
22287
|
value: function toAssignableObjectExpressionProp(prop, isLast, isLHS) {
|
|
22274
|
-
if (prop.kind === "get" || prop.kind === "set") {
|
|
22288
|
+
if (prop.type === "Property" && (prop.kind === "get" || prop.kind === "set")) {
|
|
22275
22289
|
this.raise(Errors.PatternHasAccessor, prop.key);
|
|
22276
|
-
} else if (prop.method) {
|
|
22290
|
+
} else if (prop.type === "Property" && prop.method) {
|
|
22277
22291
|
this.raise(Errors.PatternHasMethod, prop.key);
|
|
22278
22292
|
} else {
|
|
22279
22293
|
_get(_get_prototype_of(ESTreeParserMixin.prototype), "toAssignableObjectExpressionProp", this).call(this, prop, isLast, isLHS);
|
|
@@ -22382,7 +22396,7 @@ var estree = function(superClass) {
|
|
|
22382
22396
|
{
|
|
22383
22397
|
key: "isObjectMethod",
|
|
22384
22398
|
value: function isObjectMethod(node) {
|
|
22385
|
-
return node.method || node.kind === "get" || node.kind === "set";
|
|
22399
|
+
return node.type === "Property" && (node.method || node.kind === "get" || node.kind === "set");
|
|
22386
22400
|
}
|
|
22387
22401
|
},
|
|
22388
22402
|
{
|
|
@@ -22963,8 +22977,8 @@ function tokenIsTemplate(token) {
|
|
|
22963
22977
|
function getExportedToken(token) {
|
|
22964
22978
|
return tokenTypes[token];
|
|
22965
22979
|
}
|
|
22966
|
-
var nonASCIIidentifierStartChars2 = "\
|
|
22967
|
-
var nonASCIIidentifierChars2 = "
|
|
22980
|
+
var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
|
|
22981
|
+
var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";
|
|
22968
22982
|
var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]");
|
|
22969
22983
|
var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]");
|
|
22970
22984
|
nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null;
|
|
@@ -24366,7 +24380,9 @@ var CommentsParser = /*#__PURE__*/ function(BaseParser) {
|
|
|
24366
24380
|
value: function addComment(comment) {
|
|
24367
24381
|
if (this.filename) comment.loc.filename = this.filename;
|
|
24368
24382
|
var commentsLen = this.state.commentsLen;
|
|
24369
|
-
if (this.comments.length
|
|
24383
|
+
if (this.comments.length !== commentsLen) {
|
|
24384
|
+
this.comments.length = commentsLen;
|
|
24385
|
+
}
|
|
24370
24386
|
this.comments.push(comment);
|
|
24371
24387
|
this.state.commentsLen++;
|
|
24372
24388
|
}
|
|
@@ -24595,12 +24611,9 @@ var State = /*#__PURE__*/ function() {
|
|
|
24595
24611
|
get: function get() {
|
|
24596
24612
|
return (this.flags & 1) > 0;
|
|
24597
24613
|
},
|
|
24598
|
-
set: function set(
|
|
24599
|
-
if (
|
|
24600
|
-
|
|
24601
|
-
} else {
|
|
24602
|
-
this.flags &= ~1;
|
|
24603
|
-
}
|
|
24614
|
+
set: function set(v) {
|
|
24615
|
+
if (v) this.flags |= 1;
|
|
24616
|
+
else this.flags &= -2;
|
|
24604
24617
|
}
|
|
24605
24618
|
},
|
|
24606
24619
|
{
|
|
@@ -24618,12 +24631,9 @@ var State = /*#__PURE__*/ function() {
|
|
|
24618
24631
|
get: function get() {
|
|
24619
24632
|
return (this.flags & 2) > 0;
|
|
24620
24633
|
},
|
|
24621
|
-
set: function set(
|
|
24622
|
-
if (
|
|
24623
|
-
|
|
24624
|
-
} else {
|
|
24625
|
-
this.flags &= ~2;
|
|
24626
|
-
}
|
|
24634
|
+
set: function set(v) {
|
|
24635
|
+
if (v) this.flags |= 2;
|
|
24636
|
+
else this.flags &= -3;
|
|
24627
24637
|
}
|
|
24628
24638
|
},
|
|
24629
24639
|
{
|
|
@@ -24631,12 +24641,9 @@ var State = /*#__PURE__*/ function() {
|
|
|
24631
24641
|
get: function get() {
|
|
24632
24642
|
return (this.flags & 4) > 0;
|
|
24633
24643
|
},
|
|
24634
|
-
set: function set(
|
|
24635
|
-
if (
|
|
24636
|
-
|
|
24637
|
-
} else {
|
|
24638
|
-
this.flags &= ~4;
|
|
24639
|
-
}
|
|
24644
|
+
set: function set(v) {
|
|
24645
|
+
if (v) this.flags |= 4;
|
|
24646
|
+
else this.flags &= -5;
|
|
24640
24647
|
}
|
|
24641
24648
|
},
|
|
24642
24649
|
{
|
|
@@ -24644,12 +24651,9 @@ var State = /*#__PURE__*/ function() {
|
|
|
24644
24651
|
get: function get() {
|
|
24645
24652
|
return (this.flags & 8) > 0;
|
|
24646
24653
|
},
|
|
24647
|
-
set: function set(
|
|
24648
|
-
if (
|
|
24649
|
-
|
|
24650
|
-
} else {
|
|
24651
|
-
this.flags &= ~8;
|
|
24652
|
-
}
|
|
24654
|
+
set: function set(v) {
|
|
24655
|
+
if (v) this.flags |= 8;
|
|
24656
|
+
else this.flags &= -9;
|
|
24653
24657
|
}
|
|
24654
24658
|
},
|
|
24655
24659
|
{
|
|
@@ -24657,12 +24661,9 @@ var State = /*#__PURE__*/ function() {
|
|
|
24657
24661
|
get: function get() {
|
|
24658
24662
|
return (this.flags & 16) > 0;
|
|
24659
24663
|
},
|
|
24660
|
-
set: function set(
|
|
24661
|
-
if (
|
|
24662
|
-
|
|
24663
|
-
} else {
|
|
24664
|
-
this.flags &= ~16;
|
|
24665
|
-
}
|
|
24664
|
+
set: function set(v) {
|
|
24665
|
+
if (v) this.flags |= 16;
|
|
24666
|
+
else this.flags &= -17;
|
|
24666
24667
|
}
|
|
24667
24668
|
},
|
|
24668
24669
|
{
|
|
@@ -24670,12 +24671,9 @@ var State = /*#__PURE__*/ function() {
|
|
|
24670
24671
|
get: function get() {
|
|
24671
24672
|
return (this.flags & 32) > 0;
|
|
24672
24673
|
},
|
|
24673
|
-
set: function set(
|
|
24674
|
-
if (
|
|
24675
|
-
|
|
24676
|
-
} else {
|
|
24677
|
-
this.flags &= ~32;
|
|
24678
|
-
}
|
|
24674
|
+
set: function set(v) {
|
|
24675
|
+
if (v) this.flags |= 32;
|
|
24676
|
+
else this.flags &= -33;
|
|
24679
24677
|
}
|
|
24680
24678
|
},
|
|
24681
24679
|
{
|
|
@@ -24683,12 +24681,9 @@ var State = /*#__PURE__*/ function() {
|
|
|
24683
24681
|
get: function get() {
|
|
24684
24682
|
return (this.flags & 64) > 0;
|
|
24685
24683
|
},
|
|
24686
|
-
set: function set(
|
|
24687
|
-
if (
|
|
24688
|
-
|
|
24689
|
-
} else {
|
|
24690
|
-
this.flags &= ~64;
|
|
24691
|
-
}
|
|
24684
|
+
set: function set(v) {
|
|
24685
|
+
if (v) this.flags |= 64;
|
|
24686
|
+
else this.flags &= -65;
|
|
24692
24687
|
}
|
|
24693
24688
|
},
|
|
24694
24689
|
{
|
|
@@ -24696,12 +24691,9 @@ var State = /*#__PURE__*/ function() {
|
|
|
24696
24691
|
get: function get() {
|
|
24697
24692
|
return (this.flags & 128) > 0;
|
|
24698
24693
|
},
|
|
24699
|
-
set: function set(
|
|
24700
|
-
if (
|
|
24701
|
-
|
|
24702
|
-
} else {
|
|
24703
|
-
this.flags &= ~128;
|
|
24704
|
-
}
|
|
24694
|
+
set: function set(v) {
|
|
24695
|
+
if (v) this.flags |= 128;
|
|
24696
|
+
else this.flags &= -129;
|
|
24705
24697
|
}
|
|
24706
24698
|
},
|
|
24707
24699
|
{
|
|
@@ -24709,12 +24701,9 @@ var State = /*#__PURE__*/ function() {
|
|
|
24709
24701
|
get: function get() {
|
|
24710
24702
|
return (this.flags & 256) > 0;
|
|
24711
24703
|
},
|
|
24712
|
-
set: function set(
|
|
24713
|
-
if (
|
|
24714
|
-
|
|
24715
|
-
} else {
|
|
24716
|
-
this.flags &= ~256;
|
|
24717
|
-
}
|
|
24704
|
+
set: function set(v) {
|
|
24705
|
+
if (v) this.flags |= 256;
|
|
24706
|
+
else this.flags &= -257;
|
|
24718
24707
|
}
|
|
24719
24708
|
},
|
|
24720
24709
|
{
|
|
@@ -24722,12 +24711,9 @@ var State = /*#__PURE__*/ function() {
|
|
|
24722
24711
|
get: function get() {
|
|
24723
24712
|
return (this.flags & 512) > 0;
|
|
24724
24713
|
},
|
|
24725
|
-
set: function set(
|
|
24726
|
-
if (
|
|
24727
|
-
|
|
24728
|
-
} else {
|
|
24729
|
-
this.flags &= ~512;
|
|
24730
|
-
}
|
|
24714
|
+
set: function set(v) {
|
|
24715
|
+
if (v) this.flags |= 512;
|
|
24716
|
+
else this.flags &= -513;
|
|
24731
24717
|
}
|
|
24732
24718
|
},
|
|
24733
24719
|
{
|
|
@@ -24735,12 +24721,9 @@ var State = /*#__PURE__*/ function() {
|
|
|
24735
24721
|
get: function get() {
|
|
24736
24722
|
return (this.flags & 1024) > 0;
|
|
24737
24723
|
},
|
|
24738
|
-
set: function set(
|
|
24739
|
-
if (
|
|
24740
|
-
|
|
24741
|
-
} else {
|
|
24742
|
-
this.flags &= ~1024;
|
|
24743
|
-
}
|
|
24724
|
+
set: function set(v) {
|
|
24725
|
+
if (v) this.flags |= 1024;
|
|
24726
|
+
else this.flags &= -1025;
|
|
24744
24727
|
}
|
|
24745
24728
|
},
|
|
24746
24729
|
{
|
|
@@ -24748,12 +24731,9 @@ var State = /*#__PURE__*/ function() {
|
|
|
24748
24731
|
get: function get() {
|
|
24749
24732
|
return (this.flags & 2048) > 0;
|
|
24750
24733
|
},
|
|
24751
|
-
set: function set(
|
|
24752
|
-
if (
|
|
24753
|
-
|
|
24754
|
-
} else {
|
|
24755
|
-
this.flags &= ~2048;
|
|
24756
|
-
}
|
|
24734
|
+
set: function set(v) {
|
|
24735
|
+
if (v) this.flags |= 2048;
|
|
24736
|
+
else this.flags &= -2049;
|
|
24757
24737
|
}
|
|
24758
24738
|
},
|
|
24759
24739
|
{
|
|
@@ -25493,9 +25473,6 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
25493
25473
|
}
|
|
25494
25474
|
if (next === 123 || next === 91 && this.hasPlugin("recordAndTuple")) {
|
|
25495
25475
|
this.expectPlugin("recordAndTuple");
|
|
25496
|
-
if (this.getPluginOption("recordAndTuple", "syntaxType") === "bar") {
|
|
25497
|
-
throw this.raise(next === 123 ? Errors.RecordExpressionHashIncorrectStartSyntaxType : Errors.TupleExpressionHashIncorrectStartSyntaxType, this.state.curPosition());
|
|
25498
|
-
}
|
|
25499
25476
|
this.state.pos += 2;
|
|
25500
25477
|
if (next === 123) {
|
|
25501
25478
|
this.finishToken(7);
|
|
@@ -25592,22 +25569,6 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
25592
25569
|
this.finishOp(39, 2);
|
|
25593
25570
|
return;
|
|
25594
25571
|
}
|
|
25595
|
-
if (this.hasPlugin("recordAndTuple") && next === 125) {
|
|
25596
|
-
if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
|
|
25597
|
-
throw this.raise(Errors.RecordExpressionBarIncorrectEndSyntaxType, this.state.curPosition());
|
|
25598
|
-
}
|
|
25599
|
-
this.state.pos += 2;
|
|
25600
|
-
this.finishToken(9);
|
|
25601
|
-
return;
|
|
25602
|
-
}
|
|
25603
|
-
if (this.hasPlugin("recordAndTuple") && next === 93) {
|
|
25604
|
-
if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
|
|
25605
|
-
throw this.raise(Errors.TupleExpressionBarIncorrectEndSyntaxType, this.state.curPosition());
|
|
25606
|
-
}
|
|
25607
|
-
this.state.pos += 2;
|
|
25608
|
-
this.finishToken(4);
|
|
25609
|
-
return;
|
|
25610
|
-
}
|
|
25611
25572
|
}
|
|
25612
25573
|
if (next === 61) {
|
|
25613
25574
|
this.finishOp(30, 2);
|
|
@@ -25772,13 +25733,7 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
25772
25733
|
this.finishToken(12);
|
|
25773
25734
|
return;
|
|
25774
25735
|
case 91:
|
|
25775
|
-
|
|
25776
|
-
if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
|
|
25777
|
-
throw this.raise(Errors.TupleExpressionBarIncorrectStartSyntaxType, this.state.curPosition());
|
|
25778
|
-
}
|
|
25779
|
-
this.state.pos += 2;
|
|
25780
|
-
this.finishToken(2);
|
|
25781
|
-
} else {
|
|
25736
|
+
{
|
|
25782
25737
|
++this.state.pos;
|
|
25783
25738
|
this.finishToken(0);
|
|
25784
25739
|
}
|
|
@@ -25788,13 +25743,7 @@ var Tokenizer = /*#__PURE__*/ function(CommentsParser) {
|
|
|
25788
25743
|
this.finishToken(3);
|
|
25789
25744
|
return;
|
|
25790
25745
|
case 123:
|
|
25791
|
-
|
|
25792
|
-
if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
|
|
25793
|
-
throw this.raise(Errors.RecordExpressionBarIncorrectStartSyntaxType, this.state.curPosition());
|
|
25794
|
-
}
|
|
25795
|
-
this.state.pos += 2;
|
|
25796
|
-
this.finishToken(6);
|
|
25797
|
-
} else {
|
|
25746
|
+
{
|
|
25798
25747
|
++this.state.pos;
|
|
25799
25748
|
this.finishToken(5);
|
|
25800
25749
|
}
|
|
@@ -28175,52 +28124,58 @@ var flow = function(superClass) {
|
|
|
28175
28124
|
this.state.noAnonFunctionType = oldNoAnonFunctionType;
|
|
28176
28125
|
return type;
|
|
28177
28126
|
case 47:
|
|
28178
|
-
|
|
28179
|
-
|
|
28180
|
-
|
|
28181
|
-
|
|
28182
|
-
|
|
28183
|
-
|
|
28184
|
-
|
|
28185
|
-
|
|
28186
|
-
|
|
28187
|
-
|
|
28127
|
+
{
|
|
28128
|
+
var node2 = this.startNode();
|
|
28129
|
+
node2.typeParameters = this.flowParseTypeParameterDeclaration();
|
|
28130
|
+
this.expect(10);
|
|
28131
|
+
tmp = this.flowParseFunctionTypeParams();
|
|
28132
|
+
node2.params = tmp.params;
|
|
28133
|
+
node2.rest = tmp.rest;
|
|
28134
|
+
node2.this = tmp._this;
|
|
28135
|
+
this.expect(11);
|
|
28136
|
+
this.expect(19);
|
|
28137
|
+
node2.returnType = this.flowParseType();
|
|
28138
|
+
return this.finishNode(node2, "FunctionTypeAnnotation");
|
|
28139
|
+
}
|
|
28188
28140
|
case 10:
|
|
28189
|
-
|
|
28190
|
-
|
|
28191
|
-
|
|
28192
|
-
|
|
28193
|
-
|
|
28194
|
-
|
|
28195
|
-
|
|
28141
|
+
{
|
|
28142
|
+
var node21 = this.startNode();
|
|
28143
|
+
this.next();
|
|
28144
|
+
if (!this.match(11) && !this.match(21)) {
|
|
28145
|
+
if (tokenIsIdentifier(this.state.type) || this.match(78)) {
|
|
28146
|
+
var token = this.lookahead().type;
|
|
28147
|
+
isGroupedType = token !== 17 && token !== 14;
|
|
28148
|
+
} else {
|
|
28149
|
+
isGroupedType = true;
|
|
28150
|
+
}
|
|
28196
28151
|
}
|
|
28197
|
-
|
|
28198
|
-
|
|
28199
|
-
|
|
28200
|
-
|
|
28201
|
-
|
|
28202
|
-
|
|
28203
|
-
|
|
28204
|
-
|
|
28152
|
+
if (isGroupedType) {
|
|
28153
|
+
this.state.noAnonFunctionType = false;
|
|
28154
|
+
type = this.flowParseType();
|
|
28155
|
+
this.state.noAnonFunctionType = oldNoAnonFunctionType;
|
|
28156
|
+
if (this.state.noAnonFunctionType || !(this.match(12) || this.match(11) && this.lookahead().type === 19)) {
|
|
28157
|
+
this.expect(11);
|
|
28158
|
+
return type;
|
|
28159
|
+
} else {
|
|
28160
|
+
this.eat(12);
|
|
28161
|
+
}
|
|
28162
|
+
}
|
|
28163
|
+
if (type) {
|
|
28164
|
+
tmp = this.flowParseFunctionTypeParams([
|
|
28165
|
+
this.reinterpretTypeAsFunctionTypeParam(type)
|
|
28166
|
+
]);
|
|
28205
28167
|
} else {
|
|
28206
|
-
this.
|
|
28168
|
+
tmp = this.flowParseFunctionTypeParams();
|
|
28207
28169
|
}
|
|
28170
|
+
node21.params = tmp.params;
|
|
28171
|
+
node21.rest = tmp.rest;
|
|
28172
|
+
node21.this = tmp._this;
|
|
28173
|
+
this.expect(11);
|
|
28174
|
+
this.expect(19);
|
|
28175
|
+
node21.returnType = this.flowParseType();
|
|
28176
|
+
node21.typeParameters = null;
|
|
28177
|
+
return this.finishNode(node21, "FunctionTypeAnnotation");
|
|
28208
28178
|
}
|
|
28209
|
-
if (type) {
|
|
28210
|
-
tmp = this.flowParseFunctionTypeParams([
|
|
28211
|
-
this.reinterpretTypeAsFunctionTypeParam(type)
|
|
28212
|
-
]);
|
|
28213
|
-
} else {
|
|
28214
|
-
tmp = this.flowParseFunctionTypeParams();
|
|
28215
|
-
}
|
|
28216
|
-
node.params = tmp.params;
|
|
28217
|
-
node.rest = tmp.rest;
|
|
28218
|
-
node.this = tmp._this;
|
|
28219
|
-
this.expect(11);
|
|
28220
|
-
this.expect(19);
|
|
28221
|
-
node.returnType = this.flowParseType();
|
|
28222
|
-
node.typeParameters = null;
|
|
28223
|
-
return this.finishNode(node, "FunctionTypeAnnotation");
|
|
28224
28179
|
case 133:
|
|
28225
28180
|
return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
|
|
28226
28181
|
case 85:
|
|
@@ -28607,7 +28562,7 @@ var flow = function(superClass) {
|
|
|
28607
28562
|
var arrows = [];
|
|
28608
28563
|
while(stack.length !== 0){
|
|
28609
28564
|
var node2 = stack.pop();
|
|
28610
|
-
if (node2.type === "ArrowFunctionExpression") {
|
|
28565
|
+
if (node2.type === "ArrowFunctionExpression" && node2.body.type !== "BlockStatement") {
|
|
28611
28566
|
if (node2.typeParameters || !node2.returnType) {
|
|
28612
28567
|
this.finishArrowValidation(node2);
|
|
28613
28568
|
} else {
|
|
@@ -28662,18 +28617,18 @@ var flow = function(superClass) {
|
|
|
28662
28617
|
{
|
|
28663
28618
|
key: "parseParenItem",
|
|
28664
28619
|
value: function parseParenItem(node, startLoc) {
|
|
28665
|
-
|
|
28620
|
+
var newNode = _get(_get_prototype_of(FlowParserMixin.prototype), "parseParenItem", this).call(this, node, startLoc);
|
|
28666
28621
|
if (this.eat(17)) {
|
|
28667
|
-
|
|
28622
|
+
newNode.optional = true;
|
|
28668
28623
|
this.resetEndLocation(node);
|
|
28669
28624
|
}
|
|
28670
28625
|
if (this.match(14)) {
|
|
28671
28626
|
var typeCastNode = this.startNodeAt(startLoc);
|
|
28672
|
-
typeCastNode.expression =
|
|
28627
|
+
typeCastNode.expression = newNode;
|
|
28673
28628
|
typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
|
|
28674
28629
|
return this.finishNode(typeCastNode, "TypeCastExpression");
|
|
28675
28630
|
}
|
|
28676
|
-
return
|
|
28631
|
+
return newNode;
|
|
28677
28632
|
}
|
|
28678
28633
|
},
|
|
28679
28634
|
{
|
|
@@ -29944,254 +29899,254 @@ var entities = {
|
|
|
29944
29899
|
apos: "'",
|
|
29945
29900
|
lt: "<",
|
|
29946
29901
|
gt: ">",
|
|
29947
|
-
nbsp: "\
|
|
29948
|
-
iexcl: "\
|
|
29949
|
-
cent: "\
|
|
29950
|
-
pound: "\
|
|
29951
|
-
curren: "\
|
|
29952
|
-
yen: "\
|
|
29953
|
-
brvbar: "\
|
|
29954
|
-
sect: "\
|
|
29955
|
-
uml: "\
|
|
29956
|
-
copy: "\
|
|
29957
|
-
ordf: "\
|
|
29958
|
-
laquo: "\
|
|
29959
|
-
not: "\
|
|
29960
|
-
shy: "\
|
|
29961
|
-
reg: "\
|
|
29962
|
-
macr: "\
|
|
29963
|
-
deg: "\
|
|
29964
|
-
plusmn: "\
|
|
29965
|
-
sup2: "\
|
|
29966
|
-
sup3: "\
|
|
29967
|
-
acute: "\
|
|
29968
|
-
micro: "\
|
|
29969
|
-
para: "\
|
|
29970
|
-
middot: "\
|
|
29971
|
-
cedil: "\
|
|
29972
|
-
sup1: "\
|
|
29973
|
-
ordm: "\
|
|
29974
|
-
raquo: "\
|
|
29975
|
-
frac14: "\
|
|
29976
|
-
frac12: "\
|
|
29977
|
-
frac34: "\
|
|
29978
|
-
iquest: "\
|
|
29979
|
-
Agrave: "\
|
|
29980
|
-
Aacute: "\
|
|
29981
|
-
Acirc: "\
|
|
29982
|
-
Atilde: "\
|
|
29983
|
-
Auml: "\
|
|
29984
|
-
Aring: "\
|
|
29985
|
-
AElig: "\
|
|
29986
|
-
Ccedil: "\
|
|
29987
|
-
Egrave: "\
|
|
29988
|
-
Eacute: "\
|
|
29989
|
-
Ecirc: "\
|
|
29990
|
-
Euml: "\
|
|
29991
|
-
Igrave: "\
|
|
29992
|
-
Iacute: "\
|
|
29993
|
-
Icirc: "\
|
|
29994
|
-
Iuml: "\
|
|
29995
|
-
ETH: "\
|
|
29996
|
-
Ntilde: "\
|
|
29997
|
-
Ograve: "\
|
|
29998
|
-
Oacute: "\
|
|
29999
|
-
Ocirc: "\
|
|
30000
|
-
Otilde: "\
|
|
30001
|
-
Ouml: "\
|
|
30002
|
-
times: "\
|
|
30003
|
-
Oslash: "\
|
|
30004
|
-
Ugrave: "\
|
|
30005
|
-
Uacute: "\
|
|
30006
|
-
Ucirc: "\
|
|
30007
|
-
Uuml: "\
|
|
30008
|
-
Yacute: "\
|
|
30009
|
-
THORN: "\
|
|
30010
|
-
szlig: "\
|
|
30011
|
-
agrave: "\
|
|
30012
|
-
aacute: "\
|
|
30013
|
-
acirc: "\
|
|
30014
|
-
atilde: "\
|
|
30015
|
-
auml: "\
|
|
30016
|
-
aring: "\
|
|
30017
|
-
aelig: "\
|
|
30018
|
-
ccedil: "\
|
|
30019
|
-
egrave: "\
|
|
30020
|
-
eacute: "\
|
|
30021
|
-
ecirc: "\
|
|
30022
|
-
euml: "\
|
|
30023
|
-
igrave: "\
|
|
30024
|
-
iacute: "\
|
|
30025
|
-
icirc: "\
|
|
30026
|
-
iuml: "\
|
|
30027
|
-
eth: "\
|
|
30028
|
-
ntilde: "\
|
|
30029
|
-
ograve: "\
|
|
30030
|
-
oacute: "\
|
|
30031
|
-
ocirc: "\
|
|
30032
|
-
otilde: "\
|
|
30033
|
-
ouml: "\
|
|
30034
|
-
divide: "\
|
|
30035
|
-
oslash: "\
|
|
30036
|
-
ugrave: "\
|
|
30037
|
-
uacute: "\
|
|
30038
|
-
ucirc: "\
|
|
30039
|
-
uuml: "\
|
|
30040
|
-
yacute: "\
|
|
30041
|
-
thorn: "\
|
|
30042
|
-
yuml: "\
|
|
30043
|
-
OElig: "
|
|
30044
|
-
oelig: "
|
|
30045
|
-
Scaron: "
|
|
30046
|
-
scaron: "
|
|
30047
|
-
Yuml: "
|
|
30048
|
-
fnof: "
|
|
30049
|
-
circ: "
|
|
30050
|
-
tilde: "
|
|
30051
|
-
Alpha: "
|
|
30052
|
-
Beta: "
|
|
30053
|
-
Gamma: "
|
|
30054
|
-
Delta: "
|
|
30055
|
-
Epsilon: "
|
|
30056
|
-
Zeta: "
|
|
30057
|
-
Eta: "
|
|
30058
|
-
Theta: "
|
|
30059
|
-
Iota: "
|
|
30060
|
-
Kappa: "
|
|
30061
|
-
Lambda: "
|
|
30062
|
-
Mu: "
|
|
30063
|
-
Nu: "
|
|
30064
|
-
Xi: "
|
|
30065
|
-
Omicron: "
|
|
30066
|
-
Pi: "
|
|
30067
|
-
Rho: "
|
|
30068
|
-
Sigma: "
|
|
30069
|
-
Tau: "
|
|
30070
|
-
Upsilon: "
|
|
30071
|
-
Phi: "
|
|
30072
|
-
Chi: "
|
|
30073
|
-
Psi: "
|
|
30074
|
-
Omega: "
|
|
30075
|
-
alpha: "
|
|
30076
|
-
beta: "
|
|
30077
|
-
gamma: "
|
|
30078
|
-
delta: "
|
|
30079
|
-
epsilon: "
|
|
30080
|
-
zeta: "
|
|
30081
|
-
eta: "
|
|
30082
|
-
theta: "
|
|
30083
|
-
iota: "
|
|
30084
|
-
kappa: "
|
|
30085
|
-
lambda: "
|
|
30086
|
-
mu: "
|
|
30087
|
-
nu: "
|
|
30088
|
-
xi: "
|
|
30089
|
-
omicron: "
|
|
30090
|
-
pi: "
|
|
30091
|
-
rho: "
|
|
30092
|
-
sigmaf: "
|
|
30093
|
-
sigma: "
|
|
30094
|
-
tau: "
|
|
30095
|
-
upsilon: "
|
|
30096
|
-
phi: "
|
|
30097
|
-
chi: "
|
|
30098
|
-
psi: "
|
|
30099
|
-
omega: "
|
|
30100
|
-
thetasym: "
|
|
30101
|
-
upsih: "
|
|
30102
|
-
piv: "
|
|
30103
|
-
ensp: "
|
|
30104
|
-
emsp: "
|
|
30105
|
-
thinsp: "
|
|
30106
|
-
zwnj: "
|
|
30107
|
-
zwj: "
|
|
30108
|
-
lrm: "
|
|
30109
|
-
rlm: "
|
|
30110
|
-
ndash: "
|
|
30111
|
-
mdash: "
|
|
30112
|
-
lsquo: "
|
|
30113
|
-
rsquo: "
|
|
30114
|
-
sbquo: "
|
|
30115
|
-
ldquo: "
|
|
30116
|
-
rdquo: "
|
|
30117
|
-
bdquo: "
|
|
30118
|
-
dagger: "
|
|
30119
|
-
Dagger: "
|
|
30120
|
-
bull: "
|
|
30121
|
-
hellip: "
|
|
30122
|
-
permil: "
|
|
30123
|
-
prime: "
|
|
30124
|
-
Prime: "
|
|
30125
|
-
lsaquo: "
|
|
30126
|
-
rsaquo: "
|
|
30127
|
-
oline: "
|
|
30128
|
-
frasl: "
|
|
30129
|
-
euro: "
|
|
30130
|
-
image: "
|
|
30131
|
-
weierp: "
|
|
30132
|
-
real: "
|
|
30133
|
-
trade: "
|
|
30134
|
-
alefsym: "
|
|
30135
|
-
larr: "
|
|
30136
|
-
uarr: "
|
|
30137
|
-
rarr: "
|
|
30138
|
-
darr: "
|
|
30139
|
-
harr: "
|
|
30140
|
-
crarr: "
|
|
30141
|
-
lArr: "
|
|
30142
|
-
uArr: "
|
|
30143
|
-
rArr: "
|
|
30144
|
-
dArr: "
|
|
30145
|
-
hArr: "
|
|
30146
|
-
forall: "
|
|
30147
|
-
part: "
|
|
30148
|
-
exist: "
|
|
30149
|
-
empty: "
|
|
30150
|
-
nabla: "
|
|
30151
|
-
isin: "
|
|
30152
|
-
notin: "
|
|
30153
|
-
ni: "
|
|
30154
|
-
prod: "
|
|
30155
|
-
sum: "
|
|
30156
|
-
minus: "
|
|
30157
|
-
lowast: "
|
|
30158
|
-
radic: "
|
|
30159
|
-
prop: "
|
|
30160
|
-
infin: "
|
|
30161
|
-
ang: "
|
|
30162
|
-
and: "
|
|
30163
|
-
or: "
|
|
30164
|
-
cap: "
|
|
30165
|
-
cup: "
|
|
30166
|
-
int: "
|
|
30167
|
-
there4: "
|
|
30168
|
-
sim: "
|
|
30169
|
-
cong: "
|
|
30170
|
-
asymp: "
|
|
30171
|
-
ne: "
|
|
30172
|
-
equiv: "
|
|
30173
|
-
le: "
|
|
30174
|
-
ge: "
|
|
30175
|
-
sub: "
|
|
30176
|
-
sup: "
|
|
30177
|
-
nsub: "
|
|
30178
|
-
sube: "
|
|
30179
|
-
supe: "
|
|
30180
|
-
oplus: "
|
|
30181
|
-
otimes: "
|
|
30182
|
-
perp: "
|
|
30183
|
-
sdot: "
|
|
30184
|
-
lceil: "
|
|
30185
|
-
rceil: "
|
|
30186
|
-
lfloor: "
|
|
30187
|
-
rfloor: "
|
|
30188
|
-
lang: "
|
|
30189
|
-
rang: "
|
|
30190
|
-
loz: "
|
|
30191
|
-
spades: "
|
|
30192
|
-
clubs: "
|
|
30193
|
-
hearts: "
|
|
30194
|
-
diams: "
|
|
29902
|
+
nbsp: "\xA0",
|
|
29903
|
+
iexcl: "\xA1",
|
|
29904
|
+
cent: "\xA2",
|
|
29905
|
+
pound: "\xA3",
|
|
29906
|
+
curren: "\xA4",
|
|
29907
|
+
yen: "\xA5",
|
|
29908
|
+
brvbar: "\xA6",
|
|
29909
|
+
sect: "\xA7",
|
|
29910
|
+
uml: "\xA8",
|
|
29911
|
+
copy: "\xA9",
|
|
29912
|
+
ordf: "\xAA",
|
|
29913
|
+
laquo: "\xAB",
|
|
29914
|
+
not: "\xAC",
|
|
29915
|
+
shy: "\xAD",
|
|
29916
|
+
reg: "\xAE",
|
|
29917
|
+
macr: "\xAF",
|
|
29918
|
+
deg: "\xB0",
|
|
29919
|
+
plusmn: "\xB1",
|
|
29920
|
+
sup2: "\xB2",
|
|
29921
|
+
sup3: "\xB3",
|
|
29922
|
+
acute: "\xB4",
|
|
29923
|
+
micro: "\xB5",
|
|
29924
|
+
para: "\xB6",
|
|
29925
|
+
middot: "\xB7",
|
|
29926
|
+
cedil: "\xB8",
|
|
29927
|
+
sup1: "\xB9",
|
|
29928
|
+
ordm: "\xBA",
|
|
29929
|
+
raquo: "\xBB",
|
|
29930
|
+
frac14: "\xBC",
|
|
29931
|
+
frac12: "\xBD",
|
|
29932
|
+
frac34: "\xBE",
|
|
29933
|
+
iquest: "\xBF",
|
|
29934
|
+
Agrave: "\xC0",
|
|
29935
|
+
Aacute: "\xC1",
|
|
29936
|
+
Acirc: "\xC2",
|
|
29937
|
+
Atilde: "\xC3",
|
|
29938
|
+
Auml: "\xC4",
|
|
29939
|
+
Aring: "\xC5",
|
|
29940
|
+
AElig: "\xC6",
|
|
29941
|
+
Ccedil: "\xC7",
|
|
29942
|
+
Egrave: "\xC8",
|
|
29943
|
+
Eacute: "\xC9",
|
|
29944
|
+
Ecirc: "\xCA",
|
|
29945
|
+
Euml: "\xCB",
|
|
29946
|
+
Igrave: "\xCC",
|
|
29947
|
+
Iacute: "\xCD",
|
|
29948
|
+
Icirc: "\xCE",
|
|
29949
|
+
Iuml: "\xCF",
|
|
29950
|
+
ETH: "\xD0",
|
|
29951
|
+
Ntilde: "\xD1",
|
|
29952
|
+
Ograve: "\xD2",
|
|
29953
|
+
Oacute: "\xD3",
|
|
29954
|
+
Ocirc: "\xD4",
|
|
29955
|
+
Otilde: "\xD5",
|
|
29956
|
+
Ouml: "\xD6",
|
|
29957
|
+
times: "\xD7",
|
|
29958
|
+
Oslash: "\xD8",
|
|
29959
|
+
Ugrave: "\xD9",
|
|
29960
|
+
Uacute: "\xDA",
|
|
29961
|
+
Ucirc: "\xDB",
|
|
29962
|
+
Uuml: "\xDC",
|
|
29963
|
+
Yacute: "\xDD",
|
|
29964
|
+
THORN: "\xDE",
|
|
29965
|
+
szlig: "\xDF",
|
|
29966
|
+
agrave: "\xE0",
|
|
29967
|
+
aacute: "\xE1",
|
|
29968
|
+
acirc: "\xE2",
|
|
29969
|
+
atilde: "\xE3",
|
|
29970
|
+
auml: "\xE4",
|
|
29971
|
+
aring: "\xE5",
|
|
29972
|
+
aelig: "\xE6",
|
|
29973
|
+
ccedil: "\xE7",
|
|
29974
|
+
egrave: "\xE8",
|
|
29975
|
+
eacute: "\xE9",
|
|
29976
|
+
ecirc: "\xEA",
|
|
29977
|
+
euml: "\xEB",
|
|
29978
|
+
igrave: "\xEC",
|
|
29979
|
+
iacute: "\xED",
|
|
29980
|
+
icirc: "\xEE",
|
|
29981
|
+
iuml: "\xEF",
|
|
29982
|
+
eth: "\xF0",
|
|
29983
|
+
ntilde: "\xF1",
|
|
29984
|
+
ograve: "\xF2",
|
|
29985
|
+
oacute: "\xF3",
|
|
29986
|
+
ocirc: "\xF4",
|
|
29987
|
+
otilde: "\xF5",
|
|
29988
|
+
ouml: "\xF6",
|
|
29989
|
+
divide: "\xF7",
|
|
29990
|
+
oslash: "\xF8",
|
|
29991
|
+
ugrave: "\xF9",
|
|
29992
|
+
uacute: "\xFA",
|
|
29993
|
+
ucirc: "\xFB",
|
|
29994
|
+
uuml: "\xFC",
|
|
29995
|
+
yacute: "\xFD",
|
|
29996
|
+
thorn: "\xFE",
|
|
29997
|
+
yuml: "\xFF",
|
|
29998
|
+
OElig: "\u0152",
|
|
29999
|
+
oelig: "\u0153",
|
|
30000
|
+
Scaron: "\u0160",
|
|
30001
|
+
scaron: "\u0161",
|
|
30002
|
+
Yuml: "\u0178",
|
|
30003
|
+
fnof: "\u0192",
|
|
30004
|
+
circ: "\u02C6",
|
|
30005
|
+
tilde: "\u02DC",
|
|
30006
|
+
Alpha: "\u0391",
|
|
30007
|
+
Beta: "\u0392",
|
|
30008
|
+
Gamma: "\u0393",
|
|
30009
|
+
Delta: "\u0394",
|
|
30010
|
+
Epsilon: "\u0395",
|
|
30011
|
+
Zeta: "\u0396",
|
|
30012
|
+
Eta: "\u0397",
|
|
30013
|
+
Theta: "\u0398",
|
|
30014
|
+
Iota: "\u0399",
|
|
30015
|
+
Kappa: "\u039A",
|
|
30016
|
+
Lambda: "\u039B",
|
|
30017
|
+
Mu: "\u039C",
|
|
30018
|
+
Nu: "\u039D",
|
|
30019
|
+
Xi: "\u039E",
|
|
30020
|
+
Omicron: "\u039F",
|
|
30021
|
+
Pi: "\u03A0",
|
|
30022
|
+
Rho: "\u03A1",
|
|
30023
|
+
Sigma: "\u03A3",
|
|
30024
|
+
Tau: "\u03A4",
|
|
30025
|
+
Upsilon: "\u03A5",
|
|
30026
|
+
Phi: "\u03A6",
|
|
30027
|
+
Chi: "\u03A7",
|
|
30028
|
+
Psi: "\u03A8",
|
|
30029
|
+
Omega: "\u03A9",
|
|
30030
|
+
alpha: "\u03B1",
|
|
30031
|
+
beta: "\u03B2",
|
|
30032
|
+
gamma: "\u03B3",
|
|
30033
|
+
delta: "\u03B4",
|
|
30034
|
+
epsilon: "\u03B5",
|
|
30035
|
+
zeta: "\u03B6",
|
|
30036
|
+
eta: "\u03B7",
|
|
30037
|
+
theta: "\u03B8",
|
|
30038
|
+
iota: "\u03B9",
|
|
30039
|
+
kappa: "\u03BA",
|
|
30040
|
+
lambda: "\u03BB",
|
|
30041
|
+
mu: "\u03BC",
|
|
30042
|
+
nu: "\u03BD",
|
|
30043
|
+
xi: "\u03BE",
|
|
30044
|
+
omicron: "\u03BF",
|
|
30045
|
+
pi: "\u03C0",
|
|
30046
|
+
rho: "\u03C1",
|
|
30047
|
+
sigmaf: "\u03C2",
|
|
30048
|
+
sigma: "\u03C3",
|
|
30049
|
+
tau: "\u03C4",
|
|
30050
|
+
upsilon: "\u03C5",
|
|
30051
|
+
phi: "\u03C6",
|
|
30052
|
+
chi: "\u03C7",
|
|
30053
|
+
psi: "\u03C8",
|
|
30054
|
+
omega: "\u03C9",
|
|
30055
|
+
thetasym: "\u03D1",
|
|
30056
|
+
upsih: "\u03D2",
|
|
30057
|
+
piv: "\u03D6",
|
|
30058
|
+
ensp: "\u2002",
|
|
30059
|
+
emsp: "\u2003",
|
|
30060
|
+
thinsp: "\u2009",
|
|
30061
|
+
zwnj: "\u200C",
|
|
30062
|
+
zwj: "\u200D",
|
|
30063
|
+
lrm: "\u200E",
|
|
30064
|
+
rlm: "\u200F",
|
|
30065
|
+
ndash: "\u2013",
|
|
30066
|
+
mdash: "\u2014",
|
|
30067
|
+
lsquo: "\u2018",
|
|
30068
|
+
rsquo: "\u2019",
|
|
30069
|
+
sbquo: "\u201A",
|
|
30070
|
+
ldquo: "\u201C",
|
|
30071
|
+
rdquo: "\u201D",
|
|
30072
|
+
bdquo: "\u201E",
|
|
30073
|
+
dagger: "\u2020",
|
|
30074
|
+
Dagger: "\u2021",
|
|
30075
|
+
bull: "\u2022",
|
|
30076
|
+
hellip: "\u2026",
|
|
30077
|
+
permil: "\u2030",
|
|
30078
|
+
prime: "\u2032",
|
|
30079
|
+
Prime: "\u2033",
|
|
30080
|
+
lsaquo: "\u2039",
|
|
30081
|
+
rsaquo: "\u203A",
|
|
30082
|
+
oline: "\u203E",
|
|
30083
|
+
frasl: "\u2044",
|
|
30084
|
+
euro: "\u20AC",
|
|
30085
|
+
image: "\u2111",
|
|
30086
|
+
weierp: "\u2118",
|
|
30087
|
+
real: "\u211C",
|
|
30088
|
+
trade: "\u2122",
|
|
30089
|
+
alefsym: "\u2135",
|
|
30090
|
+
larr: "\u2190",
|
|
30091
|
+
uarr: "\u2191",
|
|
30092
|
+
rarr: "\u2192",
|
|
30093
|
+
darr: "\u2193",
|
|
30094
|
+
harr: "\u2194",
|
|
30095
|
+
crarr: "\u21B5",
|
|
30096
|
+
lArr: "\u21D0",
|
|
30097
|
+
uArr: "\u21D1",
|
|
30098
|
+
rArr: "\u21D2",
|
|
30099
|
+
dArr: "\u21D3",
|
|
30100
|
+
hArr: "\u21D4",
|
|
30101
|
+
forall: "\u2200",
|
|
30102
|
+
part: "\u2202",
|
|
30103
|
+
exist: "\u2203",
|
|
30104
|
+
empty: "\u2205",
|
|
30105
|
+
nabla: "\u2207",
|
|
30106
|
+
isin: "\u2208",
|
|
30107
|
+
notin: "\u2209",
|
|
30108
|
+
ni: "\u220B",
|
|
30109
|
+
prod: "\u220F",
|
|
30110
|
+
sum: "\u2211",
|
|
30111
|
+
minus: "\u2212",
|
|
30112
|
+
lowast: "\u2217",
|
|
30113
|
+
radic: "\u221A",
|
|
30114
|
+
prop: "\u221D",
|
|
30115
|
+
infin: "\u221E",
|
|
30116
|
+
ang: "\u2220",
|
|
30117
|
+
and: "\u2227",
|
|
30118
|
+
or: "\u2228",
|
|
30119
|
+
cap: "\u2229",
|
|
30120
|
+
cup: "\u222A",
|
|
30121
|
+
int: "\u222B",
|
|
30122
|
+
there4: "\u2234",
|
|
30123
|
+
sim: "\u223C",
|
|
30124
|
+
cong: "\u2245",
|
|
30125
|
+
asymp: "\u2248",
|
|
30126
|
+
ne: "\u2260",
|
|
30127
|
+
equiv: "\u2261",
|
|
30128
|
+
le: "\u2264",
|
|
30129
|
+
ge: "\u2265",
|
|
30130
|
+
sub: "\u2282",
|
|
30131
|
+
sup: "\u2283",
|
|
30132
|
+
nsub: "\u2284",
|
|
30133
|
+
sube: "\u2286",
|
|
30134
|
+
supe: "\u2287",
|
|
30135
|
+
oplus: "\u2295",
|
|
30136
|
+
otimes: "\u2297",
|
|
30137
|
+
perp: "\u22A5",
|
|
30138
|
+
sdot: "\u22C5",
|
|
30139
|
+
lceil: "\u2308",
|
|
30140
|
+
rceil: "\u2309",
|
|
30141
|
+
lfloor: "\u230A",
|
|
30142
|
+
rfloor: "\u230B",
|
|
30143
|
+
lang: "\u2329",
|
|
30144
|
+
rang: "\u232A",
|
|
30145
|
+
loz: "\u25CA",
|
|
30146
|
+
spades: "\u2660",
|
|
30147
|
+
clubs: "\u2663",
|
|
30148
|
+
hearts: "\u2665",
|
|
30149
|
+
diams: "\u2666"
|
|
30195
30150
|
};
|
|
30196
30151
|
var JsxErrors = ParseErrorEnum(_templateObject2())({
|
|
30197
30152
|
AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.",
|
|
@@ -30347,7 +30302,7 @@ var jsx = function(superClass) {
|
|
|
30347
30302
|
} else {
|
|
30348
30303
|
var count = 0;
|
|
30349
30304
|
var semi = false;
|
|
30350
|
-
while(count++ < 10 && this.state.pos < this.length && !(semi = this.codePointAtPos(this.state.pos)
|
|
30305
|
+
while(count++ < 10 && this.state.pos < this.length && !(semi = this.codePointAtPos(this.state.pos) === 59)){
|
|
30351
30306
|
++this.state.pos;
|
|
30352
30307
|
}
|
|
30353
30308
|
if (semi) {
|
|
@@ -30554,7 +30509,7 @@ var jsx = function(superClass) {
|
|
|
30554
30509
|
children.push(this.jsxParseElementAt(startLoc));
|
|
30555
30510
|
break;
|
|
30556
30511
|
case 141:
|
|
30557
|
-
children.push(this.
|
|
30512
|
+
children.push(this.parseLiteral(this.state.value, "JSXText"));
|
|
30558
30513
|
break;
|
|
30559
30514
|
case 5:
|
|
30560
30515
|
{
|
|
@@ -30618,9 +30573,7 @@ var jsx = function(superClass) {
|
|
|
30618
30573
|
{
|
|
30619
30574
|
key: "parseExprAtom",
|
|
30620
30575
|
value: function parseExprAtom(refExpressionErrors) {
|
|
30621
|
-
if (this.match(
|
|
30622
|
-
return this.parseLiteral(this.state.value, "JSXText");
|
|
30623
|
-
} else if (this.match(142)) {
|
|
30576
|
+
if (this.match(142)) {
|
|
30624
30577
|
return this.jsxParseElement();
|
|
30625
30578
|
} else if (this.match(47) && this.input.charCodeAt(this.state.pos) !== 33) {
|
|
30626
30579
|
this.replaceToken(142);
|
|
@@ -30735,7 +30688,7 @@ var TypeScriptScopeHandler = /*#__PURE__*/ function(ScopeHandler) {
|
|
|
30735
30688
|
{
|
|
30736
30689
|
key: "enter",
|
|
30737
30690
|
value: function enter(flags) {
|
|
30738
|
-
if (flags
|
|
30691
|
+
if (flags === 256) {
|
|
30739
30692
|
this.importsStack.push(/* @__PURE__ */ new Set());
|
|
30740
30693
|
}
|
|
30741
30694
|
_get(_get_prototype_of(TypeScriptScopeHandler.prototype), "enter", this).call(this, flags);
|
|
@@ -30745,7 +30698,7 @@ var TypeScriptScopeHandler = /*#__PURE__*/ function(ScopeHandler) {
|
|
|
30745
30698
|
key: "exit",
|
|
30746
30699
|
value: function exit() {
|
|
30747
30700
|
var flags = _get(_get_prototype_of(TypeScriptScopeHandler.prototype), "exit", this).call(this);
|
|
30748
|
-
if (flags
|
|
30701
|
+
if (flags === 256) {
|
|
30749
30702
|
this.importsStack.pop();
|
|
30750
30703
|
}
|
|
30751
30704
|
return flags;
|
|
@@ -31131,11 +31084,12 @@ var LValParser = /*#__PURE__*/ function(NodeUtils) {
|
|
|
31131
31084
|
{
|
|
31132
31085
|
key: "parseBindingProperty",
|
|
31133
31086
|
value: function parseBindingProperty() {
|
|
31134
|
-
var prop = this.startNode();
|
|
31135
31087
|
var _this_state = this.state, type = _this_state.type, startLoc = _this_state.startLoc;
|
|
31136
31088
|
if (type === 21) {
|
|
31137
|
-
return this.parseBindingRestProperty(
|
|
31138
|
-
}
|
|
31089
|
+
return this.parseBindingRestProperty(this.startNode());
|
|
31090
|
+
}
|
|
31091
|
+
var prop = this.startNode();
|
|
31092
|
+
if (type === 138) {
|
|
31139
31093
|
this.expectPlugin("destructuringPrivate", startLoc);
|
|
31140
31094
|
this.classScope.usePrivateName(this.state.value, startLoc);
|
|
31141
31095
|
prop.key = this.parsePrivateName();
|
|
@@ -33529,13 +33483,14 @@ var typescript = function(superClass) {
|
|
|
33529
33483
|
value: function parseExport(node, decorators) {
|
|
33530
33484
|
if (this.match(83)) {
|
|
33531
33485
|
this.next();
|
|
33486
|
+
var nodeImportEquals = node;
|
|
33532
33487
|
var maybeDefaultIdentifier = null;
|
|
33533
33488
|
if (this.isContextual(130) && this.isPotentialImportPhase(false)) {
|
|
33534
|
-
maybeDefaultIdentifier = this.parseMaybeImportPhase(
|
|
33489
|
+
maybeDefaultIdentifier = this.parseMaybeImportPhase(nodeImportEquals, false);
|
|
33535
33490
|
} else {
|
|
33536
|
-
|
|
33491
|
+
nodeImportEquals.importKind = "value";
|
|
33537
33492
|
}
|
|
33538
|
-
return this.tsParseImportEqualsDeclaration(
|
|
33493
|
+
return this.tsParseImportEqualsDeclaration(nodeImportEquals, maybeDefaultIdentifier, true);
|
|
33539
33494
|
} else if (this.eat(29)) {
|
|
33540
33495
|
var assign = node;
|
|
33541
33496
|
assign.expression = _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseExpression", this).call(this);
|
|
@@ -33782,9 +33737,9 @@ var typescript = function(superClass) {
|
|
|
33782
33737
|
{
|
|
33783
33738
|
key: "parseParenItem",
|
|
33784
33739
|
value: function parseParenItem(node, startLoc) {
|
|
33785
|
-
|
|
33740
|
+
var newNode = _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseParenItem", this).call(this, node, startLoc);
|
|
33786
33741
|
if (this.eat(17)) {
|
|
33787
|
-
|
|
33742
|
+
newNode.optional = true;
|
|
33788
33743
|
this.resetEndLocation(node);
|
|
33789
33744
|
}
|
|
33790
33745
|
if (this.match(14)) {
|
|
@@ -33918,7 +33873,9 @@ var typescript = function(superClass) {
|
|
|
33918
33873
|
key: "declareClassPrivateMethodInScope",
|
|
33919
33874
|
value: function declareClassPrivateMethodInScope(node, kind) {
|
|
33920
33875
|
if (node.type === "TSDeclareMethod") return;
|
|
33921
|
-
if (node.type === "MethodDefinition" && !node.value
|
|
33876
|
+
if (node.type === "MethodDefinition" && !Object.hasOwn(node.value, "body")) {
|
|
33877
|
+
return;
|
|
33878
|
+
}
|
|
33922
33879
|
_get(_get_prototype_of(TypeScriptParserMixin.prototype), "declareClassPrivateMethodInScope", this).call(this, node, kind);
|
|
33923
33880
|
}
|
|
33924
33881
|
},
|
|
@@ -34177,6 +34134,7 @@ var typescript = function(superClass) {
|
|
|
34177
34134
|
TSTypeCastExpression: true,
|
|
34178
34135
|
TSParameterProperty: "parameter",
|
|
34179
34136
|
TSNonNullExpression: "expression",
|
|
34137
|
+
TSInstantiationExpression: "expression",
|
|
34180
34138
|
TSAsExpression: (binding !== 64 || !isUnparenthesizedInAssign) && [
|
|
34181
34139
|
"expression",
|
|
34182
34140
|
true
|
|
@@ -34632,9 +34590,12 @@ var placeholders = function(superClass) {
|
|
|
34632
34590
|
{
|
|
34633
34591
|
key: "finishPlaceholder",
|
|
34634
34592
|
value: function finishPlaceholder(node, expectedNode) {
|
|
34635
|
-
var
|
|
34636
|
-
|
|
34637
|
-
|
|
34593
|
+
var placeholder2 = node;
|
|
34594
|
+
if (!placeholder2.expectedNode || !placeholder2.type) {
|
|
34595
|
+
placeholder2 = this.finishNode(placeholder2, "Placeholder");
|
|
34596
|
+
}
|
|
34597
|
+
placeholder2.expectedNode = expectedNode;
|
|
34598
|
+
return placeholder2;
|
|
34638
34599
|
}
|
|
34639
34600
|
},
|
|
34640
34601
|
{
|
|
@@ -34724,8 +34685,9 @@ var placeholders = function(superClass) {
|
|
|
34724
34685
|
return this.finishNode(stmt, "LabeledStatement");
|
|
34725
34686
|
}
|
|
34726
34687
|
this.semicolon();
|
|
34727
|
-
|
|
34728
|
-
|
|
34688
|
+
var stmtPlaceholder = node;
|
|
34689
|
+
stmtPlaceholder.name = expr.name;
|
|
34690
|
+
return this.finishPlaceholder(stmtPlaceholder, "Statement");
|
|
34729
34691
|
}
|
|
34730
34692
|
},
|
|
34731
34693
|
{
|
|
@@ -34770,19 +34732,20 @@ var placeholders = function(superClass) {
|
|
|
34770
34732
|
value: function parseExport(node, decorators) {
|
|
34771
34733
|
var placeholder2 = this.parsePlaceholder("Identifier");
|
|
34772
34734
|
if (!placeholder2) return _get(_get_prototype_of(PlaceholdersParserMixin.prototype), "parseExport", this).call(this, node, decorators);
|
|
34735
|
+
var node2 = node;
|
|
34773
34736
|
if (!this.isContextual(98) && !this.match(12)) {
|
|
34774
|
-
|
|
34775
|
-
|
|
34776
|
-
|
|
34777
|
-
return this.finishNode(
|
|
34737
|
+
node2.specifiers = [];
|
|
34738
|
+
node2.source = null;
|
|
34739
|
+
node2.declaration = this.finishPlaceholder(placeholder2, "Declaration");
|
|
34740
|
+
return this.finishNode(node2, "ExportNamedDeclaration");
|
|
34778
34741
|
}
|
|
34779
34742
|
this.expectPlugin("exportDefaultFrom");
|
|
34780
34743
|
var specifier = this.startNode();
|
|
34781
34744
|
specifier.exported = placeholder2;
|
|
34782
|
-
|
|
34745
|
+
node2.specifiers = [
|
|
34783
34746
|
this.finishNode(specifier, "ExportDefaultSpecifier")
|
|
34784
34747
|
];
|
|
34785
|
-
return _get(_get_prototype_of(PlaceholdersParserMixin.prototype), "parseExport", this).call(this,
|
|
34748
|
+
return _get(_get_prototype_of(PlaceholdersParserMixin.prototype), "parseExport", this).call(this, node2, decorators);
|
|
34786
34749
|
}
|
|
34787
34750
|
},
|
|
34788
34751
|
{
|
|
@@ -34972,10 +34935,6 @@ var TOPIC_TOKENS = [
|
|
|
34972
34935
|
"%",
|
|
34973
34936
|
"#"
|
|
34974
34937
|
];
|
|
34975
|
-
var RECORD_AND_TUPLE_SYNTAX_TYPES = [
|
|
34976
|
-
"hash",
|
|
34977
|
-
"bar"
|
|
34978
|
-
];
|
|
34979
34938
|
function validatePlugins(plugins) {
|
|
34980
34939
|
if (hasPlugin(plugins, "decorators")) {
|
|
34981
34940
|
if (hasPlugin(plugins, "decorators-legacy")) {
|
|
@@ -35004,12 +34963,8 @@ function validatePlugins(plugins) {
|
|
|
35004
34963
|
}).join(", ");
|
|
35005
34964
|
throw new Error('"pipelineOperator" requires "proposal" option whose value must be one of: '.concat(proposalList, "."));
|
|
35006
34965
|
}
|
|
35007
|
-
var
|
|
35008
|
-
|
|
35009
|
-
{
|
|
35010
|
-
syntaxType: "hash"
|
|
35011
|
-
}
|
|
35012
|
-
]);
|
|
34966
|
+
var recordAndTupleConfigItem = "recordAndTuple";
|
|
34967
|
+
var tupleSyntaxIsHash = hasPlugin(plugins, recordAndTupleConfigItem);
|
|
35013
34968
|
if (proposal === "hack") {
|
|
35014
34969
|
if (hasPlugin(plugins, "placeholders")) {
|
|
35015
34970
|
throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");
|
|
@@ -35025,10 +34980,10 @@ function validatePlugins(plugins) {
|
|
|
35025
34980
|
throw new Error('"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: '.concat(tokenList, "."));
|
|
35026
34981
|
}
|
|
35027
34982
|
if (topicToken === "#" && tupleSyntaxIsHash) {
|
|
35028
|
-
throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `
|
|
34983
|
+
throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `'.concat(JSON.stringify(recordAndTupleConfigItem), "`."));
|
|
35029
34984
|
}
|
|
35030
34985
|
} else if (proposal === "smart" && tupleSyntaxIsHash) {
|
|
35031
|
-
throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `
|
|
34986
|
+
throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `'.concat(JSON.stringify(recordAndTupleConfigItem), "`."));
|
|
35032
34987
|
}
|
|
35033
34988
|
}
|
|
35034
34989
|
if (hasPlugin(plugins, "moduleAttributes")) {
|
|
@@ -35039,10 +34994,17 @@ function validatePlugins(plugins) {
|
|
|
35039
34994
|
if (hasPlugin(plugins, "importAssertions") && hasPlugin(plugins, "importAttributes")) {
|
|
35040
34995
|
throw new Error("Cannot combine importAssertions and importAttributes plugins.");
|
|
35041
34996
|
}
|
|
35042
|
-
if (hasPlugin(plugins, "recordAndTuple")
|
|
35043
|
-
|
|
35044
|
-
|
|
35045
|
-
|
|
34997
|
+
if (hasPlugin(plugins, "recordAndTuple")) {
|
|
34998
|
+
var syntaxType = getPluginOption(plugins, "recordAndTuple", "syntaxType");
|
|
34999
|
+
if (syntaxType != null) {
|
|
35000
|
+
{
|
|
35001
|
+
if (syntaxType === "hash") {
|
|
35002
|
+
throw new Error('The syntaxType option is no longer required in Babel 8. You can safely remove { syntaxType: "hash" } from the recordAndTuple config.');
|
|
35003
|
+
} else {
|
|
35004
|
+
throw new Error('The syntaxType option is no longer required in Babel 8. Please remove { syntaxType: "bar" } from the recordAndTuple config and migrate to the hash syntax #{} and #[].');
|
|
35005
|
+
}
|
|
35006
|
+
}
|
|
35007
|
+
}
|
|
35046
35008
|
}
|
|
35047
35009
|
if (hasPlugin(plugins, "asyncDoExpressions") && !hasPlugin(plugins, "doExpressions")) {
|
|
35048
35010
|
var error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");
|
|
@@ -36406,16 +36368,18 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
36406
36368
|
key: "parseTemplate",
|
|
36407
36369
|
value: function parseTemplate(isTagged) {
|
|
36408
36370
|
var node = this.startNode();
|
|
36409
|
-
node.expressions = [];
|
|
36410
36371
|
var curElt = this.parseTemplateElement(isTagged);
|
|
36411
|
-
|
|
36372
|
+
var quasis = [
|
|
36412
36373
|
curElt
|
|
36413
36374
|
];
|
|
36375
|
+
var substitutions = [];
|
|
36414
36376
|
while(!curElt.tail){
|
|
36415
|
-
|
|
36377
|
+
substitutions.push(this.parseTemplateSubstitution());
|
|
36416
36378
|
this.readTemplateContinuation();
|
|
36417
|
-
|
|
36379
|
+
quasis.push(curElt = this.parseTemplateElement(isTagged));
|
|
36418
36380
|
}
|
|
36381
|
+
node.expressions = substitutions;
|
|
36382
|
+
node.quasis = quasis;
|
|
36419
36383
|
return this.finishNode(node, "TemplateLiteral");
|
|
36420
36384
|
}
|
|
36421
36385
|
},
|
|
@@ -36458,9 +36422,6 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
36458
36422
|
if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") {
|
|
36459
36423
|
this.raise(Errors.InvalidRecordProperty, prop);
|
|
36460
36424
|
}
|
|
36461
|
-
if (prop.shorthand) {
|
|
36462
|
-
this.addExtra(prop, "shorthand", true);
|
|
36463
|
-
}
|
|
36464
36425
|
node.properties.push(prop);
|
|
36465
36426
|
}
|
|
36466
36427
|
this.next();
|
|
@@ -36518,8 +36479,9 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
36518
36479
|
var isGenerator = this.eat(55);
|
|
36519
36480
|
this.parsePropertyNamePrefixOperator(prop);
|
|
36520
36481
|
var containsEsc = this.state.containsEsc;
|
|
36521
|
-
|
|
36482
|
+
this.parsePropertyName(prop, refExpressionErrors);
|
|
36522
36483
|
if (!isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) {
|
|
36484
|
+
var key = prop.key;
|
|
36523
36485
|
var keyName = key.name;
|
|
36524
36486
|
if (keyName === "async" && !this.hasPrecedingLineBreak()) {
|
|
36525
36487
|
isAsync = true;
|
|
@@ -36672,7 +36634,6 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
|
|
|
36672
36634
|
prop.computed = false;
|
|
36673
36635
|
}
|
|
36674
36636
|
}
|
|
36675
|
-
return prop.key;
|
|
36676
36637
|
}
|
|
36677
36638
|
},
|
|
36678
36639
|
{
|
|
@@ -38284,8 +38245,8 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
38284
38245
|
var _this = this;
|
|
38285
38246
|
var flags = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
38286
38247
|
var hangingDeclaration = flags & 2;
|
|
38287
|
-
var
|
|
38288
|
-
var requireId =
|
|
38248
|
+
var isDeclaration2 = !!(flags & 1);
|
|
38249
|
+
var requireId = isDeclaration2 && !(flags & 4);
|
|
38289
38250
|
var isAsync = !!(flags & 8);
|
|
38290
38251
|
this.initFunction(node, isAsync);
|
|
38291
38252
|
if (this.match(55)) {
|
|
@@ -38295,23 +38256,23 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
38295
38256
|
this.next();
|
|
38296
38257
|
node.generator = true;
|
|
38297
38258
|
}
|
|
38298
|
-
if (
|
|
38259
|
+
if (isDeclaration2) {
|
|
38299
38260
|
node.id = this.parseFunctionId(requireId);
|
|
38300
38261
|
}
|
|
38301
38262
|
var oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
|
|
38302
38263
|
this.state.maybeInArrowParameters = false;
|
|
38303
38264
|
this.scope.enter(2);
|
|
38304
38265
|
this.prodParam.enter(functionFlags(isAsync, node.generator));
|
|
38305
|
-
if (!
|
|
38266
|
+
if (!isDeclaration2) {
|
|
38306
38267
|
node.id = this.parseFunctionId();
|
|
38307
38268
|
}
|
|
38308
38269
|
this.parseFunctionParams(node, false);
|
|
38309
38270
|
this.withSmartMixTopicForbiddingContext(function() {
|
|
38310
|
-
_this.parseFunctionBodyAndFinish(node,
|
|
38271
|
+
_this.parseFunctionBodyAndFinish(node, isDeclaration2 ? "FunctionDeclaration" : "FunctionExpression");
|
|
38311
38272
|
});
|
|
38312
38273
|
this.prodParam.exit();
|
|
38313
38274
|
this.scope.exit();
|
|
38314
|
-
if (
|
|
38275
|
+
if (isDeclaration2 && !hangingDeclaration) {
|
|
38315
38276
|
this.registerFunctionStatementId(node);
|
|
38316
38277
|
}
|
|
38317
38278
|
this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
|
|
@@ -38364,10 +38325,16 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
38364
38325
|
return this.match(10);
|
|
38365
38326
|
}
|
|
38366
38327
|
},
|
|
38328
|
+
{
|
|
38329
|
+
key: "nameIsConstructor",
|
|
38330
|
+
value: function nameIsConstructor(key) {
|
|
38331
|
+
return key.type === "Identifier" && key.name === "constructor" || key.type === "StringLiteral" && key.value === "constructor";
|
|
38332
|
+
}
|
|
38333
|
+
},
|
|
38367
38334
|
{
|
|
38368
38335
|
key: "isNonstaticConstructor",
|
|
38369
38336
|
value: function isNonstaticConstructor(method) {
|
|
38370
|
-
return !method.computed && !method.static && (method.key
|
|
38337
|
+
return !method.computed && !method.static && this.nameIsConstructor(method.key);
|
|
38371
38338
|
}
|
|
38372
38339
|
},
|
|
38373
38340
|
{
|
|
@@ -38482,9 +38449,10 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
38482
38449
|
this.pushClassMethod(classBody2, publicMethod, true, false, false, false);
|
|
38483
38450
|
return;
|
|
38484
38451
|
}
|
|
38485
|
-
var isContextual =
|
|
38486
|
-
var isPrivate2 = this.match(138);
|
|
38452
|
+
var isContextual = !this.state.containsEsc && tokenIsIdentifier(this.state.type);
|
|
38487
38453
|
var key = this.parseClassElementName(member);
|
|
38454
|
+
var maybeContextualKw = isContextual ? key.name : null;
|
|
38455
|
+
var isPrivate2 = this.isPrivateName(key);
|
|
38488
38456
|
var maybeQuestionTokenStartLoc = this.state.startLoc;
|
|
38489
38457
|
this.parsePostMemberNameModifiers(publicMember);
|
|
38490
38458
|
if (this.isClassMethod()) {
|
|
@@ -38513,7 +38481,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
38513
38481
|
} else {
|
|
38514
38482
|
this.pushClassProperty(classBody2, publicProp);
|
|
38515
38483
|
}
|
|
38516
|
-
} else if (
|
|
38484
|
+
} else if (maybeContextualKw === "async" && !this.isLineTerminator()) {
|
|
38517
38485
|
this.resetPreviousNodeTrailingComments(key);
|
|
38518
38486
|
var isGenerator = this.eat(55);
|
|
38519
38487
|
if (publicMember.optional) {
|
|
@@ -38531,9 +38499,9 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
38531
38499
|
}
|
|
38532
38500
|
this.pushClassMethod(classBody2, publicMethod, isGenerator, true, false, false);
|
|
38533
38501
|
}
|
|
38534
|
-
} else if (
|
|
38502
|
+
} else if ((maybeContextualKw === "get" || maybeContextualKw === "set") && !(this.match(55) && this.isLineTerminator())) {
|
|
38535
38503
|
this.resetPreviousNodeTrailingComments(key);
|
|
38536
|
-
method.kind =
|
|
38504
|
+
method.kind = maybeContextualKw;
|
|
38537
38505
|
var isPrivate31 = this.match(138);
|
|
38538
38506
|
this.parseClassElementName(publicMethod);
|
|
38539
38507
|
if (isPrivate31) {
|
|
@@ -38545,7 +38513,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
38545
38513
|
this.pushClassMethod(classBody2, publicMethod, false, false, false, false);
|
|
38546
38514
|
}
|
|
38547
38515
|
this.checkGetterSetterParams(publicMethod);
|
|
38548
|
-
} else if (
|
|
38516
|
+
} else if (maybeContextualKw === "accessor" && !this.isLineTerminator()) {
|
|
38549
38517
|
this.expectPlugin("decoratorAutoAccessors");
|
|
38550
38518
|
this.resetPreviousNodeTrailingComments(key);
|
|
38551
38519
|
var isPrivate32 = this.match(138);
|
|
@@ -38577,7 +38545,8 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
38577
38545
|
member.key = key;
|
|
38578
38546
|
return key;
|
|
38579
38547
|
}
|
|
38580
|
-
|
|
38548
|
+
this.parsePropertyName(member);
|
|
38549
|
+
return member.key;
|
|
38581
38550
|
}
|
|
38582
38551
|
},
|
|
38583
38552
|
{
|
|
@@ -38602,7 +38571,7 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
38602
38571
|
{
|
|
38603
38572
|
key: "pushClassProperty",
|
|
38604
38573
|
value: function pushClassProperty(classBody2, prop) {
|
|
38605
|
-
if (!prop.computed && (prop.key
|
|
38574
|
+
if (!prop.computed && this.nameIsConstructor(prop.key)) {
|
|
38606
38575
|
this.raise(Errors.ConstructorClassField, prop.key);
|
|
38607
38576
|
}
|
|
38608
38577
|
classBody2.body.push(this.parseClassProperty(prop));
|
|
@@ -38619,11 +38588,8 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
38619
38588
|
{
|
|
38620
38589
|
key: "pushClassAccessorProperty",
|
|
38621
38590
|
value: function pushClassAccessorProperty(classBody2, prop, isPrivate2) {
|
|
38622
|
-
if (!isPrivate2 && !prop.computed) {
|
|
38623
|
-
|
|
38624
|
-
if (key.name === "constructor" || key.value === "constructor") {
|
|
38625
|
-
this.raise(Errors.ConstructorClassField, key);
|
|
38626
|
-
}
|
|
38591
|
+
if (!isPrivate2 && !prop.computed && this.nameIsConstructor(prop.key)) {
|
|
38592
|
+
this.raise(Errors.ConstructorClassField, prop.key);
|
|
38627
38593
|
}
|
|
38628
38594
|
var node = this.parseClassAccessorProperty(prop);
|
|
38629
38595
|
classBody2.body.push(node);
|
|
@@ -38804,7 +38770,8 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
38804
38770
|
key: "maybeParseExportNamespaceSpecifier",
|
|
38805
38771
|
value: function maybeParseExportNamespaceSpecifier(node) {
|
|
38806
38772
|
if (this.isContextual(93)) {
|
|
38807
|
-
|
|
38773
|
+
var _node_specifiers;
|
|
38774
|
+
(_node_specifiers = node.specifiers) !== null && _node_specifiers !== void 0 ? _node_specifiers : node.specifiers = [];
|
|
38808
38775
|
var specifier = this.startNodeAt(this.state.lastTokStartLoc);
|
|
38809
38776
|
this.next();
|
|
38810
38777
|
specifier.exported = this.parseModuleExportName();
|
|
@@ -38818,14 +38785,15 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
38818
38785
|
key: "maybeParseExportNamedSpecifiers",
|
|
38819
38786
|
value: function maybeParseExportNamedSpecifiers(node) {
|
|
38820
38787
|
if (this.match(5)) {
|
|
38821
|
-
var
|
|
38822
|
-
|
|
38823
|
-
|
|
38824
|
-
|
|
38825
|
-
|
|
38826
|
-
|
|
38788
|
+
var _node2_specifiers;
|
|
38789
|
+
var node2 = node;
|
|
38790
|
+
if (!node2.specifiers) node2.specifiers = [];
|
|
38791
|
+
var isTypeExport = node2.exportKind === "type";
|
|
38792
|
+
(_node2_specifiers = node2.specifiers).push.apply(_node2_specifiers, _to_consumable_array(this.parseExportSpecifiers(isTypeExport)));
|
|
38793
|
+
node2.source = null;
|
|
38794
|
+
node2.declaration = null;
|
|
38827
38795
|
if (this.hasPlugin("importAssertions")) {
|
|
38828
|
-
|
|
38796
|
+
node2.assertions = [];
|
|
38829
38797
|
}
|
|
38830
38798
|
return true;
|
|
38831
38799
|
}
|
|
@@ -38957,6 +38925,14 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
38957
38925
|
return true;
|
|
38958
38926
|
}
|
|
38959
38927
|
}
|
|
38928
|
+
if (this.isContextual(107)) {
|
|
38929
|
+
this.raise(Errors.UsingDeclarationExport, this.state.startLoc);
|
|
38930
|
+
return true;
|
|
38931
|
+
}
|
|
38932
|
+
if (this.isContextual(96) && this.startsAwaitUsing()) {
|
|
38933
|
+
this.raise(Errors.UsingDeclarationExport, this.state.startLoc);
|
|
38934
|
+
return true;
|
|
38935
|
+
}
|
|
38960
38936
|
return type === 74 || type === 75 || type === 68 || type === 80 || this.isLet() || this.isAsyncFunction();
|
|
38961
38937
|
}
|
|
38962
38938
|
},
|
|
@@ -39010,14 +38986,15 @@ var StatementParser = /*#__PURE__*/ function(ExpressionParser) {
|
|
|
39010
38986
|
}
|
|
39011
38987
|
}
|
|
39012
38988
|
} else if (node.declaration) {
|
|
39013
|
-
|
|
39014
|
-
|
|
38989
|
+
var decl = node.declaration;
|
|
38990
|
+
if (decl.type === "FunctionDeclaration" || decl.type === "ClassDeclaration") {
|
|
38991
|
+
var id = decl.id;
|
|
39015
38992
|
if (!id) throw new Error("Assertion failure");
|
|
39016
38993
|
this.checkDuplicateExports(node, id.name);
|
|
39017
|
-
} else if (
|
|
38994
|
+
} else if (decl.type === "VariableDeclaration") {
|
|
39018
38995
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
39019
38996
|
try {
|
|
39020
|
-
for(var _iterator1 =
|
|
38997
|
+
for(var _iterator1 = decl.declarations[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
39021
38998
|
var declaration1 = _step1.value;
|
|
39022
38999
|
this.checkDeclaration(declaration1.id);
|
|
39023
39000
|
}
|
|
@@ -39696,7 +39673,7 @@ function getParserClass(pluginsFromOptions) {
|
|
|
39696
39673
|
// node_modules/@babel/highlight/lib/index.js
|
|
39697
39674
|
var import_js_tokens = __toESM(require_js_tokens(), 1);
|
|
39698
39675
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
39699
|
-
var colors = typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? (0, import_picocolors.createColors)(false) : import_picocolors.default;
|
|
39676
|
+
var colors = (typeof process === "undefined" ? "undefined" : _type_of(process)) === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? (0, import_picocolors.createColors)(false) : import_picocolors.default;
|
|
39700
39677
|
var compose = function(f, g) {
|
|
39701
39678
|
return function(v) {
|
|
39702
39679
|
return f(g(v));
|
|
@@ -39994,7 +39971,7 @@ function highlight(code2) {
|
|
|
39994
39971
|
}
|
|
39995
39972
|
// node_modules/@babel/code-frame/lib/index.js
|
|
39996
39973
|
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
39997
|
-
var colors2 = typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? (0, import_picocolors2.createColors)(false) : import_picocolors2.default;
|
|
39974
|
+
var colors2 = (typeof process === "undefined" ? "undefined" : _type_of(process)) === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? (0, import_picocolors2.createColors)(false) : import_picocolors2.default;
|
|
39998
39975
|
var compose2 = function(f, g) {
|
|
39999
39976
|
return function(v) {
|
|
40000
39977
|
return f(g(v));
|
|
@@ -40227,7 +40204,7 @@ function merge(a, b) {
|
|
|
40227
40204
|
};
|
|
40228
40205
|
}
|
|
40229
40206
|
function validate$12(opts) {
|
|
40230
|
-
if (opts != null && typeof opts !== "object") {
|
|
40207
|
+
if (opts != null && (typeof opts === "undefined" ? "undefined" : _type_of(opts)) !== "object") {
|
|
40231
40208
|
throw new Error("Unknown template options.");
|
|
40232
40209
|
}
|
|
40233
40210
|
var _ref = opts || {}, placeholderWhitelist = _ref.placeholderWhitelist, placeholderPattern = _ref.placeholderPattern, preserveComments = _ref.preserveComments, syntacticPlaceholders = _ref.syntacticPlaceholders, parser = _objectWithoutPropertiesLoose2(_ref, _excluded3);
|
|
@@ -40260,7 +40237,7 @@ function normalizeReplacements(replacements) {
|
|
|
40260
40237
|
acc["$" + i] = replacement;
|
|
40261
40238
|
return acc;
|
|
40262
40239
|
}, {});
|
|
40263
|
-
} else if (typeof replacements === "object" || replacements == null) {
|
|
40240
|
+
} else if ((typeof replacements === "undefined" ? "undefined" : _type_of(replacements)) === "object" || replacements == null) {
|
|
40264
40241
|
return replacements || void 0;
|
|
40265
40242
|
}
|
|
40266
40243
|
throw new Error("Template replacements must be an array, object, null, or undefined");
|
|
@@ -40419,7 +40396,7 @@ function applyReplacement(placeholder2, ast, replacement) {
|
|
|
40419
40396
|
replacement = replacement.map(function(node) {
|
|
40420
40397
|
return cloneNode2(node);
|
|
40421
40398
|
});
|
|
40422
|
-
} else if (typeof replacement === "object") {
|
|
40399
|
+
} else if ((typeof replacement === "undefined" ? "undefined" : _type_of(replacement)) === "object") {
|
|
40423
40400
|
replacement = cloneNode2(replacement);
|
|
40424
40401
|
}
|
|
40425
40402
|
}
|
|
@@ -40571,7 +40548,7 @@ function createTemplateBuilder(formatter, defaultOpts) {
|
|
|
40571
40548
|
templateFnCache.set(tpl, builder);
|
|
40572
40549
|
}
|
|
40573
40550
|
return extendedTrace(builder(args));
|
|
40574
|
-
} else if (typeof tpl === "object" && tpl) {
|
|
40551
|
+
} else if ((typeof tpl === "undefined" ? "undefined" : _type_of(tpl)) === "object" && tpl) {
|
|
40575
40552
|
if (args.length > 0) throw new Error("Unexpected extra params.");
|
|
40576
40553
|
return createTemplateBuilder(formatter, merge(cachedOpts, validate$12(tpl)));
|
|
40577
40554
|
}
|
|
@@ -41324,7 +41301,7 @@ var SourceMap = /*#__PURE__*/ function() {
|
|
|
41324
41301
|
}
|
|
41325
41302
|
if (typeof code2 === "string" && !opts.inputSourceMap) {
|
|
41326
41303
|
setSourceContent(map, this._sourceFileName, code2);
|
|
41327
|
-
} else if (typeof code2 === "object") {
|
|
41304
|
+
} else if ((typeof code2 === "undefined" ? "undefined" : _type_of(code2)) === "object") {
|
|
41328
41305
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
41329
41306
|
try {
|
|
41330
41307
|
for(var _iterator = Object.keys(code2)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
@@ -42363,20 +42340,21 @@ function TaggedTemplateExpression(node) {
|
|
|
42363
42340
|
this.print(node.typeParameters, node);
|
|
42364
42341
|
this.print(node.quasi, node);
|
|
42365
42342
|
}
|
|
42366
|
-
function TemplateElement(
|
|
42367
|
-
|
|
42368
|
-
var isLast = parent.quasis[parent.quasis.length - 1] === node;
|
|
42369
|
-
var value1 = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${");
|
|
42370
|
-
this.token(value1, true);
|
|
42343
|
+
function TemplateElement() {
|
|
42344
|
+
throw new Error("TemplateElement printing is handled in TemplateLiteral");
|
|
42371
42345
|
}
|
|
42372
42346
|
function TemplateLiteral(node) {
|
|
42373
42347
|
var quasis = node.quasis;
|
|
42348
|
+
var partRaw = "`";
|
|
42374
42349
|
for(var i = 0; i < quasis.length; i++){
|
|
42375
|
-
|
|
42350
|
+
partRaw += quasis[i].value.raw;
|
|
42376
42351
|
if (i + 1 < quasis.length) {
|
|
42352
|
+
this.token(partRaw + "${", true);
|
|
42377
42353
|
this.print(node.expressions[i], node);
|
|
42354
|
+
partRaw = "}";
|
|
42378
42355
|
}
|
|
42379
42356
|
}
|
|
42357
|
+
this.token(partRaw + "`", true);
|
|
42380
42358
|
}
|
|
42381
42359
|
var isCallExpression3 = lib_exports.isCallExpression, isLiteral2 = lib_exports.isLiteral, isMemberExpression2 = lib_exports.isMemberExpression, isNewExpression3 = lib_exports.isNewExpression;
|
|
42382
42360
|
function UnaryExpression(node) {
|
|
@@ -43512,12 +43490,7 @@ function RecordExpression(node) {
|
|
|
43512
43490
|
var props = node.properties;
|
|
43513
43491
|
var startToken;
|
|
43514
43492
|
var endToken;
|
|
43515
|
-
|
|
43516
|
-
startToken = "{|";
|
|
43517
|
-
endToken = "|}";
|
|
43518
|
-
} else if (this.format.recordAndTupleSyntaxType !== "hash" && this.format.recordAndTupleSyntaxType != null) {
|
|
43519
|
-
throw new Error('The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" ('.concat(JSON.stringify(this.format.recordAndTupleSyntaxType), " received)."));
|
|
43520
|
-
} else {
|
|
43493
|
+
{
|
|
43521
43494
|
startToken = "#{";
|
|
43522
43495
|
endToken = "}";
|
|
43523
43496
|
}
|
|
@@ -43537,14 +43510,9 @@ function TupleExpression(node) {
|
|
|
43537
43510
|
var len = elems.length;
|
|
43538
43511
|
var startToken;
|
|
43539
43512
|
var endToken;
|
|
43540
|
-
|
|
43541
|
-
startToken = "[|";
|
|
43542
|
-
endToken = "|]";
|
|
43543
|
-
} else if (this.format.recordAndTupleSyntaxType === "hash") {
|
|
43513
|
+
{
|
|
43544
43514
|
startToken = "#[";
|
|
43545
43515
|
endToken = "]";
|
|
43546
|
-
} else {
|
|
43547
|
-
throw new Error("".concat(this.format.recordAndTupleSyntaxType, " is not a valid recordAndTuple syntax type"));
|
|
43548
43516
|
}
|
|
43549
43517
|
this.token(startToken);
|
|
43550
43518
|
for(var i = 0; i < elems.length; i++){
|
|
@@ -45691,7 +45659,7 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
45691
45659
|
}
|
|
45692
45660
|
this._printStack.push(node);
|
|
45693
45661
|
var oldInAux = this._insideAux;
|
|
45694
|
-
this._insideAux = node.loc ==
|
|
45662
|
+
this._insideAux = node.loc == null;
|
|
45695
45663
|
this._maybeAddAuxComment(this._insideAux && !oldInAux);
|
|
45696
45664
|
var parenthesized = (_node_extra = node.extra) === null || _node_extra === void 0 ? void 0 : _node_extra.parenthesized;
|
|
45697
45665
|
var shouldPrintParens = forceParens || parenthesized && format.retainFunctionParens && nodeType === "FunctionExpression" || needsParens(node, parent, this._printStack);
|
|
@@ -46036,7 +46004,7 @@ var Printer = /*#__PURE__*/ function() {
|
|
|
46036
46004
|
if (type === 0) {
|
|
46037
46005
|
var offset = 0;
|
|
46038
46006
|
if (i === 0) {
|
|
46039
|
-
if (this._buf.hasContent() && (comment.type === "CommentLine" || commentStartLine
|
|
46007
|
+
if (this._buf.hasContent() && (comment.type === "CommentLine" || commentStartLine !== commentEndLine)) {
|
|
46040
46008
|
offset = leadingCommentNewline = 1;
|
|
46041
46009
|
}
|
|
46042
46010
|
} else {
|
|
@@ -46102,7 +46070,6 @@ function commaSeparator() {
|
|
|
46102
46070
|
this.space();
|
|
46103
46071
|
}
|
|
46104
46072
|
function normalizeOptions(code2, opts) {
|
|
46105
|
-
var _opts_recordAndTupleSyntaxType;
|
|
46106
46073
|
var format = {
|
|
46107
46074
|
auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
|
|
46108
46075
|
auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
|
|
@@ -46122,7 +46089,6 @@ function normalizeOptions(code2, opts) {
|
|
|
46122
46089
|
wrap: true,
|
|
46123
46090
|
minimal: true
|
|
46124
46091
|
}, opts.jsescOption),
|
|
46125
|
-
recordAndTupleSyntaxType: (_opts_recordAndTupleSyntaxType = opts.recordAndTupleSyntaxType) !== null && _opts_recordAndTupleSyntaxType !== void 0 ? _opts_recordAndTupleSyntaxType : "hash",
|
|
46126
46092
|
topicToken: opts.topicToken,
|
|
46127
46093
|
importAttributesKeyword: opts.importAttributesKeyword
|
|
46128
46094
|
};
|
|
@@ -46606,10 +46572,12 @@ function isFlow2() {
|
|
|
46606
46572
|
}
|
|
46607
46573
|
}
|
|
46608
46574
|
function isRestProperty2() {
|
|
46609
|
-
|
|
46575
|
+
var _this_parentPath;
|
|
46576
|
+
return nodeIsRestElement(this.node) && ((_this_parentPath = this.parentPath) === null || _this_parentPath === void 0 ? void 0 : _this_parentPath.isObjectPattern());
|
|
46610
46577
|
}
|
|
46611
46578
|
function isSpreadProperty2() {
|
|
46612
|
-
|
|
46579
|
+
var _this_parentPath;
|
|
46580
|
+
return nodeIsRestElement(this.node) && ((_this_parentPath = this.parentPath) === null || _this_parentPath === void 0 ? void 0 : _this_parentPath.isObjectExpression());
|
|
46613
46581
|
}
|
|
46614
46582
|
function isForAwaitStatement() {
|
|
46615
46583
|
return isForOfStatement3(this.node, {
|
|
@@ -46642,7 +46610,7 @@ function isVirtualType(type) {
|
|
|
46642
46610
|
function isExplodedVisitor(visitor4) {
|
|
46643
46611
|
return visitor4 === null || visitor4 === void 0 ? void 0 : visitor4._exploded;
|
|
46644
46612
|
}
|
|
46645
|
-
function explode(visitor4) {
|
|
46613
|
+
function explode$1(visitor4) {
|
|
46646
46614
|
if (isExplodedVisitor(visitor4)) return visitor4;
|
|
46647
46615
|
visitor4._exploded = true;
|
|
46648
46616
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
@@ -46689,7 +46657,7 @@ function explode(visitor4) {
|
|
|
46689
46657
|
}
|
|
46690
46658
|
}
|
|
46691
46659
|
}
|
|
46692
|
-
verify(visitor4);
|
|
46660
|
+
verify$1(visitor4);
|
|
46693
46661
|
delete visitor4.__esModule;
|
|
46694
46662
|
ensureEntranceObjects(visitor4);
|
|
46695
46663
|
ensureCallbackArrays(visitor4);
|
|
@@ -46848,7 +46816,7 @@ function explode(visitor4) {
|
|
|
46848
46816
|
}
|
|
46849
46817
|
return visitor4;
|
|
46850
46818
|
}
|
|
46851
|
-
function verify(visitor4) {
|
|
46819
|
+
function verify$1(visitor4) {
|
|
46852
46820
|
if (visitor4._verified) return;
|
|
46853
46821
|
if (typeof visitor4 === "function") {
|
|
46854
46822
|
throw new Error("You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?");
|
|
@@ -46865,7 +46833,7 @@ function verify(visitor4) {
|
|
|
46865
46833
|
throw new Error("You gave us a visitor for the node type ".concat(nodeType, " but it's not a valid type"));
|
|
46866
46834
|
}
|
|
46867
46835
|
var visitors2 = visitor4[nodeType];
|
|
46868
|
-
if (typeof visitors2 === "object") {
|
|
46836
|
+
if ((typeof visitors2 === "undefined" ? "undefined" : _type_of(visitors2)) === "object") {
|
|
46869
46837
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
46870
46838
|
try {
|
|
46871
46839
|
for(var _iterator1 = Object.keys(visitors2)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
@@ -46937,7 +46905,7 @@ function merge2(visitors2) {
|
|
|
46937
46905
|
var states = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], wrapper = arguments.length > 2 ? arguments[2] : void 0;
|
|
46938
46906
|
var mergedVisitor = {};
|
|
46939
46907
|
for(var i = 0; i < visitors2.length; i++){
|
|
46940
|
-
var visitor4 = explode(visitors2[i]);
|
|
46908
|
+
var visitor4 = explode$1(visitors2[i]);
|
|
46941
46909
|
var state = states[i];
|
|
46942
46910
|
var topVisitor = visitor4;
|
|
46943
46911
|
if (state || wrapper) {
|
|
@@ -47078,10 +47046,10 @@ function mergePair(dest, src) {
|
|
|
47078
47046
|
}
|
|
47079
47047
|
var visitors = /* @__PURE__ */ Object.freeze({
|
|
47080
47048
|
__proto__: null,
|
|
47081
|
-
explode: explode,
|
|
47049
|
+
explode: explode$1,
|
|
47082
47050
|
isExplodedVisitor: isExplodedVisitor,
|
|
47083
47051
|
merge: merge2,
|
|
47084
|
-
verify: verify
|
|
47052
|
+
verify: verify$1
|
|
47085
47053
|
});
|
|
47086
47054
|
var pathsCache = /* @__PURE__ */ new WeakMap();
|
|
47087
47055
|
var scope = /* @__PURE__ */ new WeakMap();
|
|
@@ -47140,9 +47108,7 @@ var renameVisitor = {
|
|
|
47140
47108
|
var node = param.node, scope2 = param.scope;
|
|
47141
47109
|
var name = node.key.name;
|
|
47142
47110
|
if (node.shorthand && (name === state.oldName || name === state.newName) && scope2.getBindingIdentifier(name) === state.binding.identifier) {
|
|
47143
|
-
var _node_extra;
|
|
47144
47111
|
node.shorthand = false;
|
|
47145
|
-
if ((_node_extra = node.extra) === null || _node_extra === void 0 ? void 0 : _node_extra.shorthand) node.extra.shorthand = false;
|
|
47146
47112
|
}
|
|
47147
47113
|
},
|
|
47148
47114
|
"AssignmentExpression|Declaration|VariableDeclarator": function(path, state) {
|
|
@@ -47208,7 +47174,7 @@ var Renamer = /*#__PURE__*/ function() {
|
|
|
47208
47174
|
}
|
|
47209
47175
|
}
|
|
47210
47176
|
var blockToTraverse = scope2.block;
|
|
47211
|
-
traverseNode(blockToTraverse, explode(renameVisitor), scope2, this, scope2.path, {
|
|
47177
|
+
traverseNode(blockToTraverse, explode$1(renameVisitor), scope2, this, scope2.path, {
|
|
47212
47178
|
discriminant: true
|
|
47213
47179
|
});
|
|
47214
47180
|
{
|
|
@@ -47608,8 +47574,11 @@ var collectorVisitor = {
|
|
|
47608
47574
|
},
|
|
47609
47575
|
ClassExpression: function ClassExpression(path) {
|
|
47610
47576
|
if (path.has("id") && !path.get("id").node[NOT_LOCAL_BINDING3]) {
|
|
47611
|
-
path.scope.registerBinding("local", path);
|
|
47577
|
+
path.scope.registerBinding("local", path.get("id"), path);
|
|
47612
47578
|
}
|
|
47579
|
+
},
|
|
47580
|
+
TSTypeAnnotation: function TSTypeAnnotation(path) {
|
|
47581
|
+
path.skip();
|
|
47613
47582
|
}
|
|
47614
47583
|
};
|
|
47615
47584
|
var uid = 0;
|
|
@@ -47649,7 +47618,7 @@ var _Scope = /*#__PURE__*/ function() {
|
|
|
47649
47618
|
var shouldSkip = path.key === "key" || path.listKey === "decorators";
|
|
47650
47619
|
path = path.parentPath;
|
|
47651
47620
|
if (shouldSkip && path.isMethod()) path = path.parentPath;
|
|
47652
|
-
if (path
|
|
47621
|
+
if (path === null || path === void 0 ? void 0 : path.isScope()) parent = path;
|
|
47653
47622
|
}while (path && !parent);
|
|
47654
47623
|
return parent === null || parent === void 0 ? void 0 : parent.scope;
|
|
47655
47624
|
}
|
|
@@ -48916,19 +48885,6 @@ function inType() {
|
|
|
48916
48885
|
}
|
|
48917
48886
|
return false;
|
|
48918
48887
|
}
|
|
48919
|
-
var NodePath_ancestry = /* @__PURE__ */ Object.freeze({
|
|
48920
|
-
__proto__: null,
|
|
48921
|
-
find: find,
|
|
48922
|
-
findParent: findParent,
|
|
48923
|
-
getAncestry: getAncestry,
|
|
48924
|
-
getDeepestCommonAncestorFrom: getDeepestCommonAncestorFrom,
|
|
48925
|
-
getEarliestCommonAncestorFrom: getEarliestCommonAncestorFrom,
|
|
48926
|
-
getFunctionParent: getFunctionParent,
|
|
48927
|
-
getStatementParent: getStatementParent,
|
|
48928
|
-
inType: inType,
|
|
48929
|
-
isAncestor: isAncestor,
|
|
48930
|
-
isDescendant: isDescendant
|
|
48931
|
-
});
|
|
48932
48888
|
var createFlowUnionType2 = lib_exports.createFlowUnionType, createTSUnionType2 = lib_exports.createTSUnionType, createUnionTypeAnnotation = lib_exports.createUnionTypeAnnotation, isFlowType2 = lib_exports.isFlowType, isTSType2 = lib_exports.isTSType;
|
|
48933
48889
|
function createUnionType(types2) {
|
|
48934
48890
|
{
|
|
@@ -49419,15 +49375,6 @@ function isGenericType(genericName) {
|
|
|
49419
49375
|
name: genericName
|
|
49420
49376
|
});
|
|
49421
49377
|
}
|
|
49422
|
-
var NodePath_inference = /* @__PURE__ */ Object.freeze({
|
|
49423
|
-
__proto__: null,
|
|
49424
|
-
_getTypeAnnotation: _getTypeAnnotation,
|
|
49425
|
-
baseTypeStrictlyMatches: baseTypeStrictlyMatches,
|
|
49426
|
-
couldBeBaseType: couldBeBaseType,
|
|
49427
|
-
getTypeAnnotation: getTypeAnnotation,
|
|
49428
|
-
isBaseType: isBaseType,
|
|
49429
|
-
isGenericType: isGenericType
|
|
49430
|
-
});
|
|
49431
49378
|
var FUNCTION_TYPES2 = lib_exports.FUNCTION_TYPES, arrowFunctionExpression$2 = lib_exports.arrowFunctionExpression, assignmentExpression$2 = lib_exports.assignmentExpression, awaitExpression2 = lib_exports.awaitExpression, blockStatement$2 = lib_exports.blockStatement, buildUndefinedNode2 = lib_exports.buildUndefinedNode, callExpression$2 = lib_exports.callExpression, cloneNode$2 = lib_exports.cloneNode, conditionalExpression$1 = lib_exports.conditionalExpression, expressionStatement$2 = lib_exports.expressionStatement, getBindingIdentifiers$2 = lib_exports.getBindingIdentifiers, identifier$1 = lib_exports.identifier, inheritLeadingComments2 = lib_exports.inheritLeadingComments, inheritTrailingComments2 = lib_exports.inheritTrailingComments, inheritsComments2 = lib_exports.inheritsComments, isBlockStatement$1 = lib_exports.isBlockStatement, isEmptyStatement2 = lib_exports.isEmptyStatement, isExpression$2 = lib_exports.isExpression, isExpressionStatement4 = lib_exports.isExpressionStatement, isIfStatement3 = lib_exports.isIfStatement, isProgram2 = lib_exports.isProgram, isStatement4 = lib_exports.isStatement, isVariableDeclaration2 = lib_exports.isVariableDeclaration, removeComments2 = lib_exports.removeComments, returnStatement$1 = lib_exports.returnStatement, sequenceExpression$1 = lib_exports.sequenceExpression, validate$13 = lib_exports.validate, yieldExpression2 = lib_exports.yieldExpression;
|
|
49432
49379
|
function replaceWithMultiple(nodes2) {
|
|
49433
49380
|
var _getCachedPaths;
|
|
@@ -49473,7 +49420,7 @@ function replaceWith(replacementPath) {
|
|
|
49473
49420
|
if (this.removed) {
|
|
49474
49421
|
throw new Error("You can't replace this node, we've already removed it");
|
|
49475
49422
|
}
|
|
49476
|
-
var replacement = _instanceof(replacementPath,
|
|
49423
|
+
var replacement = _instanceof(replacementPath, NodePath_Final) ? replacementPath.node : replacementPath;
|
|
49477
49424
|
if (!replacement) {
|
|
49478
49425
|
throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");
|
|
49479
49426
|
}
|
|
@@ -49745,15 +49692,6 @@ function replaceInline(nodes2) {
|
|
|
49745
49692
|
return this.replaceWith(nodes2);
|
|
49746
49693
|
}
|
|
49747
49694
|
}
|
|
49748
|
-
var NodePath_replacement = /* @__PURE__ */ Object.freeze({
|
|
49749
|
-
__proto__: null,
|
|
49750
|
-
_replaceWith: _replaceWith,
|
|
49751
|
-
replaceExpressionWithStatements: replaceExpressionWithStatements,
|
|
49752
|
-
replaceInline: replaceInline,
|
|
49753
|
-
replaceWith: replaceWith,
|
|
49754
|
-
replaceWithMultiple: replaceWithMultiple,
|
|
49755
|
-
replaceWithSourceString: replaceWithSourceString
|
|
49756
|
-
});
|
|
49757
49695
|
var VALID_OBJECT_CALLEES = [
|
|
49758
49696
|
"Number",
|
|
49759
49697
|
"String",
|
|
@@ -50168,11 +50106,6 @@ function evaluate() {
|
|
|
50168
50106
|
value: value1
|
|
50169
50107
|
};
|
|
50170
50108
|
}
|
|
50171
|
-
var NodePath_evaluation = /* @__PURE__ */ Object.freeze({
|
|
50172
|
-
__proto__: null,
|
|
50173
|
-
evaluate: evaluate,
|
|
50174
|
-
evaluateTruthy: evaluateTruthy
|
|
50175
|
-
});
|
|
50176
50109
|
var arrowFunctionExpression$1 = lib_exports.arrowFunctionExpression, assignmentExpression$1 = lib_exports.assignmentExpression, binaryExpression2 = lib_exports.binaryExpression, blockStatement$1 = lib_exports.blockStatement, callExpression$1 = lib_exports.callExpression, conditionalExpression2 = lib_exports.conditionalExpression, expressionStatement$1 = lib_exports.expressionStatement, identifier6 = lib_exports.identifier, isIdentifier$22 = lib_exports.isIdentifier, jsxIdentifier2 = lib_exports.jsxIdentifier, logicalExpression2 = lib_exports.logicalExpression, LOGICAL_OPERATORS2 = lib_exports.LOGICAL_OPERATORS, memberExpression2 = lib_exports.memberExpression, metaProperty2 = lib_exports.metaProperty, numericLiteral$1 = lib_exports.numericLiteral, objectExpression2 = lib_exports.objectExpression, restElement2 = lib_exports.restElement, returnStatement2 = lib_exports.returnStatement, sequenceExpression2 = lib_exports.sequenceExpression, spreadElement2 = lib_exports.spreadElement, stringLiteral3 = lib_exports.stringLiteral, _super2 = lib_exports.super, thisExpression$1 = lib_exports.thisExpression, toExpression2 = lib_exports.toExpression, unaryExpression$1 = lib_exports.unaryExpression;
|
|
50177
50110
|
function toComputedKey2() {
|
|
50178
50111
|
var key;
|
|
@@ -50613,19 +50546,13 @@ function getScopeInformation(fnPath) {
|
|
|
50613
50546
|
superCalls: superCalls
|
|
50614
50547
|
};
|
|
50615
50548
|
}
|
|
50616
|
-
var NodePath_conversion = /* @__PURE__ */ Object.freeze({
|
|
50617
|
-
__proto__: null,
|
|
50618
|
-
arrowFunctionToExpression: arrowFunctionToExpression,
|
|
50619
|
-
ensureBlock: ensureBlock2,
|
|
50620
|
-
toComputedKey: toComputedKey2,
|
|
50621
|
-
unwrapFunctionEnvironment: unwrapFunctionEnvironment
|
|
50622
|
-
});
|
|
50623
50549
|
var STATEMENT_OR_BLOCK_KEYS2 = lib_exports.STATEMENT_OR_BLOCK_KEYS, VISITOR_KEYS$3 = lib_exports.VISITOR_KEYS, isBlockStatement3 = lib_exports.isBlockStatement, isExpression$1 = lib_exports.isExpression, isIdentifier$12 = lib_exports.isIdentifier, isLiteral4 = lib_exports.isLiteral, isStringLiteral4 = lib_exports.isStringLiteral, isType3 = lib_exports.isType, _matchesPattern = lib_exports.matchesPattern;
|
|
50624
50550
|
function matchesPattern2(pattern, allowPartial) {
|
|
50625
50551
|
return _matchesPattern(this.node, pattern, allowPartial);
|
|
50626
50552
|
}
|
|
50627
50553
|
function has(key) {
|
|
50628
|
-
var
|
|
50554
|
+
var _this_node;
|
|
50555
|
+
var val = (_this_node = this.node) === null || _this_node === void 0 ? void 0 : _this_node[key];
|
|
50629
50556
|
if (val && Array.isArray(val)) {
|
|
50630
50557
|
return !!val.length;
|
|
50631
50558
|
} else {
|
|
@@ -51031,28 +50958,6 @@ function isInStrictMode() {
|
|
|
51031
50958
|
});
|
|
51032
50959
|
return !!strictParent;
|
|
51033
50960
|
}
|
|
51034
|
-
var NodePath_introspection = /* @__PURE__ */ Object.freeze({
|
|
51035
|
-
__proto__: null,
|
|
51036
|
-
_guessExecutionStatusRelativeTo: _guessExecutionStatusRelativeTo,
|
|
51037
|
-
_resolve: _resolve,
|
|
51038
|
-
canHaveVariableDeclarationOrExpression: canHaveVariableDeclarationOrExpression,
|
|
51039
|
-
canSwapBetweenExpressionAndStatement: canSwapBetweenExpressionAndStatement,
|
|
51040
|
-
equals: equals,
|
|
51041
|
-
getSource: getSource,
|
|
51042
|
-
has: has,
|
|
51043
|
-
is: is2,
|
|
51044
|
-
isCompletionRecord: isCompletionRecord,
|
|
51045
|
-
isConstantExpression: isConstantExpression,
|
|
51046
|
-
isInStrictMode: isInStrictMode,
|
|
51047
|
-
isNodeType: isNodeType,
|
|
51048
|
-
isStatementOrBlock: isStatementOrBlock,
|
|
51049
|
-
isStatic: isStatic,
|
|
51050
|
-
isnt: isnt,
|
|
51051
|
-
matchesPattern: matchesPattern2,
|
|
51052
|
-
referencesImport: referencesImport,
|
|
51053
|
-
resolve: resolve3,
|
|
51054
|
-
willIMaybeExecuteBefore: willIMaybeExecuteBefore
|
|
51055
|
-
});
|
|
51056
50961
|
function call(key) {
|
|
51057
50962
|
var opts = this.opts;
|
|
51058
50963
|
this.debug(key);
|
|
@@ -51075,7 +50980,7 @@ function _call(fns) {
|
|
|
51075
50980
|
var node = this.node;
|
|
51076
50981
|
if (!node) return true;
|
|
51077
50982
|
var ret = fn.call(this.state, this, this.state);
|
|
51078
|
-
if (ret && typeof ret === "object" && typeof ret.then === "function") {
|
|
50983
|
+
if (ret && (typeof ret === "undefined" ? "undefined" : _type_of(ret)) === "object" && typeof ret.then === "function") {
|
|
51079
50984
|
throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");
|
|
51080
50985
|
}
|
|
51081
50986
|
if (ret) {
|
|
@@ -51300,30 +51205,6 @@ function _getQueueContexts() {
|
|
|
51300
51205
|
}
|
|
51301
51206
|
return contexts;
|
|
51302
51207
|
}
|
|
51303
|
-
var NodePath_context = /* @__PURE__ */ Object.freeze({
|
|
51304
|
-
__proto__: null,
|
|
51305
|
-
_call: _call,
|
|
51306
|
-
_getQueueContexts: _getQueueContexts,
|
|
51307
|
-
_resyncKey: _resyncKey,
|
|
51308
|
-
_resyncList: _resyncList,
|
|
51309
|
-
_resyncParent: _resyncParent,
|
|
51310
|
-
_resyncRemoved: _resyncRemoved,
|
|
51311
|
-
call: call,
|
|
51312
|
-
isBlacklisted: isDenylisted,
|
|
51313
|
-
isDenylisted: isDenylisted,
|
|
51314
|
-
popContext: popContext,
|
|
51315
|
-
pushContext: pushContext,
|
|
51316
|
-
requeue: requeue,
|
|
51317
|
-
resync: resync,
|
|
51318
|
-
setContext: setContext,
|
|
51319
|
-
setKey: setKey,
|
|
51320
|
-
setScope: setScope,
|
|
51321
|
-
setup: setup,
|
|
51322
|
-
skip: skip,
|
|
51323
|
-
skipKey: skipKey,
|
|
51324
|
-
stop: stop,
|
|
51325
|
-
visit: visit2
|
|
51326
|
-
});
|
|
51327
51208
|
var hooks = [
|
|
51328
51209
|
function(self, parent) {
|
|
51329
51210
|
var removeParent = self.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self.key === "declaration" && parent.isExportDeclaration() || self.key === "body" && parent.isLabeledStatement() || self.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self.key === "expression" && parent.isExpressionStatement();
|
|
@@ -51425,15 +51306,6 @@ function _assertUnremoved() {
|
|
|
51425
51306
|
throw this.buildCodeFrameError("NodePath has been removed so is read-only.");
|
|
51426
51307
|
}
|
|
51427
51308
|
}
|
|
51428
|
-
var NodePath_removal = /* @__PURE__ */ Object.freeze({
|
|
51429
|
-
__proto__: null,
|
|
51430
|
-
_assertUnremoved: _assertUnremoved,
|
|
51431
|
-
_callRemovalHooks: _callRemovalHooks,
|
|
51432
|
-
_markRemoved: _markRemoved,
|
|
51433
|
-
_remove: _remove,
|
|
51434
|
-
_removeFromScope: _removeFromScope,
|
|
51435
|
-
remove: remove2
|
|
51436
|
-
});
|
|
51437
51309
|
var react2 = lib_exports.react;
|
|
51438
51310
|
var cloneNode$1 = lib_exports.cloneNode, jsxExpressionContainer2 = lib_exports.jsxExpressionContainer, variableDeclaration3 = lib_exports.variableDeclaration, variableDeclarator3 = lib_exports.variableDeclarator;
|
|
51439
51311
|
var referenceVisitor = {
|
|
@@ -51820,18 +51692,19 @@ function insertAfter(nodes_) {
|
|
|
51820
51692
|
return isExpression2(node) ? expressionStatement4(node) : node;
|
|
51821
51693
|
}));
|
|
51822
51694
|
} else if (this.isNodeType("Expression") && !this.isJSXElement() && !parentPath.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
|
|
51823
|
-
|
|
51824
|
-
|
|
51695
|
+
var self = this;
|
|
51696
|
+
if (self.node) {
|
|
51697
|
+
var node = self.node;
|
|
51825
51698
|
var _this1 = this, scope2 = _this1.scope;
|
|
51826
51699
|
if (scope2.path.isPattern()) {
|
|
51827
51700
|
assertExpression2(node);
|
|
51828
|
-
|
|
51829
|
-
|
|
51701
|
+
self.replaceWith(callExpression2(arrowFunctionExpression2([], node), []));
|
|
51702
|
+
self.get("callee.body").insertAfter(nodes2);
|
|
51830
51703
|
return [
|
|
51831
|
-
|
|
51704
|
+
self
|
|
51832
51705
|
];
|
|
51833
51706
|
}
|
|
51834
|
-
if (isHiddenInSequenceExpression(
|
|
51707
|
+
if (isHiddenInSequenceExpression(self)) {
|
|
51835
51708
|
nodes2.unshift(node);
|
|
51836
51709
|
} else if (isCallExpression4(node) && isSuper2(node.callee)) {
|
|
51837
51710
|
nodes2.unshift(node);
|
|
@@ -51907,11 +51780,11 @@ function _verifyNodeList(nodes2) {
|
|
|
51907
51780
|
var msg = void 0;
|
|
51908
51781
|
if (!node) {
|
|
51909
51782
|
msg = "has falsy node";
|
|
51910
|
-
} else if (typeof node !== "object") {
|
|
51783
|
+
} else if ((typeof node === "undefined" ? "undefined" : _type_of(node)) !== "object") {
|
|
51911
51784
|
msg = "contains a non-object node";
|
|
51912
51785
|
} else if (!node.type) {
|
|
51913
51786
|
msg = "without a type";
|
|
51914
|
-
} else if (_instanceof(node,
|
|
51787
|
+
} else if (_instanceof(node, NodePath_Final)) {
|
|
51915
51788
|
msg = "has a NodePath when it expected a raw object";
|
|
51916
51789
|
}
|
|
51917
51790
|
if (msg) {
|
|
@@ -51924,7 +51797,7 @@ function _verifyNodeList(nodes2) {
|
|
|
51924
51797
|
function unshiftContainer(listKey, nodes2) {
|
|
51925
51798
|
this._assertUnremoved();
|
|
51926
51799
|
nodes2 = this._verifyNodeList(nodes2);
|
|
51927
|
-
var path =
|
|
51800
|
+
var path = NodePath_Final.get({
|
|
51928
51801
|
parentPath: this,
|
|
51929
51802
|
parent: this.node,
|
|
51930
51803
|
container: this.node[listKey],
|
|
@@ -51937,7 +51810,7 @@ function pushContainer(listKey, nodes2) {
|
|
|
51937
51810
|
this._assertUnremoved();
|
|
51938
51811
|
var verifiedNodes = this._verifyNodeList(nodes2);
|
|
51939
51812
|
var container = this.node[listKey];
|
|
51940
|
-
var path =
|
|
51813
|
+
var path = NodePath_Final.get({
|
|
51941
51814
|
parentPath: this,
|
|
51942
51815
|
parent: this.node,
|
|
51943
51816
|
container: container,
|
|
@@ -51951,20 +51824,7 @@ function hoist() {
|
|
|
51951
51824
|
var hoister = new PathHoister(this, scope2);
|
|
51952
51825
|
return hoister.run();
|
|
51953
51826
|
}
|
|
51954
|
-
var
|
|
51955
|
-
__proto__: null,
|
|
51956
|
-
_containerInsert: _containerInsert,
|
|
51957
|
-
_containerInsertAfter: _containerInsertAfter,
|
|
51958
|
-
_containerInsertBefore: _containerInsertBefore,
|
|
51959
|
-
_verifyNodeList: _verifyNodeList,
|
|
51960
|
-
hoist: hoist,
|
|
51961
|
-
insertAfter: insertAfter,
|
|
51962
|
-
insertBefore: insertBefore,
|
|
51963
|
-
pushContainer: pushContainer,
|
|
51964
|
-
unshiftContainer: unshiftContainer,
|
|
51965
|
-
updateSiblingKeys: updateSiblingKeys
|
|
51966
|
-
});
|
|
51967
|
-
var _getBindingIdentifiers = lib_exports.getBindingIdentifiers, _getOuterBindingIdentifiers = lib_exports.getOuterBindingIdentifiers, isDeclaration2 = lib_exports.isDeclaration, numericLiteral2 = lib_exports.numericLiteral, unaryExpression2 = lib_exports.unaryExpression;
|
|
51827
|
+
var _getBindingIdentifiers = lib_exports.getBindingIdentifiers, _getOuterBindingIdentifiers = lib_exports.getOuterBindingIdentifiers, numericLiteral2 = lib_exports.numericLiteral, unaryExpression2 = lib_exports.unaryExpression;
|
|
51968
51828
|
var NORMAL_COMPLETION = 0;
|
|
51969
51829
|
var BREAK_COMPLETION = 1;
|
|
51970
51830
|
function NormalCompletion(path) {
|
|
@@ -52171,7 +52031,7 @@ function getCompletionRecords() {
|
|
|
52171
52031
|
});
|
|
52172
52032
|
}
|
|
52173
52033
|
function getSibling(key) {
|
|
52174
|
-
return
|
|
52034
|
+
return NodePath_Final.get({
|
|
52175
52035
|
parentPath: this.parentPath,
|
|
52176
52036
|
parent: this.parent,
|
|
52177
52037
|
container: this.container,
|
|
@@ -52221,7 +52081,7 @@ function _getKey(key, context) {
|
|
|
52221
52081
|
var container = node[key];
|
|
52222
52082
|
if (Array.isArray(container)) {
|
|
52223
52083
|
return container.map(function(_, i) {
|
|
52224
|
-
return
|
|
52084
|
+
return NodePath_Final.get({
|
|
52225
52085
|
listKey: key,
|
|
52226
52086
|
parentPath: _this,
|
|
52227
52087
|
parent: node,
|
|
@@ -52230,7 +52090,7 @@ function _getKey(key, context) {
|
|
|
52230
52090
|
}).setContext(context);
|
|
52231
52091
|
});
|
|
52232
52092
|
} else {
|
|
52233
|
-
return
|
|
52093
|
+
return NodePath_Final.get({
|
|
52234
52094
|
parentPath: this,
|
|
52235
52095
|
parent: node,
|
|
52236
52096
|
container: node,
|
|
@@ -52299,7 +52159,7 @@ function getBindingIdentifierPaths() {
|
|
|
52299
52159
|
}
|
|
52300
52160
|
if (id.isExportDeclaration()) {
|
|
52301
52161
|
var declaration = id.get("declaration");
|
|
52302
|
-
if (
|
|
52162
|
+
if (declaration.isDeclaration()) {
|
|
52303
52163
|
search.push(declaration);
|
|
52304
52164
|
}
|
|
52305
52165
|
continue;
|
|
@@ -52332,23 +52192,6 @@ function getOuterBindingIdentifierPaths() {
|
|
|
52332
52192
|
var duplicates = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
52333
52193
|
return this.getBindingIdentifierPaths(duplicates, true);
|
|
52334
52194
|
}
|
|
52335
|
-
var NodePath_family = /* @__PURE__ */ Object.freeze({
|
|
52336
|
-
__proto__: null,
|
|
52337
|
-
_getKey: _getKey,
|
|
52338
|
-
_getPattern: _getPattern,
|
|
52339
|
-
get: get2,
|
|
52340
|
-
getAllNextSiblings: getAllNextSiblings,
|
|
52341
|
-
getAllPrevSiblings: getAllPrevSiblings,
|
|
52342
|
-
getBindingIdentifierPaths: getBindingIdentifierPaths,
|
|
52343
|
-
getBindingIdentifiers: getBindingIdentifiers2,
|
|
52344
|
-
getCompletionRecords: getCompletionRecords,
|
|
52345
|
-
getNextSibling: getNextSibling,
|
|
52346
|
-
getOpposite: getOpposite,
|
|
52347
|
-
getOuterBindingIdentifierPaths: getOuterBindingIdentifierPaths,
|
|
52348
|
-
getOuterBindingIdentifiers: getOuterBindingIdentifiers2,
|
|
52349
|
-
getPrevSibling: getPrevSibling,
|
|
52350
|
-
getSibling: getSibling
|
|
52351
|
-
});
|
|
52352
52195
|
var _addComment = lib_exports.addComment, _addComments = lib_exports.addComments;
|
|
52353
52196
|
function shareCommentsWithSiblings() {
|
|
52354
52197
|
if (typeof this.key === "string") return;
|
|
@@ -52387,21 +52230,15 @@ function addComment2(type, content, line) {
|
|
|
52387
52230
|
function addComments2(type, comments) {
|
|
52388
52231
|
_addComments(this.node, type, comments);
|
|
52389
52232
|
}
|
|
52390
|
-
var NodePath_comments = /* @__PURE__ */ Object.freeze({
|
|
52391
|
-
__proto__: null,
|
|
52392
|
-
addComment: addComment2,
|
|
52393
|
-
addComments: addComments2,
|
|
52394
|
-
shareCommentsWithSiblings: shareCommentsWithSiblings
|
|
52395
|
-
});
|
|
52396
52233
|
var validate3 = lib_exports.validate;
|
|
52397
52234
|
var debug = (0, import_debug.default)("babel");
|
|
52398
52235
|
var REMOVED = 1 << 0;
|
|
52399
52236
|
var SHOULD_STOP = 1 << 1;
|
|
52400
52237
|
var SHOULD_SKIP = 1 << 2;
|
|
52401
|
-
var
|
|
52238
|
+
var NodePath_Final = /*#__PURE__*/ function() {
|
|
52402
52239
|
"use strict";
|
|
52403
|
-
function
|
|
52404
|
-
_class_call_check(this,
|
|
52240
|
+
function NodePath(hub, parent) {
|
|
52241
|
+
_class_call_check(this, NodePath);
|
|
52405
52242
|
__publicField(this, "contexts", []);
|
|
52406
52243
|
__publicField(this, "state", null);
|
|
52407
52244
|
__publicField(this, "opts", null);
|
|
@@ -52419,7 +52256,37 @@ var NodePath = /*#__PURE__*/ function() {
|
|
|
52419
52256
|
this.context = null;
|
|
52420
52257
|
this.scope = null;
|
|
52421
52258
|
}
|
|
52422
|
-
_create_class(
|
|
52259
|
+
_create_class(NodePath, [
|
|
52260
|
+
{
|
|
52261
|
+
key: "removed",
|
|
52262
|
+
get: function get() {
|
|
52263
|
+
return (this._traverseFlags & 1) > 0;
|
|
52264
|
+
},
|
|
52265
|
+
set: function set(v) {
|
|
52266
|
+
if (v) this._traverseFlags |= 1;
|
|
52267
|
+
else this._traverseFlags &= -2;
|
|
52268
|
+
}
|
|
52269
|
+
},
|
|
52270
|
+
{
|
|
52271
|
+
key: "shouldStop",
|
|
52272
|
+
get: function get() {
|
|
52273
|
+
return (this._traverseFlags & 2) > 0;
|
|
52274
|
+
},
|
|
52275
|
+
set: function set(v) {
|
|
52276
|
+
if (v) this._traverseFlags |= 2;
|
|
52277
|
+
else this._traverseFlags &= -3;
|
|
52278
|
+
}
|
|
52279
|
+
},
|
|
52280
|
+
{
|
|
52281
|
+
key: "shouldSkip",
|
|
52282
|
+
get: function get() {
|
|
52283
|
+
return (this._traverseFlags & 4) > 0;
|
|
52284
|
+
},
|
|
52285
|
+
set: function set(v) {
|
|
52286
|
+
if (v) this._traverseFlags |= 4;
|
|
52287
|
+
else this._traverseFlags &= -5;
|
|
52288
|
+
}
|
|
52289
|
+
},
|
|
52423
52290
|
{
|
|
52424
52291
|
key: "getScope",
|
|
52425
52292
|
value: function getScope(scope2) {
|
|
@@ -52514,45 +52381,6 @@ var NodePath = /*#__PURE__*/ function() {
|
|
|
52514
52381
|
get: function get() {
|
|
52515
52382
|
return this.listKey || this.key;
|
|
52516
52383
|
}
|
|
52517
|
-
},
|
|
52518
|
-
{
|
|
52519
|
-
key: "shouldSkip",
|
|
52520
|
-
get: function get() {
|
|
52521
|
-
return !!(this._traverseFlags & SHOULD_SKIP);
|
|
52522
|
-
},
|
|
52523
|
-
set: function set(v) {
|
|
52524
|
-
if (v) {
|
|
52525
|
-
this._traverseFlags |= SHOULD_SKIP;
|
|
52526
|
-
} else {
|
|
52527
|
-
this._traverseFlags &= ~SHOULD_SKIP;
|
|
52528
|
-
}
|
|
52529
|
-
}
|
|
52530
|
-
},
|
|
52531
|
-
{
|
|
52532
|
-
key: "shouldStop",
|
|
52533
|
-
get: function get() {
|
|
52534
|
-
return !!(this._traverseFlags & SHOULD_STOP);
|
|
52535
|
-
},
|
|
52536
|
-
set: function set(v) {
|
|
52537
|
-
if (v) {
|
|
52538
|
-
this._traverseFlags |= SHOULD_STOP;
|
|
52539
|
-
} else {
|
|
52540
|
-
this._traverseFlags &= ~SHOULD_STOP;
|
|
52541
|
-
}
|
|
52542
|
-
}
|
|
52543
|
-
},
|
|
52544
|
-
{
|
|
52545
|
-
key: "removed",
|
|
52546
|
-
get: function get() {
|
|
52547
|
-
return !!(this._traverseFlags & REMOVED);
|
|
52548
|
-
},
|
|
52549
|
-
set: function set(v) {
|
|
52550
|
-
if (v) {
|
|
52551
|
-
this._traverseFlags |= REMOVED;
|
|
52552
|
-
} else {
|
|
52553
|
-
this._traverseFlags &= ~REMOVED;
|
|
52554
|
-
}
|
|
52555
|
-
}
|
|
52556
52384
|
}
|
|
52557
52385
|
], [
|
|
52558
52386
|
{
|
|
@@ -52569,7 +52397,7 @@ var NodePath = /*#__PURE__*/ function() {
|
|
|
52569
52397
|
var paths = getOrCreateCachedPaths(hub, parent);
|
|
52570
52398
|
var path = paths.get(targetNode);
|
|
52571
52399
|
if (!path) {
|
|
52572
|
-
path = new
|
|
52400
|
+
path = new NodePath(hub, parent);
|
|
52573
52401
|
if (targetNode) paths.set(targetNode, path);
|
|
52574
52402
|
}
|
|
52575
52403
|
path.setup(parentPath, container, listKey, key);
|
|
@@ -52577,19 +52405,122 @@ var NodePath = /*#__PURE__*/ function() {
|
|
|
52577
52405
|
}
|
|
52578
52406
|
}
|
|
52579
52407
|
]);
|
|
52580
|
-
return
|
|
52408
|
+
return NodePath;
|
|
52581
52409
|
}();
|
|
52582
|
-
|
|
52410
|
+
var methods = {
|
|
52411
|
+
findParent: findParent,
|
|
52412
|
+
find: find,
|
|
52413
|
+
getFunctionParent: getFunctionParent,
|
|
52414
|
+
getStatementParent: getStatementParent,
|
|
52415
|
+
getEarliestCommonAncestorFrom: getEarliestCommonAncestorFrom,
|
|
52416
|
+
getDeepestCommonAncestorFrom: getDeepestCommonAncestorFrom,
|
|
52417
|
+
getAncestry: getAncestry,
|
|
52418
|
+
isAncestor: isAncestor,
|
|
52419
|
+
isDescendant: isDescendant,
|
|
52420
|
+
inType: inType,
|
|
52421
|
+
getTypeAnnotation: getTypeAnnotation,
|
|
52422
|
+
_getTypeAnnotation: _getTypeAnnotation,
|
|
52423
|
+
isBaseType: isBaseType,
|
|
52424
|
+
couldBeBaseType: couldBeBaseType,
|
|
52425
|
+
baseTypeStrictlyMatches: baseTypeStrictlyMatches,
|
|
52426
|
+
isGenericType: isGenericType,
|
|
52427
|
+
replaceWithMultiple: replaceWithMultiple,
|
|
52428
|
+
replaceWithSourceString: replaceWithSourceString,
|
|
52429
|
+
replaceWith: replaceWith,
|
|
52430
|
+
_replaceWith: _replaceWith,
|
|
52431
|
+
replaceExpressionWithStatements: replaceExpressionWithStatements,
|
|
52432
|
+
replaceInline: replaceInline,
|
|
52433
|
+
evaluateTruthy: evaluateTruthy,
|
|
52434
|
+
evaluate: evaluate,
|
|
52435
|
+
toComputedKey: toComputedKey2,
|
|
52436
|
+
ensureBlock: ensureBlock2,
|
|
52437
|
+
unwrapFunctionEnvironment: unwrapFunctionEnvironment,
|
|
52438
|
+
arrowFunctionToExpression: arrowFunctionToExpression,
|
|
52439
|
+
matchesPattern: matchesPattern2,
|
|
52440
|
+
has: has,
|
|
52441
|
+
isStatic: isStatic,
|
|
52442
|
+
is: is2,
|
|
52443
|
+
isnt: isnt,
|
|
52444
|
+
equals: equals,
|
|
52445
|
+
isNodeType: isNodeType,
|
|
52446
|
+
canHaveVariableDeclarationOrExpression: canHaveVariableDeclarationOrExpression,
|
|
52447
|
+
canSwapBetweenExpressionAndStatement: canSwapBetweenExpressionAndStatement,
|
|
52448
|
+
isCompletionRecord: isCompletionRecord,
|
|
52449
|
+
isStatementOrBlock: isStatementOrBlock,
|
|
52450
|
+
referencesImport: referencesImport,
|
|
52451
|
+
getSource: getSource,
|
|
52452
|
+
willIMaybeExecuteBefore: willIMaybeExecuteBefore,
|
|
52453
|
+
_guessExecutionStatusRelativeTo: _guessExecutionStatusRelativeTo,
|
|
52454
|
+
resolve: resolve3,
|
|
52455
|
+
_resolve: _resolve,
|
|
52456
|
+
isConstantExpression: isConstantExpression,
|
|
52457
|
+
isInStrictMode: isInStrictMode,
|
|
52458
|
+
call: call,
|
|
52459
|
+
_call: _call,
|
|
52460
|
+
isDenylisted: isDenylisted,
|
|
52461
|
+
isBlacklisted: isDenylisted,
|
|
52462
|
+
visit: visit2,
|
|
52463
|
+
skip: skip,
|
|
52464
|
+
skipKey: skipKey,
|
|
52465
|
+
stop: stop,
|
|
52466
|
+
setScope: setScope,
|
|
52467
|
+
setContext: setContext,
|
|
52468
|
+
resync: resync,
|
|
52469
|
+
_resyncParent: _resyncParent,
|
|
52470
|
+
_resyncKey: _resyncKey,
|
|
52471
|
+
_resyncList: _resyncList,
|
|
52472
|
+
_resyncRemoved: _resyncRemoved,
|
|
52473
|
+
popContext: popContext,
|
|
52474
|
+
pushContext: pushContext,
|
|
52475
|
+
setup: setup,
|
|
52476
|
+
setKey: setKey,
|
|
52477
|
+
requeue: requeue,
|
|
52478
|
+
_getQueueContexts: _getQueueContexts,
|
|
52479
|
+
remove: remove2,
|
|
52480
|
+
_removeFromScope: _removeFromScope,
|
|
52481
|
+
_callRemovalHooks: _callRemovalHooks,
|
|
52482
|
+
_remove: _remove,
|
|
52483
|
+
_markRemoved: _markRemoved,
|
|
52484
|
+
_assertUnremoved: _assertUnremoved,
|
|
52485
|
+
insertBefore: insertBefore,
|
|
52486
|
+
_containerInsert: _containerInsert,
|
|
52487
|
+
_containerInsertBefore: _containerInsertBefore,
|
|
52488
|
+
_containerInsertAfter: _containerInsertAfter,
|
|
52489
|
+
insertAfter: insertAfter,
|
|
52490
|
+
updateSiblingKeys: updateSiblingKeys,
|
|
52491
|
+
_verifyNodeList: _verifyNodeList,
|
|
52492
|
+
unshiftContainer: unshiftContainer,
|
|
52493
|
+
pushContainer: pushContainer,
|
|
52494
|
+
hoist: hoist,
|
|
52495
|
+
getOpposite: getOpposite,
|
|
52496
|
+
getCompletionRecords: getCompletionRecords,
|
|
52497
|
+
getSibling: getSibling,
|
|
52498
|
+
getPrevSibling: getPrevSibling,
|
|
52499
|
+
getNextSibling: getNextSibling,
|
|
52500
|
+
getAllNextSiblings: getAllNextSiblings,
|
|
52501
|
+
getAllPrevSiblings: getAllPrevSiblings,
|
|
52502
|
+
get: get2,
|
|
52503
|
+
_getKey: _getKey,
|
|
52504
|
+
_getPattern: _getPattern,
|
|
52505
|
+
getBindingIdentifiers: getBindingIdentifiers2,
|
|
52506
|
+
getOuterBindingIdentifiers: getOuterBindingIdentifiers2,
|
|
52507
|
+
getBindingIdentifierPaths: getBindingIdentifierPaths,
|
|
52508
|
+
getOuterBindingIdentifierPaths: getOuterBindingIdentifierPaths,
|
|
52509
|
+
shareCommentsWithSiblings: shareCommentsWithSiblings,
|
|
52510
|
+
addComment: addComment2,
|
|
52511
|
+
addComments: addComments2
|
|
52512
|
+
};
|
|
52513
|
+
Object.assign(NodePath_Final.prototype, methods);
|
|
52583
52514
|
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined;
|
|
52584
52515
|
try {
|
|
52585
52516
|
var _loop = function() {
|
|
52586
52517
|
var type = _step2.value;
|
|
52587
52518
|
var typeKey = "is".concat(type);
|
|
52588
52519
|
var fn = lib_exports[typeKey];
|
|
52589
|
-
|
|
52520
|
+
NodePath_Final.prototype[typeKey] = function(opts) {
|
|
52590
52521
|
return fn(this.node, opts);
|
|
52591
52522
|
};
|
|
52592
|
-
|
|
52523
|
+
NodePath_Final.prototype["assert".concat(type)] = function(opts) {
|
|
52593
52524
|
if (!fn(this.node, opts)) {
|
|
52594
52525
|
throw new TypeError("Expected node path of type ".concat(type));
|
|
52595
52526
|
}
|
|
@@ -52610,7 +52541,7 @@ try {
|
|
|
52610
52541
|
}
|
|
52611
52542
|
}
|
|
52612
52543
|
}
|
|
52613
|
-
Object.assign(
|
|
52544
|
+
Object.assign(NodePath_Final.prototype, NodePath_virtual_types_validator);
|
|
52614
52545
|
var _iteratorNormalCompletion3 = true, _didIteratorError3 = false, _iteratorError3 = undefined;
|
|
52615
52546
|
try {
|
|
52616
52547
|
for(var _iterator3 = Object.keys(virtualTypes)[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true){
|
|
@@ -52681,7 +52612,7 @@ var TraversalContext = /*#__PURE__*/ function() {
|
|
|
52681
52612
|
{
|
|
52682
52613
|
key: "create",
|
|
52683
52614
|
value: function create(node, container, key, listKey) {
|
|
52684
|
-
return
|
|
52615
|
+
return NodePath_Final.get({
|
|
52685
52616
|
parentPath: this.parentPath,
|
|
52686
52617
|
parent: node,
|
|
52687
52618
|
container: container,
|
|
@@ -52831,12 +52762,12 @@ function traverse3(parent) {
|
|
|
52831
52762
|
if (!VISITOR_KEYS2[parent.type]) {
|
|
52832
52763
|
return;
|
|
52833
52764
|
}
|
|
52834
|
-
explode(opts);
|
|
52765
|
+
explode$1(opts);
|
|
52835
52766
|
traverseNode(parent, opts, scope2, state, parentPath, null, visitSelf);
|
|
52836
52767
|
}
|
|
52837
52768
|
traverse3.visitors = visitors;
|
|
52838
|
-
traverse3.verify = verify;
|
|
52839
|
-
traverse3.explode = explode;
|
|
52769
|
+
traverse3.verify = verify$1;
|
|
52770
|
+
traverse3.explode = explode$1;
|
|
52840
52771
|
traverse3.cheap = function(node, enter) {
|
|
52841
52772
|
traverseFast2(node, enter);
|
|
52842
52773
|
return;
|