@rsdoctor/core 2.0.2 → 2.0.4
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/dist/e.js +3087 -83
- package/dist/e.js.LICENSE.txt +1 -1
- package/dist/index.js +13 -7
- package/dist/r.js +48 -34
- package/package.json +10 -16
package/dist/e.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createRequire, createRequire as __rspack_createRequire } from "node:mod
|
|
|
3
3
|
import { rspackRequire, moduleFactories, definePropertyGetters, makeNamespaceObject, compatGetDefaultExport } from "./rslib-runtime.js";
|
|
4
4
|
import node_util from "node:util";
|
|
5
5
|
import { Constants } from "@rsdoctor/shared/types";
|
|
6
|
-
import { Readable
|
|
6
|
+
import { Readable } from "stream";
|
|
7
7
|
import path_0, { dirname, extname, join } from "path";
|
|
8
8
|
import { Loader, Lodash, Package } from "@rsdoctor/shared/common-browser";
|
|
9
9
|
import node_path from "node:path";
|
|
@@ -1352,18 +1352,7 @@ makeNamespaceObject(utils_namespaceObject), definePropertyGetters(utils_namespac
|
|
|
1352
1352
|
});
|
|
1353
1353
|
var walk_namespaceObject = {};
|
|
1354
1354
|
makeNamespaceObject(walk_namespaceObject), definePropertyGetters(walk_namespaceObject, {
|
|
1355
|
-
recursive: ()=>
|
|
1356
|
-
!function(ast, { enter, leave }) {
|
|
1357
|
-
new SyncWalker(enter, leave).visit(ast, null);
|
|
1358
|
-
}(node, {
|
|
1359
|
-
enter (child) {
|
|
1360
|
-
let visitor = visitors[child.type];
|
|
1361
|
-
visitor && (this.skip(), visitor(child, state, (next, nextState)=>{
|
|
1362
|
-
recursive(next, nextState, visitors);
|
|
1363
|
-
}));
|
|
1364
|
-
}
|
|
1365
|
-
});
|
|
1366
|
-
}
|
|
1355
|
+
recursive: ()=>recursive
|
|
1367
1356
|
}), !function() {
|
|
1368
1357
|
let { versions } = process;
|
|
1369
1358
|
if (!("styleText" in node_util) && versions.node && !versions.bun && !versions.deno) throw Error(`Unsupported Node.js version: "${process.versions.node || 'unknown'}". Expected Node.js >= 20.`);
|
|
@@ -1805,16 +1794,16 @@ var esm_JsonStreamStringify = function(_Readable) {
|
|
|
1805
1794
|
function stringify(json, replacer, space, cycle, chunkSize = 419430400) {
|
|
1806
1795
|
let jsonList = [];
|
|
1807
1796
|
return json && 'object' == typeof json ? new Promise((resolve, reject)=>{
|
|
1808
|
-
let stream = new esm_JsonStreamStringify(json, replacer, space, cycle),
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1797
|
+
let stream = new esm_JsonStreamStringify(json, replacer, space, cycle), currentContent = '';
|
|
1798
|
+
stream.setEncoding('utf8').on('data', (chunk)=>{
|
|
1799
|
+
let offset = 0;
|
|
1800
|
+
for(; offset < chunk.length;){
|
|
1801
|
+
let end = Math.min(offset + Math.max(chunkSize, currentContent.length + 1) - currentContent.length, chunk.length);
|
|
1802
|
+
if (currentContent += chunk.slice(offset, end), offset = end, currentContent.length >= chunkSize) {
|
|
1803
|
+
let splitAt = currentContent.length, last = currentContent.charCodeAt(splitAt - 1);
|
|
1804
|
+
last >= 0xd800 && last <= 0xdbff && splitAt--, splitAt > 0 && (jsonList.push(currentContent.slice(0, splitAt)), currentContent = currentContent.slice(splitAt));
|
|
1805
|
+
}
|
|
1814
1806
|
}
|
|
1815
|
-
});
|
|
1816
|
-
stream.pipe(batchProcessor).on('data', (line)=>{
|
|
1817
|
-
currentLength + line.length > chunkSize && (jsonList.push(currentContent), currentContent = '', currentLength = 0), line.length && (currentContent += line, currentLength += line.length);
|
|
1818
1807
|
}).on('end', ()=>{
|
|
1819
1808
|
currentContent.length > 0 && jsonList.push(currentContent), resolve(jsonList);
|
|
1820
1809
|
}).on('error', (err)=>reject(err));
|
|
@@ -1831,7 +1820,7 @@ let readPackageJson = (file, readFile)=>{
|
|
|
1831
1820
|
...result,
|
|
1832
1821
|
root: current
|
|
1833
1822
|
} : readPackageJson(dirname(current), readFile);
|
|
1834
|
-
}, JEDEC = "jedec", BYTE = "byte", ARRAY = "array", OBJECT = "object", STRING = "string", EXPONENT = "exponent", STRINGS_symbol = {
|
|
1823
|
+
}, JEDEC = "jedec", BYTE = "byte", ARRAY = "array", OBJECT = "object", STRING = "string", EXPONENT = "exponent", ROUND = "round", STRINGS_symbol = {
|
|
1835
1824
|
iec: {
|
|
1836
1825
|
bits: [
|
|
1837
1826
|
"bit",
|
|
@@ -1973,10 +1962,10 @@ function applyNumberFormatting(value, locale, localeOptions, separator, pad, rou
|
|
|
1973
1962
|
}
|
|
1974
1963
|
return result;
|
|
1975
1964
|
}
|
|
1976
|
-
function filesize(arg, { bits = !1, pad = !1, base = -1, round = 2, locale = "", localeOptions = {}, separator = "", spacer = " ", symbols = {}, standard = "", output = STRING, fullform = !1, fullforms = [], exponent = -1, roundingMethod =
|
|
1965
|
+
function filesize(arg, { bits = !1, pad = !1, base = -1, round = 2, locale = "", localeOptions = {}, separator = "", spacer = " ", symbols = {}, standard = "", output = STRING, fullform = !1, fullforms = [], exponent = -1, roundingMethod = ROUND, precision = 0 } = {}) {
|
|
1977
1966
|
let p, r, symbolTable, numericValue, valueResult, e = exponent, num, result = [], val = 0, u = "", isBigInt = "bigint" == typeof arg;
|
|
1978
1967
|
if (isNaN(num = Number(arg)) || !isFinite(num)) throw TypeError("Invalid number");
|
|
1979
|
-
let { isDecimal, ceil, actualStandard } = STANDARD_CONFIGS[standard] ? STANDARD_CONFIGS[
|
|
1968
|
+
let { isDecimal, ceil, actualStandard } = STANDARD_CONFIGS[standard1 = (standard1 = standard).toLowerCase()] ? STANDARD_CONFIGS[standard1] : 2 === base ? {
|
|
1980
1969
|
isDecimal: !1,
|
|
1981
1970
|
ceil: 1024,
|
|
1982
1971
|
actualStandard: "iec"
|
|
@@ -1985,7 +1974,7 @@ function filesize(arg, { bits = !1, pad = !1, base = -1, round = 2, locale = "",
|
|
|
1985
1974
|
ceil: 1000,
|
|
1986
1975
|
actualStandard: JEDEC
|
|
1987
1976
|
}, full = !0 === fullform, neg = num < 0, roundingFunc = Math[roundingMethod];
|
|
1988
|
-
if ("
|
|
1977
|
+
if (roundingMethod !== ROUND && "floor" !== roundingMethod && "ceil" !== roundingMethod) throw TypeError("Invalid rounding method");
|
|
1989
1978
|
if (neg && (num = -num), 0 === num) return function(precision, actualStandard, bits, symbols, full, fullforms, output, spacer, pad, round, symbol, locale = "", localeOptions = {}, separator = "") {
|
|
1990
1979
|
let value;
|
|
1991
1980
|
return (value = precision > 0 ? 0..toPrecision(precision) : pad && round > 0 ? 0..toFixed(round) : 0, output === EXPONENT) ? 0 : (value = applyNumberFormatting(precision <= 0 && (!0 === locale || locale.length > 0) ? 0 : value, locale, localeOptions, separator, pad && precision <= 0, round, Math.round), symbol || (symbol = bits ? STRINGS_symbol[actualStandard].bits[0] : STRINGS_symbol[actualStandard].bytes[0]), symbols[symbol] && (symbol = symbols[symbol]), full && (fullforms[0] ? symbol = fullforms[0] : (symbol = STRINGS_fullform[actualStandard][0], bits ? symbol += "bit" : symbol += BYTE)), output === ARRAY) ? [
|
|
@@ -2031,7 +2020,10 @@ function filesize(arg, { bits = !1, pad = !1, base = -1, round = 2, locale = "",
|
|
|
2031
2020
|
e
|
|
2032
2021
|
};
|
|
2033
2022
|
}(bigNum, e, isDecimal, bits, ceil, autoExponent) : calculateOptimizedValue(num, e, isDecimal, bits, ceil, autoExponent)).result, e = valueResult.e;
|
|
2034
|
-
let rounded =
|
|
2023
|
+
let rounded = precisionAdjusted > 0 && e > 0 ? {
|
|
2024
|
+
value: val,
|
|
2025
|
+
e
|
|
2026
|
+
} : (val1 = val, (r = 1 === (p = (e2 = e) > 0 && round > 0 ? Math.pow(10, round) : 1) ? roundingFunc(val1) : roundingFunc(val1 * p) / p) === ceil && e2 < 8 && autoExponent && (r = 1, e2++), {
|
|
2035
2027
|
value: r,
|
|
2036
2028
|
e: e2
|
|
2037
2029
|
});
|
|
@@ -2052,7 +2044,7 @@ function filesize(arg, { bits = !1, pad = !1, base = -1, round = 2, locale = "",
|
|
|
2052
2044
|
}
|
|
2053
2045
|
if (output === EXPONENT) return e;
|
|
2054
2046
|
e3 = e, symbolTable = STRINGS_symbol[actualStandard][bits ? "bits" : "bytes"], u = isDecimal && 1 === e3 ? bits ? "kbit" : "kB" : symbolTable[e3], result[1] = u;
|
|
2055
|
-
var num1, e1, precision1, val1, e2, e3, e4 = e;
|
|
2047
|
+
var standard1, num1, e1, precision1, val1, e2, e3, e4 = e;
|
|
2056
2048
|
if (neg && ("string" == typeof result[0] ? result[0] = `-${result[0]}` : 0 === result[0] ? result[0] = "-0" : result[0] = -result[0]), symbols[result[1]] && (result[1] = symbols[result[1]]), numericValue = "string" == typeof result[0] ? parseFloat(result[0]) : result[0], result[0] = applyNumberFormatting(result[0], locale, localeOptions, separator, pad, round, roundingFunc), full) {
|
|
2057
2049
|
let unit, suffix;
|
|
2058
2050
|
unit = bits ? "bit" : BYTE, suffix = 1 === Math.abs(numericValue) ? "" : "s", fullforms[e4] ? result[1] = fullforms[e4] : result[1] = STRINGS_fullform[actualStandard][e4] + unit + suffix;
|
|
@@ -2066,7 +2058,8 @@ function filesize(arg, { bits = !1, pad = !1, base = -1, round = 2, locale = "",
|
|
|
2066
2058
|
unit: u1
|
|
2067
2059
|
} : " " === spacer ? `${result[0]} ${result[1]}` : result.join(spacer);
|
|
2068
2060
|
}
|
|
2069
|
-
|
|
2061
|
+
let lib = rspackRequire("../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/index.js");
|
|
2062
|
+
var lib_default = compatGetDefaultExport(lib);
|
|
2070
2063
|
let loader_filename = fileURLToPath(import.meta.url), loader_dirname = node_path.dirname(loader_filename), loader_require = createRequire(import.meta.url), PATH_QUERY_FRAGMENT_REGEXP = /^((?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/;
|
|
2071
2064
|
function parsePathQueryFragment(str) {
|
|
2072
2065
|
let match = PATH_QUERY_FRAGMENT_REGEXP.exec(str);
|
|
@@ -2443,60 +2436,3070 @@ let asserts = {
|
|
|
2443
2436
|
isRegExpLiteral: (node)=>asserts.isLiteral(node) && 'regex' in node,
|
|
2444
2437
|
isBigIntLiteral: (node)=>asserts.isLiteral(node) && 'bigint' in node,
|
|
2445
2438
|
isExportStatement: (node)=>asserts.isExportAllDeclaration(node) || asserts.isExportDefaultDeclaration(node) || asserts.isExportNamedDeclaration(node)
|
|
2446
|
-
}
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
}
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
if (node)
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2439
|
+
}, childVisitors = {
|
|
2440
|
+
AccessorProperty (node, walker) {
|
|
2441
|
+
let child0 = node.decorators;
|
|
2442
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
|
|
2443
|
+
let child1 = node.key;
|
|
2444
|
+
if (null != child1 && walker.visitScalar(child1, node, "key")) return !0;
|
|
2445
|
+
let child2 = node.typeAnnotation;
|
|
2446
|
+
if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return !0;
|
|
2447
|
+
let child3 = node.value;
|
|
2448
|
+
return !!(null != child3 && walker.visitScalar(child3, node, "value"));
|
|
2449
|
+
},
|
|
2450
|
+
ArrayExpression (node, walker) {
|
|
2451
|
+
let child0 = node.elements;
|
|
2452
|
+
return !!(null != child0 && walker.visitList(child0, node, "elements"));
|
|
2453
|
+
},
|
|
2454
|
+
ArrayPattern (node, walker) {
|
|
2455
|
+
let child0 = node.decorators;
|
|
2456
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
|
|
2457
|
+
let child1 = node.elements;
|
|
2458
|
+
if (null != child1 && walker.visitList(child1, node, "elements")) return !0;
|
|
2459
|
+
let child2 = node.typeAnnotation;
|
|
2460
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "typeAnnotation"));
|
|
2461
|
+
},
|
|
2462
|
+
ArrowFunctionExpression (node, walker) {
|
|
2463
|
+
let child0 = node.typeParameters;
|
|
2464
|
+
if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return !0;
|
|
2465
|
+
let child1 = node.params;
|
|
2466
|
+
if (null != child1 && walker.visitList(child1, node, "params")) return !0;
|
|
2467
|
+
let child2 = node.returnType;
|
|
2468
|
+
if (null != child2 && walker.visitScalar(child2, node, "returnType")) return !0;
|
|
2469
|
+
let child3 = node.body;
|
|
2470
|
+
return !!(null != child3 && walker.visitScalar(child3, node, "body"));
|
|
2471
|
+
},
|
|
2472
|
+
AssignmentExpression (node, walker) {
|
|
2473
|
+
let child0 = node.left;
|
|
2474
|
+
if (null != child0 && walker.visitScalar(child0, node, "left")) return !0;
|
|
2475
|
+
let child1 = node.right;
|
|
2476
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "right"));
|
|
2477
|
+
},
|
|
2478
|
+
AssignmentPattern (node, walker) {
|
|
2479
|
+
let child0 = node.decorators;
|
|
2480
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
|
|
2481
|
+
let child1 = node.left;
|
|
2482
|
+
if (null != child1 && walker.visitScalar(child1, node, "left")) return !0;
|
|
2483
|
+
let child2 = node.typeAnnotation;
|
|
2484
|
+
if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return !0;
|
|
2485
|
+
let child3 = node.right;
|
|
2486
|
+
return !!(null != child3 && walker.visitScalar(child3, node, "right"));
|
|
2487
|
+
},
|
|
2488
|
+
AwaitExpression (node, walker) {
|
|
2489
|
+
let child0 = node.argument;
|
|
2490
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "argument"));
|
|
2491
|
+
},
|
|
2492
|
+
BinaryExpression (node, walker) {
|
|
2493
|
+
let child0 = node.left;
|
|
2494
|
+
if (null != child0 && walker.visitScalar(child0, node, "left")) return !0;
|
|
2495
|
+
let child1 = node.right;
|
|
2496
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "right"));
|
|
2497
|
+
},
|
|
2498
|
+
BlockStatement (node, walker) {
|
|
2499
|
+
let child0 = node.body;
|
|
2500
|
+
return !!(null != child0 && walker.visitList(child0, node, "body"));
|
|
2501
|
+
},
|
|
2502
|
+
BreakStatement (node, walker) {
|
|
2503
|
+
let child0 = node.label;
|
|
2504
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "label"));
|
|
2505
|
+
},
|
|
2506
|
+
CallExpression (node, walker) {
|
|
2507
|
+
let child0 = node.callee;
|
|
2508
|
+
if (null != child0 && walker.visitScalar(child0, node, "callee")) return !0;
|
|
2509
|
+
let child1 = node.typeArguments;
|
|
2510
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeArguments")) return !0;
|
|
2511
|
+
let child2 = node.arguments;
|
|
2512
|
+
return !!(null != child2 && walker.visitList(child2, node, "arguments"));
|
|
2513
|
+
},
|
|
2514
|
+
CatchClause (node, walker) {
|
|
2515
|
+
let child0 = node.param;
|
|
2516
|
+
if (null != child0 && walker.visitScalar(child0, node, "param")) return !0;
|
|
2517
|
+
let child1 = node.body;
|
|
2518
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "body"));
|
|
2519
|
+
},
|
|
2520
|
+
ChainExpression (node, walker) {
|
|
2521
|
+
let child0 = node.expression;
|
|
2522
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "expression"));
|
|
2523
|
+
},
|
|
2524
|
+
ClassBody (node, walker) {
|
|
2525
|
+
let child0 = node.body;
|
|
2526
|
+
return !!(null != child0 && walker.visitList(child0, node, "body"));
|
|
2527
|
+
},
|
|
2528
|
+
ClassDeclaration (node, walker) {
|
|
2529
|
+
let child0 = node.decorators;
|
|
2530
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
|
|
2531
|
+
let child1 = node.id;
|
|
2532
|
+
if (null != child1 && walker.visitScalar(child1, node, "id")) return !0;
|
|
2533
|
+
let child2 = node.typeParameters;
|
|
2534
|
+
if (null != child2 && walker.visitScalar(child2, node, "typeParameters")) return !0;
|
|
2535
|
+
let child3 = node.superClass;
|
|
2536
|
+
if (null != child3 && walker.visitScalar(child3, node, "superClass")) return !0;
|
|
2537
|
+
let child4 = node.superTypeArguments;
|
|
2538
|
+
if (null != child4 && walker.visitScalar(child4, node, "superTypeArguments")) return !0;
|
|
2539
|
+
let child5 = node.implements;
|
|
2540
|
+
if (null != child5 && walker.visitList(child5, node, "implements")) return !0;
|
|
2541
|
+
let child6 = node.body;
|
|
2542
|
+
return !!(null != child6 && walker.visitScalar(child6, node, "body"));
|
|
2543
|
+
},
|
|
2544
|
+
ClassExpression (node, walker) {
|
|
2545
|
+
let child0 = node.decorators;
|
|
2546
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
|
|
2547
|
+
let child1 = node.id;
|
|
2548
|
+
if (null != child1 && walker.visitScalar(child1, node, "id")) return !0;
|
|
2549
|
+
let child2 = node.typeParameters;
|
|
2550
|
+
if (null != child2 && walker.visitScalar(child2, node, "typeParameters")) return !0;
|
|
2551
|
+
let child3 = node.superClass;
|
|
2552
|
+
if (null != child3 && walker.visitScalar(child3, node, "superClass")) return !0;
|
|
2553
|
+
let child4 = node.superTypeArguments;
|
|
2554
|
+
if (null != child4 && walker.visitScalar(child4, node, "superTypeArguments")) return !0;
|
|
2555
|
+
let child5 = node.implements;
|
|
2556
|
+
if (null != child5 && walker.visitList(child5, node, "implements")) return !0;
|
|
2557
|
+
let child6 = node.body;
|
|
2558
|
+
return !!(null != child6 && walker.visitScalar(child6, node, "body"));
|
|
2559
|
+
},
|
|
2560
|
+
ConditionalExpression (node, walker) {
|
|
2561
|
+
let child0 = node.test;
|
|
2562
|
+
if (null != child0 && walker.visitScalar(child0, node, "test")) return !0;
|
|
2563
|
+
let child1 = node.consequent;
|
|
2564
|
+
if (null != child1 && walker.visitScalar(child1, node, "consequent")) return !0;
|
|
2565
|
+
let child2 = node.alternate;
|
|
2566
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "alternate"));
|
|
2567
|
+
},
|
|
2568
|
+
ContinueStatement (node, walker) {
|
|
2569
|
+
let child0 = node.label;
|
|
2570
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "label"));
|
|
2571
|
+
},
|
|
2572
|
+
DebuggerStatement: null,
|
|
2573
|
+
Decorator (node, walker) {
|
|
2574
|
+
let child0 = node.expression;
|
|
2575
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "expression"));
|
|
2576
|
+
},
|
|
2577
|
+
DoWhileStatement (node, walker) {
|
|
2578
|
+
let child0 = node.body;
|
|
2579
|
+
if (null != child0 && walker.visitScalar(child0, node, "body")) return !0;
|
|
2580
|
+
let child1 = node.test;
|
|
2581
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "test"));
|
|
2582
|
+
},
|
|
2583
|
+
EmptyStatement: null,
|
|
2584
|
+
ExportAllDeclaration (node, walker) {
|
|
2585
|
+
let child0 = node.exported;
|
|
2586
|
+
if (null != child0 && walker.visitScalar(child0, node, "exported")) return !0;
|
|
2587
|
+
let child1 = node.source;
|
|
2588
|
+
if (null != child1 && walker.visitScalar(child1, node, "source")) return !0;
|
|
2589
|
+
let child2 = node.attributes;
|
|
2590
|
+
return !!(null != child2 && walker.visitListKnown(child2, node, "attributes", dispatchImportAttribute));
|
|
2591
|
+
},
|
|
2592
|
+
ExportDefaultDeclaration (node, walker) {
|
|
2593
|
+
let child0 = node.declaration;
|
|
2594
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "declaration"));
|
|
2595
|
+
},
|
|
2596
|
+
ExportNamedDeclaration (node, walker) {
|
|
2597
|
+
let child0 = node.declaration;
|
|
2598
|
+
if (null != child0 && walker.visitScalar(child0, node, "declaration")) return !0;
|
|
2599
|
+
let child1 = node.specifiers;
|
|
2600
|
+
if (null != child1 && walker.visitListKnown(child1, node, "specifiers", dispatchExportSpecifier)) return !0;
|
|
2601
|
+
let child2 = node.source;
|
|
2602
|
+
if (null != child2 && walker.visitScalar(child2, node, "source")) return !0;
|
|
2603
|
+
let child3 = node.attributes;
|
|
2604
|
+
return !!(null != child3 && walker.visitListKnown(child3, node, "attributes", dispatchImportAttribute));
|
|
2605
|
+
},
|
|
2606
|
+
ExportSpecifier (node, walker) {
|
|
2607
|
+
let child0 = node.local;
|
|
2608
|
+
if (null != child0 && walker.visitScalar(child0, node, "local")) return !0;
|
|
2609
|
+
let child1 = node.exported;
|
|
2610
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "exported"));
|
|
2611
|
+
},
|
|
2612
|
+
ExpressionStatement (node, walker) {
|
|
2613
|
+
let child0 = node.expression;
|
|
2614
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "expression"));
|
|
2615
|
+
},
|
|
2616
|
+
ForInStatement (node, walker) {
|
|
2617
|
+
let child0 = node.left;
|
|
2618
|
+
if (null != child0 && walker.visitScalar(child0, node, "left")) return !0;
|
|
2619
|
+
let child1 = node.right;
|
|
2620
|
+
if (null != child1 && walker.visitScalar(child1, node, "right")) return !0;
|
|
2621
|
+
let child2 = node.body;
|
|
2622
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "body"));
|
|
2623
|
+
},
|
|
2624
|
+
ForOfStatement (node, walker) {
|
|
2625
|
+
let child0 = node.left;
|
|
2626
|
+
if (null != child0 && walker.visitScalar(child0, node, "left")) return !0;
|
|
2627
|
+
let child1 = node.right;
|
|
2628
|
+
if (null != child1 && walker.visitScalar(child1, node, "right")) return !0;
|
|
2629
|
+
let child2 = node.body;
|
|
2630
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "body"));
|
|
2631
|
+
},
|
|
2632
|
+
ForStatement (node, walker) {
|
|
2633
|
+
let child0 = node.init;
|
|
2634
|
+
if (null != child0 && walker.visitScalar(child0, node, "init")) return !0;
|
|
2635
|
+
let child1 = node.test;
|
|
2636
|
+
if (null != child1 && walker.visitScalar(child1, node, "test")) return !0;
|
|
2637
|
+
let child2 = node.update;
|
|
2638
|
+
if (null != child2 && walker.visitScalar(child2, node, "update")) return !0;
|
|
2639
|
+
let child3 = node.body;
|
|
2640
|
+
return !!(null != child3 && walker.visitScalar(child3, node, "body"));
|
|
2641
|
+
},
|
|
2642
|
+
FunctionDeclaration (node, walker) {
|
|
2643
|
+
let child0 = node.id;
|
|
2644
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
|
|
2645
|
+
let child1 = node.typeParameters;
|
|
2646
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return !0;
|
|
2647
|
+
let child2 = node.params;
|
|
2648
|
+
if (null != child2 && walker.visitList(child2, node, "params")) return !0;
|
|
2649
|
+
let child3 = node.returnType;
|
|
2650
|
+
if (null != child3 && walker.visitScalar(child3, node, "returnType")) return !0;
|
|
2651
|
+
let child4 = node.body;
|
|
2652
|
+
return !!(null != child4 && walker.visitScalar(child4, node, "body"));
|
|
2653
|
+
},
|
|
2654
|
+
FunctionExpression (node, walker) {
|
|
2655
|
+
let child0 = node.id;
|
|
2656
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
|
|
2657
|
+
let child1 = node.typeParameters;
|
|
2658
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return !0;
|
|
2659
|
+
let child2 = node.params;
|
|
2660
|
+
if (null != child2 && walker.visitList(child2, node, "params")) return !0;
|
|
2661
|
+
let child3 = node.returnType;
|
|
2662
|
+
if (null != child3 && walker.visitScalar(child3, node, "returnType")) return !0;
|
|
2663
|
+
let child4 = node.body;
|
|
2664
|
+
return !!(null != child4 && walker.visitScalar(child4, node, "body"));
|
|
2665
|
+
},
|
|
2666
|
+
Hashbang: null,
|
|
2667
|
+
Identifier (node, walker) {
|
|
2668
|
+
let child0 = node.decorators;
|
|
2669
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
|
|
2670
|
+
let child1 = node.typeAnnotation;
|
|
2671
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "typeAnnotation"));
|
|
2672
|
+
},
|
|
2673
|
+
IfStatement (node, walker) {
|
|
2674
|
+
let child0 = node.test;
|
|
2675
|
+
if (null != child0 && walker.visitScalar(child0, node, "test")) return !0;
|
|
2676
|
+
let child1 = node.consequent;
|
|
2677
|
+
if (null != child1 && walker.visitScalar(child1, node, "consequent")) return !0;
|
|
2678
|
+
let child2 = node.alternate;
|
|
2679
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "alternate"));
|
|
2680
|
+
},
|
|
2681
|
+
ImportAttribute (node, walker) {
|
|
2682
|
+
let child0 = node.key;
|
|
2683
|
+
if (null != child0 && walker.visitScalar(child0, node, "key")) return !0;
|
|
2684
|
+
let child1 = node.value;
|
|
2685
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "value"));
|
|
2686
|
+
},
|
|
2687
|
+
ImportDeclaration (node, walker) {
|
|
2688
|
+
let child0 = node.specifiers;
|
|
2689
|
+
if (null != child0 && walker.visitList(child0, node, "specifiers")) return !0;
|
|
2690
|
+
let child1 = node.source;
|
|
2691
|
+
if (null != child1 && walker.visitScalar(child1, node, "source")) return !0;
|
|
2692
|
+
let child2 = node.attributes;
|
|
2693
|
+
return !!(null != child2 && walker.visitListKnown(child2, node, "attributes", dispatchImportAttribute));
|
|
2694
|
+
},
|
|
2695
|
+
ImportDefaultSpecifier (node, walker) {
|
|
2696
|
+
let child0 = node.local;
|
|
2697
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "local"));
|
|
2698
|
+
},
|
|
2699
|
+
ImportExpression (node, walker) {
|
|
2700
|
+
let child0 = node.source;
|
|
2701
|
+
if (null != child0 && walker.visitScalar(child0, node, "source")) return !0;
|
|
2702
|
+
let child1 = node.options;
|
|
2703
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "options"));
|
|
2704
|
+
},
|
|
2705
|
+
ImportNamespaceSpecifier (node, walker) {
|
|
2706
|
+
let child0 = node.local;
|
|
2707
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "local"));
|
|
2708
|
+
},
|
|
2709
|
+
ImportSpecifier (node, walker) {
|
|
2710
|
+
let child0 = node.imported;
|
|
2711
|
+
if (null != child0 && walker.visitScalar(child0, node, "imported")) return !0;
|
|
2712
|
+
let child1 = node.local;
|
|
2713
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "local"));
|
|
2714
|
+
},
|
|
2715
|
+
JSXAttribute (node, walker) {
|
|
2716
|
+
let child0 = node.name;
|
|
2717
|
+
if (null != child0 && walker.visitScalar(child0, node, "name")) return !0;
|
|
2718
|
+
let child1 = node.value;
|
|
2719
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "value"));
|
|
2720
|
+
},
|
|
2721
|
+
JSXClosingElement (node, walker) {
|
|
2722
|
+
let child0 = node.name;
|
|
2723
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "name"));
|
|
2724
|
+
},
|
|
2725
|
+
JSXClosingFragment: null,
|
|
2726
|
+
JSXElement (node, walker) {
|
|
2727
|
+
let child0 = node.openingElement;
|
|
2728
|
+
if (null != child0 && walker.visitScalar(child0, node, "openingElement")) return !0;
|
|
2729
|
+
let child1 = node.children;
|
|
2730
|
+
if (null != child1 && walker.visitList(child1, node, "children")) return !0;
|
|
2731
|
+
let child2 = node.closingElement;
|
|
2732
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "closingElement"));
|
|
2733
|
+
},
|
|
2734
|
+
JSXEmptyExpression: null,
|
|
2735
|
+
JSXExpressionContainer (node, walker) {
|
|
2736
|
+
let child0 = node.expression;
|
|
2737
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "expression"));
|
|
2738
|
+
},
|
|
2739
|
+
JSXFragment (node, walker) {
|
|
2740
|
+
let child0 = node.openingFragment;
|
|
2741
|
+
if (null != child0 && walker.visitScalar(child0, node, "openingFragment")) return !0;
|
|
2742
|
+
let child1 = node.children;
|
|
2743
|
+
if (null != child1 && walker.visitList(child1, node, "children")) return !0;
|
|
2744
|
+
let child2 = node.closingFragment;
|
|
2745
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "closingFragment"));
|
|
2746
|
+
},
|
|
2747
|
+
JSXIdentifier: null,
|
|
2748
|
+
JSXMemberExpression (node, walker) {
|
|
2749
|
+
let child0 = node.object;
|
|
2750
|
+
if (null != child0 && walker.visitScalar(child0, node, "object")) return !0;
|
|
2751
|
+
let child1 = node.property;
|
|
2752
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "property"));
|
|
2753
|
+
},
|
|
2754
|
+
JSXNamespacedName (node, walker) {
|
|
2755
|
+
let child0 = node.namespace;
|
|
2756
|
+
if (null != child0 && walker.visitScalar(child0, node, "namespace")) return !0;
|
|
2757
|
+
let child1 = node.name;
|
|
2758
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "name"));
|
|
2759
|
+
},
|
|
2760
|
+
JSXOpeningElement (node, walker) {
|
|
2761
|
+
let child0 = node.name;
|
|
2762
|
+
if (null != child0 && walker.visitScalar(child0, node, "name")) return !0;
|
|
2763
|
+
let child1 = node.typeArguments;
|
|
2764
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeArguments")) return !0;
|
|
2765
|
+
let child2 = node.attributes;
|
|
2766
|
+
return !!(null != child2 && walker.visitList(child2, node, "attributes"));
|
|
2767
|
+
},
|
|
2768
|
+
JSXOpeningFragment: null,
|
|
2769
|
+
JSXSpreadAttribute (node, walker) {
|
|
2770
|
+
let child0 = node.argument;
|
|
2771
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "argument"));
|
|
2772
|
+
},
|
|
2773
|
+
JSXSpreadChild (node, walker) {
|
|
2774
|
+
let child0 = node.expression;
|
|
2775
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "expression"));
|
|
2776
|
+
},
|
|
2777
|
+
JSXText: null,
|
|
2778
|
+
LabeledStatement (node, walker) {
|
|
2779
|
+
let child0 = node.label;
|
|
2780
|
+
if (null != child0 && walker.visitScalar(child0, node, "label")) return !0;
|
|
2781
|
+
let child1 = node.body;
|
|
2782
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "body"));
|
|
2783
|
+
},
|
|
2784
|
+
Literal: null,
|
|
2785
|
+
LogicalExpression (node, walker) {
|
|
2786
|
+
let child0 = node.left;
|
|
2787
|
+
if (null != child0 && walker.visitScalar(child0, node, "left")) return !0;
|
|
2788
|
+
let child1 = node.right;
|
|
2789
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "right"));
|
|
2790
|
+
},
|
|
2791
|
+
MemberExpression (node, walker) {
|
|
2792
|
+
let child0 = node.object;
|
|
2793
|
+
if (null != child0 && walker.visitScalar(child0, node, "object")) return !0;
|
|
2794
|
+
let child1 = node.property;
|
|
2795
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "property"));
|
|
2796
|
+
},
|
|
2797
|
+
MetaProperty (node, walker) {
|
|
2798
|
+
let child0 = node.meta;
|
|
2799
|
+
if (null != child0 && walker.visitScalar(child0, node, "meta")) return !0;
|
|
2800
|
+
let child1 = node.property;
|
|
2801
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "property"));
|
|
2802
|
+
},
|
|
2803
|
+
MethodDefinition (node, walker) {
|
|
2804
|
+
let child0 = node.decorators;
|
|
2805
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
|
|
2806
|
+
let child1 = node.key;
|
|
2807
|
+
if (null != child1 && walker.visitScalar(child1, node, "key")) return !0;
|
|
2808
|
+
let child2 = node.value;
|
|
2809
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "value"));
|
|
2810
|
+
},
|
|
2811
|
+
NewExpression (node, walker) {
|
|
2812
|
+
let child0 = node.callee;
|
|
2813
|
+
if (null != child0 && walker.visitScalar(child0, node, "callee")) return !0;
|
|
2814
|
+
let child1 = node.typeArguments;
|
|
2815
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeArguments")) return !0;
|
|
2816
|
+
let child2 = node.arguments;
|
|
2817
|
+
return !!(null != child2 && walker.visitList(child2, node, "arguments"));
|
|
2818
|
+
},
|
|
2819
|
+
ObjectExpression (node, walker) {
|
|
2820
|
+
let child0 = node.properties;
|
|
2821
|
+
return !!(null != child0 && walker.visitList(child0, node, "properties"));
|
|
2822
|
+
},
|
|
2823
|
+
ObjectPattern (node, walker) {
|
|
2824
|
+
let child0 = node.decorators;
|
|
2825
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
|
|
2826
|
+
let child1 = node.properties;
|
|
2827
|
+
if (null != child1 && walker.visitList(child1, node, "properties")) return !0;
|
|
2828
|
+
let child2 = node.typeAnnotation;
|
|
2829
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "typeAnnotation"));
|
|
2830
|
+
},
|
|
2831
|
+
ParenthesizedExpression (node, walker) {
|
|
2832
|
+
let child0 = node.expression;
|
|
2833
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "expression"));
|
|
2834
|
+
},
|
|
2835
|
+
PrivateIdentifier: null,
|
|
2836
|
+
Program (node, walker) {
|
|
2837
|
+
let child0 = node.hashbang;
|
|
2838
|
+
if (null != child0 && walker.visitScalar(child0, node, "hashbang")) return !0;
|
|
2839
|
+
let child1 = node.body;
|
|
2840
|
+
return !!(null != child1 && walker.visitList(child1, node, "body"));
|
|
2841
|
+
},
|
|
2842
|
+
Property (node, walker) {
|
|
2843
|
+
let child0 = node.key;
|
|
2844
|
+
if (null != child0 && walker.visitScalar(child0, node, "key")) return !0;
|
|
2845
|
+
let child1 = node.value;
|
|
2846
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "value"));
|
|
2847
|
+
},
|
|
2848
|
+
PropertyDefinition (node, walker) {
|
|
2849
|
+
let child0 = node.decorators;
|
|
2850
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
|
|
2851
|
+
let child1 = node.key;
|
|
2852
|
+
if (null != child1 && walker.visitScalar(child1, node, "key")) return !0;
|
|
2853
|
+
let child2 = node.typeAnnotation;
|
|
2854
|
+
if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return !0;
|
|
2855
|
+
let child3 = node.value;
|
|
2856
|
+
return !!(null != child3 && walker.visitScalar(child3, node, "value"));
|
|
2857
|
+
},
|
|
2858
|
+
RestElement (node, walker) {
|
|
2859
|
+
let child0 = node.decorators;
|
|
2860
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
|
|
2861
|
+
let child1 = node.argument;
|
|
2862
|
+
if (null != child1 && walker.visitScalar(child1, node, "argument")) return !0;
|
|
2863
|
+
let child2 = node.typeAnnotation;
|
|
2864
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "typeAnnotation"));
|
|
2865
|
+
},
|
|
2866
|
+
ReturnStatement (node, walker) {
|
|
2867
|
+
let child0 = node.argument;
|
|
2868
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "argument"));
|
|
2869
|
+
},
|
|
2870
|
+
SequenceExpression (node, walker) {
|
|
2871
|
+
let child0 = node.expressions;
|
|
2872
|
+
return !!(null != child0 && walker.visitList(child0, node, "expressions"));
|
|
2873
|
+
},
|
|
2874
|
+
SpreadElement (node, walker) {
|
|
2875
|
+
let child0 = node.argument;
|
|
2876
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "argument"));
|
|
2877
|
+
},
|
|
2878
|
+
StaticBlock (node, walker) {
|
|
2879
|
+
let child0 = node.body;
|
|
2880
|
+
return !!(null != child0 && walker.visitList(child0, node, "body"));
|
|
2881
|
+
},
|
|
2882
|
+
Super: null,
|
|
2883
|
+
SwitchCase (node, walker) {
|
|
2884
|
+
let child0 = node.test;
|
|
2885
|
+
if (null != child0 && walker.visitScalar(child0, node, "test")) return !0;
|
|
2886
|
+
let child1 = node.consequent;
|
|
2887
|
+
return !!(null != child1 && walker.visitList(child1, node, "consequent"));
|
|
2888
|
+
},
|
|
2889
|
+
SwitchStatement (node, walker) {
|
|
2890
|
+
let child0 = node.discriminant;
|
|
2891
|
+
if (null != child0 && walker.visitScalar(child0, node, "discriminant")) return !0;
|
|
2892
|
+
let child1 = node.cases;
|
|
2893
|
+
return !!(null != child1 && walker.visitListKnown(child1, node, "cases", dispatchSwitchCase));
|
|
2894
|
+
},
|
|
2895
|
+
TSAbstractAccessorProperty (node, walker) {
|
|
2896
|
+
let child0 = node.decorators;
|
|
2897
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
|
|
2898
|
+
let child1 = node.key;
|
|
2899
|
+
if (null != child1 && walker.visitScalar(child1, node, "key")) return !0;
|
|
2900
|
+
let child2 = node.typeAnnotation;
|
|
2901
|
+
if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return !0;
|
|
2902
|
+
let child3 = node.value;
|
|
2903
|
+
return !!(null != child3 && walker.visitScalar(child3, node, "value"));
|
|
2904
|
+
},
|
|
2905
|
+
TSAbstractMethodDefinition (node, walker) {
|
|
2906
|
+
let child0 = node.decorators;
|
|
2907
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
|
|
2908
|
+
let child1 = node.key;
|
|
2909
|
+
if (null != child1 && walker.visitScalar(child1, node, "key")) return !0;
|
|
2910
|
+
let child2 = node.value;
|
|
2911
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "value"));
|
|
2912
|
+
},
|
|
2913
|
+
TSAbstractPropertyDefinition (node, walker) {
|
|
2914
|
+
let child0 = node.decorators;
|
|
2915
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return !0;
|
|
2916
|
+
let child1 = node.key;
|
|
2917
|
+
if (null != child1 && walker.visitScalar(child1, node, "key")) return !0;
|
|
2918
|
+
let child2 = node.typeAnnotation;
|
|
2919
|
+
if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return !0;
|
|
2920
|
+
let child3 = node.value;
|
|
2921
|
+
return !!(null != child3 && walker.visitScalar(child3, node, "value"));
|
|
2922
|
+
},
|
|
2923
|
+
TSAnyKeyword: null,
|
|
2924
|
+
TSArrayType (node, walker) {
|
|
2925
|
+
let child0 = node.elementType;
|
|
2926
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "elementType"));
|
|
2927
|
+
},
|
|
2928
|
+
TSAsExpression (node, walker) {
|
|
2929
|
+
let child0 = node.expression;
|
|
2930
|
+
if (null != child0 && walker.visitScalar(child0, node, "expression")) return !0;
|
|
2931
|
+
let child1 = node.typeAnnotation;
|
|
2932
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "typeAnnotation"));
|
|
2933
|
+
},
|
|
2934
|
+
TSBigIntKeyword: null,
|
|
2935
|
+
TSBooleanKeyword: null,
|
|
2936
|
+
TSCallSignatureDeclaration (node, walker) {
|
|
2937
|
+
let child0 = node.typeParameters;
|
|
2938
|
+
if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return !0;
|
|
2939
|
+
let child1 = node.params;
|
|
2940
|
+
if (null != child1 && walker.visitList(child1, node, "params")) return !0;
|
|
2941
|
+
let child2 = node.returnType;
|
|
2942
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "returnType"));
|
|
2943
|
+
},
|
|
2944
|
+
TSClassImplements (node, walker) {
|
|
2945
|
+
let child0 = node.expression;
|
|
2946
|
+
if (null != child0 && walker.visitScalar(child0, node, "expression")) return !0;
|
|
2947
|
+
let child1 = node.typeArguments;
|
|
2948
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "typeArguments"));
|
|
2949
|
+
},
|
|
2950
|
+
TSConditionalType (node, walker) {
|
|
2951
|
+
let child0 = node.checkType;
|
|
2952
|
+
if (null != child0 && walker.visitScalar(child0, node, "checkType")) return !0;
|
|
2953
|
+
let child1 = node.extendsType;
|
|
2954
|
+
if (null != child1 && walker.visitScalar(child1, node, "extendsType")) return !0;
|
|
2955
|
+
let child2 = node.trueType;
|
|
2956
|
+
if (null != child2 && walker.visitScalar(child2, node, "trueType")) return !0;
|
|
2957
|
+
let child3 = node.falseType;
|
|
2958
|
+
return !!(null != child3 && walker.visitScalar(child3, node, "falseType"));
|
|
2959
|
+
},
|
|
2960
|
+
TSConstructSignatureDeclaration (node, walker) {
|
|
2961
|
+
let child0 = node.typeParameters;
|
|
2962
|
+
if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return !0;
|
|
2963
|
+
let child1 = node.params;
|
|
2964
|
+
if (null != child1 && walker.visitList(child1, node, "params")) return !0;
|
|
2965
|
+
let child2 = node.returnType;
|
|
2966
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "returnType"));
|
|
2967
|
+
},
|
|
2968
|
+
TSConstructorType (node, walker) {
|
|
2969
|
+
let child0 = node.typeParameters;
|
|
2970
|
+
if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return !0;
|
|
2971
|
+
let child1 = node.params;
|
|
2972
|
+
if (null != child1 && walker.visitList(child1, node, "params")) return !0;
|
|
2973
|
+
let child2 = node.returnType;
|
|
2974
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "returnType"));
|
|
2975
|
+
},
|
|
2976
|
+
TSDeclareFunction (node, walker) {
|
|
2977
|
+
let child0 = node.id;
|
|
2978
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
|
|
2979
|
+
let child1 = node.typeParameters;
|
|
2980
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return !0;
|
|
2981
|
+
let child2 = node.params;
|
|
2982
|
+
if (null != child2 && walker.visitList(child2, node, "params")) return !0;
|
|
2983
|
+
let child3 = node.returnType;
|
|
2984
|
+
if (null != child3 && walker.visitScalar(child3, node, "returnType")) return !0;
|
|
2985
|
+
let child4 = node.body;
|
|
2986
|
+
return !!(null != child4 && walker.visitScalar(child4, node, "body"));
|
|
2987
|
+
},
|
|
2988
|
+
TSEmptyBodyFunctionExpression (node, walker) {
|
|
2989
|
+
let child0 = node.id;
|
|
2990
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
|
|
2991
|
+
let child1 = node.typeParameters;
|
|
2992
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return !0;
|
|
2993
|
+
let child2 = node.params;
|
|
2994
|
+
if (null != child2 && walker.visitList(child2, node, "params")) return !0;
|
|
2995
|
+
let child3 = node.returnType;
|
|
2996
|
+
if (null != child3 && walker.visitScalar(child3, node, "returnType")) return !0;
|
|
2997
|
+
let child4 = node.body;
|
|
2998
|
+
return !!(null != child4 && walker.visitScalar(child4, node, "body"));
|
|
2999
|
+
},
|
|
3000
|
+
TSEnumBody (node, walker) {
|
|
3001
|
+
let child0 = node.members;
|
|
3002
|
+
return !!(null != child0 && walker.visitListKnown(child0, node, "members", dispatchTSEnumMember));
|
|
3003
|
+
},
|
|
3004
|
+
TSEnumDeclaration (node, walker) {
|
|
3005
|
+
let child0 = node.id;
|
|
3006
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
|
|
3007
|
+
let child1 = node.body;
|
|
3008
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "body"));
|
|
3009
|
+
},
|
|
3010
|
+
TSEnumMember (node, walker) {
|
|
3011
|
+
let child0 = node.id;
|
|
3012
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
|
|
3013
|
+
let child1 = node.initializer;
|
|
3014
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "initializer"));
|
|
3015
|
+
},
|
|
3016
|
+
TSExportAssignment (node, walker) {
|
|
3017
|
+
let child0 = node.expression;
|
|
3018
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "expression"));
|
|
3019
|
+
},
|
|
3020
|
+
TSExternalModuleReference (node, walker) {
|
|
3021
|
+
let child0 = node.expression;
|
|
3022
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "expression"));
|
|
3023
|
+
},
|
|
3024
|
+
TSFunctionType (node, walker) {
|
|
3025
|
+
let child0 = node.typeParameters;
|
|
3026
|
+
if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return !0;
|
|
3027
|
+
let child1 = node.params;
|
|
3028
|
+
if (null != child1 && walker.visitList(child1, node, "params")) return !0;
|
|
3029
|
+
let child2 = node.returnType;
|
|
3030
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "returnType"));
|
|
3031
|
+
},
|
|
3032
|
+
TSImportEqualsDeclaration (node, walker) {
|
|
3033
|
+
let child0 = node.id;
|
|
3034
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
|
|
3035
|
+
let child1 = node.moduleReference;
|
|
3036
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "moduleReference"));
|
|
3037
|
+
},
|
|
3038
|
+
TSImportType (node, walker) {
|
|
3039
|
+
let child0 = node.source;
|
|
3040
|
+
if (null != child0 && walker.visitScalar(child0, node, "source")) return !0;
|
|
3041
|
+
let child1 = node.options;
|
|
3042
|
+
if (null != child1 && walker.visitScalar(child1, node, "options")) return !0;
|
|
3043
|
+
let child2 = node.qualifier;
|
|
3044
|
+
if (null != child2 && walker.visitScalar(child2, node, "qualifier")) return !0;
|
|
3045
|
+
let child3 = node.typeArguments;
|
|
3046
|
+
return !!(null != child3 && walker.visitScalar(child3, node, "typeArguments"));
|
|
3047
|
+
},
|
|
3048
|
+
TSIndexSignature (node, walker) {
|
|
3049
|
+
let child0 = node.parameters;
|
|
3050
|
+
if (null != child0 && walker.visitList(child0, node, "parameters")) return !0;
|
|
3051
|
+
let child1 = node.typeAnnotation;
|
|
3052
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "typeAnnotation"));
|
|
3053
|
+
},
|
|
3054
|
+
TSIndexedAccessType (node, walker) {
|
|
3055
|
+
let child0 = node.objectType;
|
|
3056
|
+
if (null != child0 && walker.visitScalar(child0, node, "objectType")) return !0;
|
|
3057
|
+
let child1 = node.indexType;
|
|
3058
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "indexType"));
|
|
3059
|
+
},
|
|
3060
|
+
TSInferType (node, walker) {
|
|
3061
|
+
let child0 = node.typeParameter;
|
|
3062
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "typeParameter"));
|
|
3063
|
+
},
|
|
3064
|
+
TSInstantiationExpression (node, walker) {
|
|
3065
|
+
let child0 = node.expression;
|
|
3066
|
+
if (null != child0 && walker.visitScalar(child0, node, "expression")) return !0;
|
|
3067
|
+
let child1 = node.typeArguments;
|
|
3068
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "typeArguments"));
|
|
3069
|
+
},
|
|
3070
|
+
TSInterfaceBody (node, walker) {
|
|
3071
|
+
let child0 = node.body;
|
|
3072
|
+
return !!(null != child0 && walker.visitList(child0, node, "body"));
|
|
3073
|
+
},
|
|
3074
|
+
TSInterfaceDeclaration (node, walker) {
|
|
3075
|
+
let child0 = node.id;
|
|
3076
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
|
|
3077
|
+
let child1 = node.typeParameters;
|
|
3078
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return !0;
|
|
3079
|
+
let child2 = node.extends;
|
|
3080
|
+
if (null != child2 && walker.visitListKnown(child2, node, "extends", dispatchTSInterfaceHeritage)) return !0;
|
|
3081
|
+
let child3 = node.body;
|
|
3082
|
+
return !!(null != child3 && walker.visitScalar(child3, node, "body"));
|
|
3083
|
+
},
|
|
3084
|
+
TSInterfaceHeritage (node, walker) {
|
|
3085
|
+
let child0 = node.expression;
|
|
3086
|
+
if (null != child0 && walker.visitScalar(child0, node, "expression")) return !0;
|
|
3087
|
+
let child1 = node.typeArguments;
|
|
3088
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "typeArguments"));
|
|
3089
|
+
},
|
|
3090
|
+
TSIntersectionType (node, walker) {
|
|
3091
|
+
let child0 = node.types;
|
|
3092
|
+
return !!(null != child0 && walker.visitList(child0, node, "types"));
|
|
3093
|
+
},
|
|
3094
|
+
TSIntrinsicKeyword: null,
|
|
3095
|
+
TSJSDocNonNullableType (node, walker) {
|
|
3096
|
+
let child0 = node.typeAnnotation;
|
|
3097
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "typeAnnotation"));
|
|
3098
|
+
},
|
|
3099
|
+
TSJSDocNullableType (node, walker) {
|
|
3100
|
+
let child0 = node.typeAnnotation;
|
|
3101
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "typeAnnotation"));
|
|
3102
|
+
},
|
|
3103
|
+
TSJSDocUnknownType: null,
|
|
3104
|
+
TSLiteralType (node, walker) {
|
|
3105
|
+
let child0 = node.literal;
|
|
3106
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "literal"));
|
|
3107
|
+
},
|
|
3108
|
+
TSMappedType (node, walker) {
|
|
3109
|
+
let child0 = node.key;
|
|
3110
|
+
if (null != child0 && walker.visitScalar(child0, node, "key")) return !0;
|
|
3111
|
+
let child1 = node.constraint;
|
|
3112
|
+
if (null != child1 && walker.visitScalar(child1, node, "constraint")) return !0;
|
|
3113
|
+
let child2 = node.nameType;
|
|
3114
|
+
if (null != child2 && walker.visitScalar(child2, node, "nameType")) return !0;
|
|
3115
|
+
let child3 = node.typeAnnotation;
|
|
3116
|
+
return !!(null != child3 && walker.visitScalar(child3, node, "typeAnnotation"));
|
|
3117
|
+
},
|
|
3118
|
+
TSMethodSignature (node, walker) {
|
|
3119
|
+
let child0 = node.key;
|
|
3120
|
+
if (null != child0 && walker.visitScalar(child0, node, "key")) return !0;
|
|
3121
|
+
let child1 = node.typeParameters;
|
|
3122
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return !0;
|
|
3123
|
+
let child2 = node.params;
|
|
3124
|
+
if (null != child2 && walker.visitList(child2, node, "params")) return !0;
|
|
3125
|
+
let child3 = node.returnType;
|
|
3126
|
+
return !!(null != child3 && walker.visitScalar(child3, node, "returnType"));
|
|
3127
|
+
},
|
|
3128
|
+
TSModuleBlock (node, walker) {
|
|
3129
|
+
let child0 = node.body;
|
|
3130
|
+
return !!(null != child0 && walker.visitList(child0, node, "body"));
|
|
3131
|
+
},
|
|
3132
|
+
TSModuleDeclaration (node, walker) {
|
|
3133
|
+
let child0 = node.id;
|
|
3134
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
|
|
3135
|
+
let child1 = node.attributes;
|
|
3136
|
+
if (null != child1 && walker.visitScalar(child1, node, "attributes")) return !0;
|
|
3137
|
+
let child2 = node.body;
|
|
3138
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "body"));
|
|
3139
|
+
},
|
|
3140
|
+
TSNamedTupleMember (node, walker) {
|
|
3141
|
+
let child0 = node.label;
|
|
3142
|
+
if (null != child0 && walker.visitScalar(child0, node, "label")) return !0;
|
|
3143
|
+
let child1 = node.elementType;
|
|
3144
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "elementType"));
|
|
3145
|
+
},
|
|
3146
|
+
TSNamespaceExportDeclaration (node, walker) {
|
|
3147
|
+
let child0 = node.id;
|
|
3148
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "id"));
|
|
3149
|
+
},
|
|
3150
|
+
TSNeverKeyword: null,
|
|
3151
|
+
TSNonNullExpression (node, walker) {
|
|
3152
|
+
let child0 = node.expression;
|
|
3153
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "expression"));
|
|
3154
|
+
},
|
|
3155
|
+
TSNullKeyword: null,
|
|
3156
|
+
TSNumberKeyword: null,
|
|
3157
|
+
TSObjectKeyword: null,
|
|
3158
|
+
TSOptionalType (node, walker) {
|
|
3159
|
+
let child0 = node.typeAnnotation;
|
|
3160
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "typeAnnotation"));
|
|
3161
|
+
},
|
|
3162
|
+
TSParameterProperty (node, walker) {
|
|
3163
|
+
let child0 = node.decorators;
|
|
3164
|
+
if (null != child0 && walker.visitListKnown(child0, node, "decorators", dispatchDecorator)) return !0;
|
|
3165
|
+
let child1 = node.parameter;
|
|
3166
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "parameter"));
|
|
3167
|
+
},
|
|
3168
|
+
TSParenthesizedType (node, walker) {
|
|
3169
|
+
let child0 = node.typeAnnotation;
|
|
3170
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "typeAnnotation"));
|
|
3171
|
+
},
|
|
3172
|
+
TSPropertySignature (node, walker) {
|
|
3173
|
+
let child0 = node.key;
|
|
3174
|
+
if (null != child0 && walker.visitScalar(child0, node, "key")) return !0;
|
|
3175
|
+
let child1 = node.typeAnnotation;
|
|
3176
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "typeAnnotation"));
|
|
3177
|
+
},
|
|
3178
|
+
TSQualifiedName (node, walker) {
|
|
3179
|
+
let child0 = node.left;
|
|
3180
|
+
if (null != child0 && walker.visitScalar(child0, node, "left")) return !0;
|
|
3181
|
+
let child1 = node.right;
|
|
3182
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "right"));
|
|
3183
|
+
},
|
|
3184
|
+
TSRestType (node, walker) {
|
|
3185
|
+
let child0 = node.typeAnnotation;
|
|
3186
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "typeAnnotation"));
|
|
3187
|
+
},
|
|
3188
|
+
TSSatisfiesExpression (node, walker) {
|
|
3189
|
+
let child0 = node.expression;
|
|
3190
|
+
if (null != child0 && walker.visitScalar(child0, node, "expression")) return !0;
|
|
3191
|
+
let child1 = node.typeAnnotation;
|
|
3192
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "typeAnnotation"));
|
|
3193
|
+
},
|
|
3194
|
+
TSStringKeyword: null,
|
|
3195
|
+
TSSymbolKeyword: null,
|
|
3196
|
+
TSTemplateLiteralType (node, walker) {
|
|
3197
|
+
let child0 = node.quasis;
|
|
3198
|
+
if (null != child0 && walker.visitListKnown(child0, node, "quasis", dispatchTemplateElement)) return !0;
|
|
3199
|
+
let child1 = node.types;
|
|
3200
|
+
return !!(null != child1 && walker.visitList(child1, node, "types"));
|
|
3201
|
+
},
|
|
3202
|
+
TSThisType: null,
|
|
3203
|
+
TSTupleType (node, walker) {
|
|
3204
|
+
let child0 = node.elementTypes;
|
|
3205
|
+
return !!(null != child0 && walker.visitList(child0, node, "elementTypes"));
|
|
3206
|
+
},
|
|
3207
|
+
TSTypeAliasDeclaration (node, walker) {
|
|
3208
|
+
let child0 = node.id;
|
|
3209
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
|
|
3210
|
+
let child1 = node.typeParameters;
|
|
3211
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return !0;
|
|
3212
|
+
let child2 = node.typeAnnotation;
|
|
3213
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "typeAnnotation"));
|
|
3214
|
+
},
|
|
3215
|
+
TSTypeAnnotation (node, walker) {
|
|
3216
|
+
let child0 = node.typeAnnotation;
|
|
3217
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "typeAnnotation"));
|
|
3218
|
+
},
|
|
3219
|
+
TSTypeAssertion (node, walker) {
|
|
3220
|
+
let child0 = node.typeAnnotation;
|
|
3221
|
+
if (null != child0 && walker.visitScalar(child0, node, "typeAnnotation")) return !0;
|
|
3222
|
+
let child1 = node.expression;
|
|
3223
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "expression"));
|
|
3224
|
+
},
|
|
3225
|
+
TSTypeLiteral (node, walker) {
|
|
3226
|
+
let child0 = node.members;
|
|
3227
|
+
return !!(null != child0 && walker.visitList(child0, node, "members"));
|
|
3228
|
+
},
|
|
3229
|
+
TSTypeOperator (node, walker) {
|
|
3230
|
+
let child0 = node.typeAnnotation;
|
|
3231
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "typeAnnotation"));
|
|
3232
|
+
},
|
|
3233
|
+
TSTypeParameter (node, walker) {
|
|
3234
|
+
let child0 = node.name;
|
|
3235
|
+
if (null != child0 && walker.visitScalar(child0, node, "name")) return !0;
|
|
3236
|
+
let child1 = node.constraint;
|
|
3237
|
+
if (null != child1 && walker.visitScalar(child1, node, "constraint")) return !0;
|
|
3238
|
+
let child2 = node.default;
|
|
3239
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "default"));
|
|
3240
|
+
},
|
|
3241
|
+
TSTypeParameterDeclaration (node, walker) {
|
|
3242
|
+
let child0 = node.params;
|
|
3243
|
+
return !!(null != child0 && walker.visitListKnown(child0, node, "params", dispatchTSTypeParameter));
|
|
3244
|
+
},
|
|
3245
|
+
TSTypeParameterInstantiation (node, walker) {
|
|
3246
|
+
let child0 = node.params;
|
|
3247
|
+
return !!(null != child0 && walker.visitList(child0, node, "params"));
|
|
3248
|
+
},
|
|
3249
|
+
TSTypePredicate (node, walker) {
|
|
3250
|
+
let child0 = node.parameterName;
|
|
3251
|
+
if (null != child0 && walker.visitScalar(child0, node, "parameterName")) return !0;
|
|
3252
|
+
let child1 = node.typeAnnotation;
|
|
3253
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "typeAnnotation"));
|
|
3254
|
+
},
|
|
3255
|
+
TSTypeQuery (node, walker) {
|
|
3256
|
+
let child0 = node.exprName;
|
|
3257
|
+
if (null != child0 && walker.visitScalar(child0, node, "exprName")) return !0;
|
|
3258
|
+
let child1 = node.typeArguments;
|
|
3259
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "typeArguments"));
|
|
3260
|
+
},
|
|
3261
|
+
TSTypeReference (node, walker) {
|
|
3262
|
+
let child0 = node.typeName;
|
|
3263
|
+
if (null != child0 && walker.visitScalar(child0, node, "typeName")) return !0;
|
|
3264
|
+
let child1 = node.typeArguments;
|
|
3265
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "typeArguments"));
|
|
3266
|
+
},
|
|
3267
|
+
TSUndefinedKeyword: null,
|
|
3268
|
+
TSUnionType (node, walker) {
|
|
3269
|
+
let child0 = node.types;
|
|
3270
|
+
return !!(null != child0 && walker.visitList(child0, node, "types"));
|
|
3271
|
+
},
|
|
3272
|
+
TSUnknownKeyword: null,
|
|
3273
|
+
TSVoidKeyword: null,
|
|
3274
|
+
TaggedTemplateExpression (node, walker) {
|
|
3275
|
+
let child0 = node.tag;
|
|
3276
|
+
if (null != child0 && walker.visitScalar(child0, node, "tag")) return !0;
|
|
3277
|
+
let child1 = node.typeArguments;
|
|
3278
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeArguments")) return !0;
|
|
3279
|
+
let child2 = node.quasi;
|
|
3280
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "quasi"));
|
|
3281
|
+
},
|
|
3282
|
+
TemplateElement: null,
|
|
3283
|
+
TemplateLiteral (node, walker) {
|
|
3284
|
+
let child0 = node.quasis;
|
|
3285
|
+
if (null != child0 && walker.visitListKnown(child0, node, "quasis", dispatchTemplateElement)) return !0;
|
|
3286
|
+
let child1 = node.expressions;
|
|
3287
|
+
return !!(null != child1 && walker.visitList(child1, node, "expressions"));
|
|
3288
|
+
},
|
|
3289
|
+
ThisExpression: null,
|
|
3290
|
+
ThrowStatement (node, walker) {
|
|
3291
|
+
let child0 = node.argument;
|
|
3292
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "argument"));
|
|
3293
|
+
},
|
|
3294
|
+
TryStatement (node, walker) {
|
|
3295
|
+
let child0 = node.block;
|
|
3296
|
+
if (null != child0 && walker.visitScalar(child0, node, "block")) return !0;
|
|
3297
|
+
let child1 = node.handler;
|
|
3298
|
+
if (null != child1 && walker.visitScalar(child1, node, "handler")) return !0;
|
|
3299
|
+
let child2 = node.finalizer;
|
|
3300
|
+
return !!(null != child2 && walker.visitScalar(child2, node, "finalizer"));
|
|
3301
|
+
},
|
|
3302
|
+
UnaryExpression (node, walker) {
|
|
3303
|
+
let child0 = node.argument;
|
|
3304
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "argument"));
|
|
3305
|
+
},
|
|
3306
|
+
UpdateExpression (node, walker) {
|
|
3307
|
+
let child0 = node.argument;
|
|
3308
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "argument"));
|
|
3309
|
+
},
|
|
3310
|
+
VariableDeclaration (node, walker) {
|
|
3311
|
+
let child0 = node.declarations;
|
|
3312
|
+
return !!(null != child0 && walker.visitListKnown(child0, node, "declarations", dispatchVariableDeclarator));
|
|
3313
|
+
},
|
|
3314
|
+
VariableDeclarator (node, walker) {
|
|
3315
|
+
let child0 = node.id;
|
|
3316
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return !0;
|
|
3317
|
+
let child1 = node.init;
|
|
3318
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "init"));
|
|
3319
|
+
},
|
|
3320
|
+
WhileStatement (node, walker) {
|
|
3321
|
+
let child0 = node.test;
|
|
3322
|
+
if (null != child0 && walker.visitScalar(child0, node, "test")) return !0;
|
|
3323
|
+
let child1 = node.body;
|
|
3324
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "body"));
|
|
3325
|
+
},
|
|
3326
|
+
WithStatement (node, walker) {
|
|
3327
|
+
let child0 = node.object;
|
|
3328
|
+
if (null != child0 && walker.visitScalar(child0, node, "object")) return !0;
|
|
3329
|
+
let child1 = node.body;
|
|
3330
|
+
return !!(null != child1 && walker.visitScalar(child1, node, "body"));
|
|
3331
|
+
},
|
|
3332
|
+
YieldExpression (node, walker) {
|
|
3333
|
+
let child0 = node.argument;
|
|
3334
|
+
return !!(null != child0 && walker.visitScalar(child0, node, "argument"));
|
|
2496
3335
|
}
|
|
2497
|
-
}
|
|
2498
|
-
function
|
|
2499
|
-
|
|
3336
|
+
}, nodeWalkers = Object.assign(Object.create(null), {
|
|
3337
|
+
AccessorProperty: function(node, walker, parent, key, list, index) {
|
|
3338
|
+
let child0 = node.decorators;
|
|
3339
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
|
|
3340
|
+
let child1 = node.key;
|
|
3341
|
+
if (null != child1 && walker.visitScalar(child1, node, "key")) return index;
|
|
3342
|
+
let child2 = node.typeAnnotation;
|
|
3343
|
+
if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return index;
|
|
3344
|
+
let child3 = node.value;
|
|
3345
|
+
return null != child3 && walker.visitScalar(child3, node, "value") ? index : "AccessorProperty" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3346
|
+
},
|
|
3347
|
+
ArrayExpression: function(node, walker, parent, key, list, index) {
|
|
3348
|
+
let child0 = node.elements;
|
|
3349
|
+
return null != child0 && walker.visitList(child0, node, "elements") ? index : "ArrayExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3350
|
+
},
|
|
3351
|
+
ArrayPattern: function(node, walker, parent, key, list, index) {
|
|
3352
|
+
let child0 = node.decorators;
|
|
3353
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
|
|
3354
|
+
let child1 = node.elements;
|
|
3355
|
+
if (null != child1 && walker.visitList(child1, node, "elements")) return index;
|
|
3356
|
+
let child2 = node.typeAnnotation;
|
|
3357
|
+
return null != child2 && walker.visitScalar(child2, node, "typeAnnotation") ? index : "ArrayPattern" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3358
|
+
},
|
|
3359
|
+
ArrowFunctionExpression: function(node, walker, parent, key, list, index) {
|
|
3360
|
+
let child0 = node.typeParameters;
|
|
3361
|
+
if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return index;
|
|
3362
|
+
let child1 = node.params;
|
|
3363
|
+
if (null != child1 && walker.visitList(child1, node, "params")) return index;
|
|
3364
|
+
let child2 = node.returnType;
|
|
3365
|
+
if (null != child2 && walker.visitScalar(child2, node, "returnType")) return index;
|
|
3366
|
+
let child3 = node.body;
|
|
3367
|
+
return null != child3 && walker.visitScalar(child3, node, "body") ? index : "ArrowFunctionExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3368
|
+
},
|
|
3369
|
+
AssignmentExpression: function(node, walker, parent, key, list, index) {
|
|
3370
|
+
let child0 = node.left;
|
|
3371
|
+
if (null != child0 && walker.visitScalar(child0, node, "left")) return index;
|
|
3372
|
+
let child1 = node.right;
|
|
3373
|
+
return null != child1 && walker.visitScalar(child1, node, "right") ? index : "AssignmentExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3374
|
+
},
|
|
3375
|
+
AssignmentPattern: function(node, walker, parent, key, list, index) {
|
|
3376
|
+
let child0 = node.decorators;
|
|
3377
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
|
|
3378
|
+
let child1 = node.left;
|
|
3379
|
+
if (null != child1 && walker.visitScalar(child1, node, "left")) return index;
|
|
3380
|
+
let child2 = node.typeAnnotation;
|
|
3381
|
+
if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return index;
|
|
3382
|
+
let child3 = node.right;
|
|
3383
|
+
return null != child3 && walker.visitScalar(child3, node, "right") ? index : "AssignmentPattern" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3384
|
+
},
|
|
3385
|
+
AwaitExpression: function(node, walker, parent, key, list, index) {
|
|
3386
|
+
let child0 = node.argument;
|
|
3387
|
+
return null != child0 && walker.visitScalar(child0, node, "argument") ? index : "AwaitExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3388
|
+
},
|
|
3389
|
+
BinaryExpression: function(node, walker, parent, key, list, index) {
|
|
3390
|
+
let child0 = node.left;
|
|
3391
|
+
if (null != child0 && walker.visitScalar(child0, node, "left")) return index;
|
|
3392
|
+
let child1 = node.right;
|
|
3393
|
+
return null != child1 && walker.visitScalar(child1, node, "right") ? index : "BinaryExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3394
|
+
},
|
|
3395
|
+
BlockStatement: function(node, walker, parent, key, list, index) {
|
|
3396
|
+
let child0 = node.body;
|
|
3397
|
+
return null != child0 && walker.visitList(child0, node, "body") ? index : "BlockStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3398
|
+
},
|
|
3399
|
+
BreakStatement: function(node, walker, parent, key, list, index) {
|
|
3400
|
+
let child0 = node.label;
|
|
3401
|
+
return null != child0 && walker.visitScalar(child0, node, "label") ? index : "BreakStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3402
|
+
},
|
|
3403
|
+
CallExpression: function(node, walker, parent, key, list, index) {
|
|
3404
|
+
let child0 = node.callee;
|
|
3405
|
+
if (null != child0 && walker.visitScalar(child0, node, "callee")) return index;
|
|
3406
|
+
let child1 = node.typeArguments;
|
|
3407
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeArguments")) return index;
|
|
3408
|
+
let child2 = node.arguments;
|
|
3409
|
+
return null != child2 && walker.visitList(child2, node, "arguments") ? index : "CallExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3410
|
+
},
|
|
3411
|
+
CatchClause: function(node, walker, parent, key, list, index) {
|
|
3412
|
+
let child0 = node.param;
|
|
3413
|
+
if (null != child0 && walker.visitScalar(child0, node, "param")) return index;
|
|
3414
|
+
let child1 = node.body;
|
|
3415
|
+
return null != child1 && walker.visitScalar(child1, node, "body") ? index : "CatchClause" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3416
|
+
},
|
|
3417
|
+
ChainExpression: function(node, walker, parent, key, list, index) {
|
|
3418
|
+
let child0 = node.expression;
|
|
3419
|
+
return null != child0 && walker.visitScalar(child0, node, "expression") ? index : "ChainExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3420
|
+
},
|
|
3421
|
+
ClassBody: function(node, walker, parent, key, list, index) {
|
|
3422
|
+
let child0 = node.body;
|
|
3423
|
+
return null != child0 && walker.visitList(child0, node, "body") ? index : "ClassBody" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3424
|
+
},
|
|
3425
|
+
ClassDeclaration: function(node, walker, parent, key, list, index) {
|
|
3426
|
+
let child0 = node.decorators;
|
|
3427
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
|
|
3428
|
+
let child1 = node.id;
|
|
3429
|
+
if (null != child1 && walker.visitScalar(child1, node, "id")) return index;
|
|
3430
|
+
let child2 = node.typeParameters;
|
|
3431
|
+
if (null != child2 && walker.visitScalar(child2, node, "typeParameters")) return index;
|
|
3432
|
+
let child3 = node.superClass;
|
|
3433
|
+
if (null != child3 && walker.visitScalar(child3, node, "superClass")) return index;
|
|
3434
|
+
let child4 = node.superTypeArguments;
|
|
3435
|
+
if (null != child4 && walker.visitScalar(child4, node, "superTypeArguments")) return index;
|
|
3436
|
+
let child5 = node.implements;
|
|
3437
|
+
if (null != child5 && walker.visitList(child5, node, "implements")) return index;
|
|
3438
|
+
let child6 = node.body;
|
|
3439
|
+
return null != child6 && walker.visitScalar(child6, node, "body") ? index : "ClassDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3440
|
+
},
|
|
3441
|
+
ClassExpression: function(node, walker, parent, key, list, index) {
|
|
3442
|
+
let child0 = node.decorators;
|
|
3443
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
|
|
3444
|
+
let child1 = node.id;
|
|
3445
|
+
if (null != child1 && walker.visitScalar(child1, node, "id")) return index;
|
|
3446
|
+
let child2 = node.typeParameters;
|
|
3447
|
+
if (null != child2 && walker.visitScalar(child2, node, "typeParameters")) return index;
|
|
3448
|
+
let child3 = node.superClass;
|
|
3449
|
+
if (null != child3 && walker.visitScalar(child3, node, "superClass")) return index;
|
|
3450
|
+
let child4 = node.superTypeArguments;
|
|
3451
|
+
if (null != child4 && walker.visitScalar(child4, node, "superTypeArguments")) return index;
|
|
3452
|
+
let child5 = node.implements;
|
|
3453
|
+
if (null != child5 && walker.visitList(child5, node, "implements")) return index;
|
|
3454
|
+
let child6 = node.body;
|
|
3455
|
+
return null != child6 && walker.visitScalar(child6, node, "body") ? index : "ClassExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3456
|
+
},
|
|
3457
|
+
ConditionalExpression: function(node, walker, parent, key, list, index) {
|
|
3458
|
+
let child0 = node.test;
|
|
3459
|
+
if (null != child0 && walker.visitScalar(child0, node, "test")) return index;
|
|
3460
|
+
let child1 = node.consequent;
|
|
3461
|
+
if (null != child1 && walker.visitScalar(child1, node, "consequent")) return index;
|
|
3462
|
+
let child2 = node.alternate;
|
|
3463
|
+
return null != child2 && walker.visitScalar(child2, node, "alternate") ? index : "ConditionalExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3464
|
+
},
|
|
3465
|
+
ContinueStatement: function(node, walker, parent, key, list, index) {
|
|
3466
|
+
let child0 = node.label;
|
|
3467
|
+
return null != child0 && walker.visitScalar(child0, node, "label") ? index : "ContinueStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3468
|
+
},
|
|
3469
|
+
DebuggerStatement: null,
|
|
3470
|
+
Decorator: function(node, walker, parent, key, list, index) {
|
|
3471
|
+
let child0 = node.expression;
|
|
3472
|
+
return null != child0 && walker.visitScalar(child0, node, "expression") ? index : "Decorator" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3473
|
+
},
|
|
3474
|
+
DoWhileStatement: function(node, walker, parent, key, list, index) {
|
|
3475
|
+
let child0 = node.body;
|
|
3476
|
+
if (null != child0 && walker.visitScalar(child0, node, "body")) return index;
|
|
3477
|
+
let child1 = node.test;
|
|
3478
|
+
return null != child1 && walker.visitScalar(child1, node, "test") ? index : "DoWhileStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3479
|
+
},
|
|
3480
|
+
EmptyStatement: null,
|
|
3481
|
+
ExportAllDeclaration: function(node, walker, parent, key, list, index) {
|
|
3482
|
+
let child0 = node.exported;
|
|
3483
|
+
if (null != child0 && walker.visitScalar(child0, node, "exported")) return index;
|
|
3484
|
+
let child1 = node.source;
|
|
3485
|
+
if (null != child1 && walker.visitScalar(child1, node, "source")) return index;
|
|
3486
|
+
let child2 = node.attributes;
|
|
3487
|
+
return null != child2 && walker.visitListKnown(child2, node, "attributes", dispatchImportAttribute) ? index : "ExportAllDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3488
|
+
},
|
|
3489
|
+
ExportDefaultDeclaration: function(node, walker, parent, key, list, index) {
|
|
3490
|
+
let child0 = node.declaration;
|
|
3491
|
+
return null != child0 && walker.visitScalar(child0, node, "declaration") ? index : "ExportDefaultDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3492
|
+
},
|
|
3493
|
+
ExportNamedDeclaration: function(node, walker, parent, key, list, index) {
|
|
3494
|
+
let child0 = node.declaration;
|
|
3495
|
+
if (null != child0 && walker.visitScalar(child0, node, "declaration")) return index;
|
|
3496
|
+
let child1 = node.specifiers;
|
|
3497
|
+
if (null != child1 && walker.visitListKnown(child1, node, "specifiers", dispatchExportSpecifier)) return index;
|
|
3498
|
+
let child2 = node.source;
|
|
3499
|
+
if (null != child2 && walker.visitScalar(child2, node, "source")) return index;
|
|
3500
|
+
let child3 = node.attributes;
|
|
3501
|
+
return null != child3 && walker.visitListKnown(child3, node, "attributes", dispatchImportAttribute) ? index : "ExportNamedDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3502
|
+
},
|
|
3503
|
+
ExportSpecifier: function(node, walker, parent, key, list, index) {
|
|
3504
|
+
let child0 = node.local;
|
|
3505
|
+
if (null != child0 && walker.visitScalar(child0, node, "local")) return index;
|
|
3506
|
+
let child1 = node.exported;
|
|
3507
|
+
return null != child1 && walker.visitScalar(child1, node, "exported") ? index : "ExportSpecifier" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3508
|
+
},
|
|
3509
|
+
ExpressionStatement: function(node, walker, parent, key, list, index) {
|
|
3510
|
+
let child0 = node.expression;
|
|
3511
|
+
return null != child0 && walker.visitScalar(child0, node, "expression") ? index : "ExpressionStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3512
|
+
},
|
|
3513
|
+
ForInStatement: function(node, walker, parent, key, list, index) {
|
|
3514
|
+
let child0 = node.left;
|
|
3515
|
+
if (null != child0 && walker.visitScalar(child0, node, "left")) return index;
|
|
3516
|
+
let child1 = node.right;
|
|
3517
|
+
if (null != child1 && walker.visitScalar(child1, node, "right")) return index;
|
|
3518
|
+
let child2 = node.body;
|
|
3519
|
+
return null != child2 && walker.visitScalar(child2, node, "body") ? index : "ForInStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3520
|
+
},
|
|
3521
|
+
ForOfStatement: function(node, walker, parent, key, list, index) {
|
|
3522
|
+
let child0 = node.left;
|
|
3523
|
+
if (null != child0 && walker.visitScalar(child0, node, "left")) return index;
|
|
3524
|
+
let child1 = node.right;
|
|
3525
|
+
if (null != child1 && walker.visitScalar(child1, node, "right")) return index;
|
|
3526
|
+
let child2 = node.body;
|
|
3527
|
+
return null != child2 && walker.visitScalar(child2, node, "body") ? index : "ForOfStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3528
|
+
},
|
|
3529
|
+
ForStatement: function(node, walker, parent, key, list, index) {
|
|
3530
|
+
let child0 = node.init;
|
|
3531
|
+
if (null != child0 && walker.visitScalar(child0, node, "init")) return index;
|
|
3532
|
+
let child1 = node.test;
|
|
3533
|
+
if (null != child1 && walker.visitScalar(child1, node, "test")) return index;
|
|
3534
|
+
let child2 = node.update;
|
|
3535
|
+
if (null != child2 && walker.visitScalar(child2, node, "update")) return index;
|
|
3536
|
+
let child3 = node.body;
|
|
3537
|
+
return null != child3 && walker.visitScalar(child3, node, "body") ? index : "ForStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3538
|
+
},
|
|
3539
|
+
FunctionDeclaration: function(node, walker, parent, key, list, index) {
|
|
3540
|
+
let child0 = node.id;
|
|
3541
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
|
|
3542
|
+
let child1 = node.typeParameters;
|
|
3543
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return index;
|
|
3544
|
+
let child2 = node.params;
|
|
3545
|
+
if (null != child2 && walker.visitList(child2, node, "params")) return index;
|
|
3546
|
+
let child3 = node.returnType;
|
|
3547
|
+
if (null != child3 && walker.visitScalar(child3, node, "returnType")) return index;
|
|
3548
|
+
let child4 = node.body;
|
|
3549
|
+
return null != child4 && walker.visitScalar(child4, node, "body") ? index : "FunctionDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3550
|
+
},
|
|
3551
|
+
FunctionExpression: function(node, walker, parent, key, list, index) {
|
|
3552
|
+
let child0 = node.id;
|
|
3553
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
|
|
3554
|
+
let child1 = node.typeParameters;
|
|
3555
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return index;
|
|
3556
|
+
let child2 = node.params;
|
|
3557
|
+
if (null != child2 && walker.visitList(child2, node, "params")) return index;
|
|
3558
|
+
let child3 = node.returnType;
|
|
3559
|
+
if (null != child3 && walker.visitScalar(child3, node, "returnType")) return index;
|
|
3560
|
+
let child4 = node.body;
|
|
3561
|
+
return null != child4 && walker.visitScalar(child4, node, "body") ? index : "FunctionExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3562
|
+
},
|
|
3563
|
+
Hashbang: null,
|
|
3564
|
+
Identifier: function(node, walker, parent, key, list, index) {
|
|
3565
|
+
let child0 = node.decorators;
|
|
3566
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
|
|
3567
|
+
let child1 = node.typeAnnotation;
|
|
3568
|
+
return null != child1 && walker.visitScalar(child1, node, "typeAnnotation") ? index : "Identifier" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3569
|
+
},
|
|
3570
|
+
IfStatement: function(node, walker, parent, key, list, index) {
|
|
3571
|
+
let child0 = node.test;
|
|
3572
|
+
if (null != child0 && walker.visitScalar(child0, node, "test")) return index;
|
|
3573
|
+
let child1 = node.consequent;
|
|
3574
|
+
if (null != child1 && walker.visitScalar(child1, node, "consequent")) return index;
|
|
3575
|
+
let child2 = node.alternate;
|
|
3576
|
+
return null != child2 && walker.visitScalar(child2, node, "alternate") ? index : "IfStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3577
|
+
},
|
|
3578
|
+
ImportAttribute: function(node, walker, parent, key, list, index) {
|
|
3579
|
+
let child0 = node.key;
|
|
3580
|
+
if (null != child0 && walker.visitScalar(child0, node, "key")) return index;
|
|
3581
|
+
let child1 = node.value;
|
|
3582
|
+
return null != child1 && walker.visitScalar(child1, node, "value") ? index : "ImportAttribute" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3583
|
+
},
|
|
3584
|
+
ImportDeclaration: function(node, walker, parent, key, list, index) {
|
|
3585
|
+
let child0 = node.specifiers;
|
|
3586
|
+
if (null != child0 && walker.visitList(child0, node, "specifiers")) return index;
|
|
3587
|
+
let child1 = node.source;
|
|
3588
|
+
if (null != child1 && walker.visitScalar(child1, node, "source")) return index;
|
|
3589
|
+
let child2 = node.attributes;
|
|
3590
|
+
return null != child2 && walker.visitListKnown(child2, node, "attributes", dispatchImportAttribute) ? index : "ImportDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3591
|
+
},
|
|
3592
|
+
ImportDefaultSpecifier: function(node, walker, parent, key, list, index) {
|
|
3593
|
+
let child0 = node.local;
|
|
3594
|
+
return null != child0 && walker.visitScalar(child0, node, "local") ? index : "ImportDefaultSpecifier" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3595
|
+
},
|
|
3596
|
+
ImportExpression: function(node, walker, parent, key, list, index) {
|
|
3597
|
+
let child0 = node.source;
|
|
3598
|
+
if (null != child0 && walker.visitScalar(child0, node, "source")) return index;
|
|
3599
|
+
let child1 = node.options;
|
|
3600
|
+
return null != child1 && walker.visitScalar(child1, node, "options") ? index : "ImportExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3601
|
+
},
|
|
3602
|
+
ImportNamespaceSpecifier: function(node, walker, parent, key, list, index) {
|
|
3603
|
+
let child0 = node.local;
|
|
3604
|
+
return null != child0 && walker.visitScalar(child0, node, "local") ? index : "ImportNamespaceSpecifier" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3605
|
+
},
|
|
3606
|
+
ImportSpecifier: function(node, walker, parent, key, list, index) {
|
|
3607
|
+
let child0 = node.imported;
|
|
3608
|
+
if (null != child0 && walker.visitScalar(child0, node, "imported")) return index;
|
|
3609
|
+
let child1 = node.local;
|
|
3610
|
+
return null != child1 && walker.visitScalar(child1, node, "local") ? index : "ImportSpecifier" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3611
|
+
},
|
|
3612
|
+
JSXAttribute: function(node, walker, parent, key, list, index) {
|
|
3613
|
+
let child0 = node.name;
|
|
3614
|
+
if (null != child0 && walker.visitScalar(child0, node, "name")) return index;
|
|
3615
|
+
let child1 = node.value;
|
|
3616
|
+
return null != child1 && walker.visitScalar(child1, node, "value") ? index : "JSXAttribute" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3617
|
+
},
|
|
3618
|
+
JSXClosingElement: function(node, walker, parent, key, list, index) {
|
|
3619
|
+
let child0 = node.name;
|
|
3620
|
+
return null != child0 && walker.visitScalar(child0, node, "name") ? index : "JSXClosingElement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3621
|
+
},
|
|
3622
|
+
JSXClosingFragment: null,
|
|
3623
|
+
JSXElement: function(node, walker, parent, key, list, index) {
|
|
3624
|
+
let child0 = node.openingElement;
|
|
3625
|
+
if (null != child0 && walker.visitScalar(child0, node, "openingElement")) return index;
|
|
3626
|
+
let child1 = node.children;
|
|
3627
|
+
if (null != child1 && walker.visitList(child1, node, "children")) return index;
|
|
3628
|
+
let child2 = node.closingElement;
|
|
3629
|
+
return null != child2 && walker.visitScalar(child2, node, "closingElement") ? index : "JSXElement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3630
|
+
},
|
|
3631
|
+
JSXEmptyExpression: null,
|
|
3632
|
+
JSXExpressionContainer: function(node, walker, parent, key, list, index) {
|
|
3633
|
+
let child0 = node.expression;
|
|
3634
|
+
return null != child0 && walker.visitScalar(child0, node, "expression") ? index : "JSXExpressionContainer" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3635
|
+
},
|
|
3636
|
+
JSXFragment: function(node, walker, parent, key, list, index) {
|
|
3637
|
+
let child0 = node.openingFragment;
|
|
3638
|
+
if (null != child0 && walker.visitScalar(child0, node, "openingFragment")) return index;
|
|
3639
|
+
let child1 = node.children;
|
|
3640
|
+
if (null != child1 && walker.visitList(child1, node, "children")) return index;
|
|
3641
|
+
let child2 = node.closingFragment;
|
|
3642
|
+
return null != child2 && walker.visitScalar(child2, node, "closingFragment") ? index : "JSXFragment" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3643
|
+
},
|
|
3644
|
+
JSXIdentifier: null,
|
|
3645
|
+
JSXMemberExpression: function(node, walker, parent, key, list, index) {
|
|
3646
|
+
let child0 = node.object;
|
|
3647
|
+
if (null != child0 && walker.visitScalar(child0, node, "object")) return index;
|
|
3648
|
+
let child1 = node.property;
|
|
3649
|
+
return null != child1 && walker.visitScalar(child1, node, "property") ? index : "JSXMemberExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3650
|
+
},
|
|
3651
|
+
JSXNamespacedName: function(node, walker, parent, key, list, index) {
|
|
3652
|
+
let child0 = node.namespace;
|
|
3653
|
+
if (null != child0 && walker.visitScalar(child0, node, "namespace")) return index;
|
|
3654
|
+
let child1 = node.name;
|
|
3655
|
+
return null != child1 && walker.visitScalar(child1, node, "name") ? index : "JSXNamespacedName" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3656
|
+
},
|
|
3657
|
+
JSXOpeningElement: function(node, walker, parent, key, list, index) {
|
|
3658
|
+
let child0 = node.name;
|
|
3659
|
+
if (null != child0 && walker.visitScalar(child0, node, "name")) return index;
|
|
3660
|
+
let child1 = node.typeArguments;
|
|
3661
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeArguments")) return index;
|
|
3662
|
+
let child2 = node.attributes;
|
|
3663
|
+
return null != child2 && walker.visitList(child2, node, "attributes") ? index : "JSXOpeningElement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3664
|
+
},
|
|
3665
|
+
JSXOpeningFragment: null,
|
|
3666
|
+
JSXSpreadAttribute: function(node, walker, parent, key, list, index) {
|
|
3667
|
+
let child0 = node.argument;
|
|
3668
|
+
return null != child0 && walker.visitScalar(child0, node, "argument") ? index : "JSXSpreadAttribute" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3669
|
+
},
|
|
3670
|
+
JSXSpreadChild: function(node, walker, parent, key, list, index) {
|
|
3671
|
+
let child0 = node.expression;
|
|
3672
|
+
return null != child0 && walker.visitScalar(child0, node, "expression") ? index : "JSXSpreadChild" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3673
|
+
},
|
|
3674
|
+
JSXText: null,
|
|
3675
|
+
LabeledStatement: function(node, walker, parent, key, list, index) {
|
|
3676
|
+
let child0 = node.label;
|
|
3677
|
+
if (null != child0 && walker.visitScalar(child0, node, "label")) return index;
|
|
3678
|
+
let child1 = node.body;
|
|
3679
|
+
return null != child1 && walker.visitScalar(child1, node, "body") ? index : "LabeledStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3680
|
+
},
|
|
3681
|
+
Literal: null,
|
|
3682
|
+
LogicalExpression: function(node, walker, parent, key, list, index) {
|
|
3683
|
+
let child0 = node.left;
|
|
3684
|
+
if (null != child0 && walker.visitScalar(child0, node, "left")) return index;
|
|
3685
|
+
let child1 = node.right;
|
|
3686
|
+
return null != child1 && walker.visitScalar(child1, node, "right") ? index : "LogicalExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3687
|
+
},
|
|
3688
|
+
MemberExpression: function(node, walker, parent, key, list, index) {
|
|
3689
|
+
let child0 = node.object;
|
|
3690
|
+
if (null != child0 && walker.visitScalar(child0, node, "object")) return index;
|
|
3691
|
+
let child1 = node.property;
|
|
3692
|
+
return null != child1 && walker.visitScalar(child1, node, "property") ? index : "MemberExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3693
|
+
},
|
|
3694
|
+
MetaProperty: function(node, walker, parent, key, list, index) {
|
|
3695
|
+
let child0 = node.meta;
|
|
3696
|
+
if (null != child0 && walker.visitScalar(child0, node, "meta")) return index;
|
|
3697
|
+
let child1 = node.property;
|
|
3698
|
+
return null != child1 && walker.visitScalar(child1, node, "property") ? index : "MetaProperty" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3699
|
+
},
|
|
3700
|
+
MethodDefinition: function(node, walker, parent, key, list, index) {
|
|
3701
|
+
let child0 = node.decorators;
|
|
3702
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
|
|
3703
|
+
let child1 = node.key;
|
|
3704
|
+
if (null != child1 && walker.visitScalar(child1, node, "key")) return index;
|
|
3705
|
+
let child2 = node.value;
|
|
3706
|
+
return null != child2 && walker.visitScalar(child2, node, "value") ? index : "MethodDefinition" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3707
|
+
},
|
|
3708
|
+
NewExpression: function(node, walker, parent, key, list, index) {
|
|
3709
|
+
let child0 = node.callee;
|
|
3710
|
+
if (null != child0 && walker.visitScalar(child0, node, "callee")) return index;
|
|
3711
|
+
let child1 = node.typeArguments;
|
|
3712
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeArguments")) return index;
|
|
3713
|
+
let child2 = node.arguments;
|
|
3714
|
+
return null != child2 && walker.visitList(child2, node, "arguments") ? index : "NewExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3715
|
+
},
|
|
3716
|
+
ObjectExpression: function(node, walker, parent, key, list, index) {
|
|
3717
|
+
let child0 = node.properties;
|
|
3718
|
+
return null != child0 && walker.visitList(child0, node, "properties") ? index : "ObjectExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3719
|
+
},
|
|
3720
|
+
ObjectPattern: function(node, walker, parent, key, list, index) {
|
|
3721
|
+
let child0 = node.decorators;
|
|
3722
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
|
|
3723
|
+
let child1 = node.properties;
|
|
3724
|
+
if (null != child1 && walker.visitList(child1, node, "properties")) return index;
|
|
3725
|
+
let child2 = node.typeAnnotation;
|
|
3726
|
+
return null != child2 && walker.visitScalar(child2, node, "typeAnnotation") ? index : "ObjectPattern" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3727
|
+
},
|
|
3728
|
+
ParenthesizedExpression: function(node, walker, parent, key, list, index) {
|
|
3729
|
+
let child0 = node.expression;
|
|
3730
|
+
return null != child0 && walker.visitScalar(child0, node, "expression") ? index : "ParenthesizedExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3731
|
+
},
|
|
3732
|
+
PrivateIdentifier: null,
|
|
3733
|
+
Program: function(node, walker, parent, key, list, index) {
|
|
3734
|
+
let child0 = node.hashbang;
|
|
3735
|
+
if (null != child0 && walker.visitScalar(child0, node, "hashbang")) return index;
|
|
3736
|
+
let child1 = node.body;
|
|
3737
|
+
return null != child1 && walker.visitList(child1, node, "body") ? index : "Program" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3738
|
+
},
|
|
3739
|
+
Property: function(node, walker, parent, key, list, index) {
|
|
3740
|
+
let child0 = node.key;
|
|
3741
|
+
if (null != child0 && walker.visitScalar(child0, node, "key")) return index;
|
|
3742
|
+
let child1 = node.value;
|
|
3743
|
+
return null != child1 && walker.visitScalar(child1, node, "value") ? index : "Property" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3744
|
+
},
|
|
3745
|
+
PropertyDefinition: function(node, walker, parent, key, list, index) {
|
|
3746
|
+
let child0 = node.decorators;
|
|
3747
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
|
|
3748
|
+
let child1 = node.key;
|
|
3749
|
+
if (null != child1 && walker.visitScalar(child1, node, "key")) return index;
|
|
3750
|
+
let child2 = node.typeAnnotation;
|
|
3751
|
+
if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return index;
|
|
3752
|
+
let child3 = node.value;
|
|
3753
|
+
return null != child3 && walker.visitScalar(child3, node, "value") ? index : "PropertyDefinition" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3754
|
+
},
|
|
3755
|
+
RestElement: function(node, walker, parent, key, list, index) {
|
|
3756
|
+
let child0 = node.decorators;
|
|
3757
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
|
|
3758
|
+
let child1 = node.argument;
|
|
3759
|
+
if (null != child1 && walker.visitScalar(child1, node, "argument")) return index;
|
|
3760
|
+
let child2 = node.typeAnnotation;
|
|
3761
|
+
return null != child2 && walker.visitScalar(child2, node, "typeAnnotation") ? index : "RestElement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3762
|
+
},
|
|
3763
|
+
ReturnStatement: function(node, walker, parent, key, list, index) {
|
|
3764
|
+
let child0 = node.argument;
|
|
3765
|
+
return null != child0 && walker.visitScalar(child0, node, "argument") ? index : "ReturnStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3766
|
+
},
|
|
3767
|
+
SequenceExpression: function(node, walker, parent, key, list, index) {
|
|
3768
|
+
let child0 = node.expressions;
|
|
3769
|
+
return null != child0 && walker.visitList(child0, node, "expressions") ? index : "SequenceExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3770
|
+
},
|
|
3771
|
+
SpreadElement: function(node, walker, parent, key, list, index) {
|
|
3772
|
+
let child0 = node.argument;
|
|
3773
|
+
return null != child0 && walker.visitScalar(child0, node, "argument") ? index : "SpreadElement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3774
|
+
},
|
|
3775
|
+
StaticBlock: function(node, walker, parent, key, list, index) {
|
|
3776
|
+
let child0 = node.body;
|
|
3777
|
+
return null != child0 && walker.visitList(child0, node, "body") ? index : "StaticBlock" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3778
|
+
},
|
|
3779
|
+
Super: null,
|
|
3780
|
+
SwitchCase: function(node, walker, parent, key, list, index) {
|
|
3781
|
+
let child0 = node.test;
|
|
3782
|
+
if (null != child0 && walker.visitScalar(child0, node, "test")) return index;
|
|
3783
|
+
let child1 = node.consequent;
|
|
3784
|
+
return null != child1 && walker.visitList(child1, node, "consequent") ? index : "SwitchCase" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3785
|
+
},
|
|
3786
|
+
SwitchStatement: function(node, walker, parent, key, list, index) {
|
|
3787
|
+
let child0 = node.discriminant;
|
|
3788
|
+
if (null != child0 && walker.visitScalar(child0, node, "discriminant")) return index;
|
|
3789
|
+
let child1 = node.cases;
|
|
3790
|
+
return null != child1 && walker.visitListKnown(child1, node, "cases", dispatchSwitchCase) ? index : "SwitchStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3791
|
+
},
|
|
3792
|
+
TSAbstractAccessorProperty: function(node, walker, parent, key, list, index) {
|
|
3793
|
+
let child0 = node.decorators;
|
|
3794
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
|
|
3795
|
+
let child1 = node.key;
|
|
3796
|
+
if (null != child1 && walker.visitScalar(child1, node, "key")) return index;
|
|
3797
|
+
let child2 = node.typeAnnotation;
|
|
3798
|
+
if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return index;
|
|
3799
|
+
let child3 = node.value;
|
|
3800
|
+
return null != child3 && walker.visitScalar(child3, node, "value") ? index : "TSAbstractAccessorProperty" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3801
|
+
},
|
|
3802
|
+
TSAbstractMethodDefinition: function(node, walker, parent, key, list, index) {
|
|
3803
|
+
let child0 = node.decorators;
|
|
3804
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
|
|
3805
|
+
let child1 = node.key;
|
|
3806
|
+
if (null != child1 && walker.visitScalar(child1, node, "key")) return index;
|
|
3807
|
+
let child2 = node.value;
|
|
3808
|
+
return null != child2 && walker.visitScalar(child2, node, "value") ? index : "TSAbstractMethodDefinition" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3809
|
+
},
|
|
3810
|
+
TSAbstractPropertyDefinition: function(node, walker, parent, key, list, index) {
|
|
3811
|
+
let child0 = node.decorators;
|
|
3812
|
+
if (null != child0 && walker.visitList(child0, node, "decorators")) return index;
|
|
3813
|
+
let child1 = node.key;
|
|
3814
|
+
if (null != child1 && walker.visitScalar(child1, node, "key")) return index;
|
|
3815
|
+
let child2 = node.typeAnnotation;
|
|
3816
|
+
if (null != child2 && walker.visitScalar(child2, node, "typeAnnotation")) return index;
|
|
3817
|
+
let child3 = node.value;
|
|
3818
|
+
return null != child3 && walker.visitScalar(child3, node, "value") ? index : "TSAbstractPropertyDefinition" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3819
|
+
},
|
|
3820
|
+
TSAnyKeyword: null,
|
|
3821
|
+
TSArrayType: function(node, walker, parent, key, list, index) {
|
|
3822
|
+
let child0 = node.elementType;
|
|
3823
|
+
return null != child0 && walker.visitScalar(child0, node, "elementType") ? index : "TSArrayType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3824
|
+
},
|
|
3825
|
+
TSAsExpression: function(node, walker, parent, key, list, index) {
|
|
3826
|
+
let child0 = node.expression;
|
|
3827
|
+
if (null != child0 && walker.visitScalar(child0, node, "expression")) return index;
|
|
3828
|
+
let child1 = node.typeAnnotation;
|
|
3829
|
+
return null != child1 && walker.visitScalar(child1, node, "typeAnnotation") ? index : "TSAsExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3830
|
+
},
|
|
3831
|
+
TSBigIntKeyword: null,
|
|
3832
|
+
TSBooleanKeyword: null,
|
|
3833
|
+
TSCallSignatureDeclaration: function(node, walker, parent, key, list, index) {
|
|
3834
|
+
let child0 = node.typeParameters;
|
|
3835
|
+
if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return index;
|
|
3836
|
+
let child1 = node.params;
|
|
3837
|
+
if (null != child1 && walker.visitList(child1, node, "params")) return index;
|
|
3838
|
+
let child2 = node.returnType;
|
|
3839
|
+
return null != child2 && walker.visitScalar(child2, node, "returnType") ? index : "TSCallSignatureDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3840
|
+
},
|
|
3841
|
+
TSClassImplements: function(node, walker, parent, key, list, index) {
|
|
3842
|
+
let child0 = node.expression;
|
|
3843
|
+
if (null != child0 && walker.visitScalar(child0, node, "expression")) return index;
|
|
3844
|
+
let child1 = node.typeArguments;
|
|
3845
|
+
return null != child1 && walker.visitScalar(child1, node, "typeArguments") ? index : "TSClassImplements" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3846
|
+
},
|
|
3847
|
+
TSConditionalType: function(node, walker, parent, key, list, index) {
|
|
3848
|
+
let child0 = node.checkType;
|
|
3849
|
+
if (null != child0 && walker.visitScalar(child0, node, "checkType")) return index;
|
|
3850
|
+
let child1 = node.extendsType;
|
|
3851
|
+
if (null != child1 && walker.visitScalar(child1, node, "extendsType")) return index;
|
|
3852
|
+
let child2 = node.trueType;
|
|
3853
|
+
if (null != child2 && walker.visitScalar(child2, node, "trueType")) return index;
|
|
3854
|
+
let child3 = node.falseType;
|
|
3855
|
+
return null != child3 && walker.visitScalar(child3, node, "falseType") ? index : "TSConditionalType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3856
|
+
},
|
|
3857
|
+
TSConstructSignatureDeclaration: function(node, walker, parent, key, list, index) {
|
|
3858
|
+
let child0 = node.typeParameters;
|
|
3859
|
+
if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return index;
|
|
3860
|
+
let child1 = node.params;
|
|
3861
|
+
if (null != child1 && walker.visitList(child1, node, "params")) return index;
|
|
3862
|
+
let child2 = node.returnType;
|
|
3863
|
+
return null != child2 && walker.visitScalar(child2, node, "returnType") ? index : "TSConstructSignatureDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3864
|
+
},
|
|
3865
|
+
TSConstructorType: function(node, walker, parent, key, list, index) {
|
|
3866
|
+
let child0 = node.typeParameters;
|
|
3867
|
+
if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return index;
|
|
3868
|
+
let child1 = node.params;
|
|
3869
|
+
if (null != child1 && walker.visitList(child1, node, "params")) return index;
|
|
3870
|
+
let child2 = node.returnType;
|
|
3871
|
+
return null != child2 && walker.visitScalar(child2, node, "returnType") ? index : "TSConstructorType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3872
|
+
},
|
|
3873
|
+
TSDeclareFunction: function(node, walker, parent, key, list, index) {
|
|
3874
|
+
let child0 = node.id;
|
|
3875
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
|
|
3876
|
+
let child1 = node.typeParameters;
|
|
3877
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return index;
|
|
3878
|
+
let child2 = node.params;
|
|
3879
|
+
if (null != child2 && walker.visitList(child2, node, "params")) return index;
|
|
3880
|
+
let child3 = node.returnType;
|
|
3881
|
+
if (null != child3 && walker.visitScalar(child3, node, "returnType")) return index;
|
|
3882
|
+
let child4 = node.body;
|
|
3883
|
+
return null != child4 && walker.visitScalar(child4, node, "body") ? index : "TSDeclareFunction" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3884
|
+
},
|
|
3885
|
+
TSEmptyBodyFunctionExpression: function(node, walker, parent, key, list, index) {
|
|
3886
|
+
let child0 = node.id;
|
|
3887
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
|
|
3888
|
+
let child1 = node.typeParameters;
|
|
3889
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return index;
|
|
3890
|
+
let child2 = node.params;
|
|
3891
|
+
if (null != child2 && walker.visitList(child2, node, "params")) return index;
|
|
3892
|
+
let child3 = node.returnType;
|
|
3893
|
+
if (null != child3 && walker.visitScalar(child3, node, "returnType")) return index;
|
|
3894
|
+
let child4 = node.body;
|
|
3895
|
+
return null != child4 && walker.visitScalar(child4, node, "body") ? index : "TSEmptyBodyFunctionExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3896
|
+
},
|
|
3897
|
+
TSEnumBody: function(node, walker, parent, key, list, index) {
|
|
3898
|
+
let child0 = node.members;
|
|
3899
|
+
return null != child0 && walker.visitListKnown(child0, node, "members", dispatchTSEnumMember) ? index : "TSEnumBody" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3900
|
+
},
|
|
3901
|
+
TSEnumDeclaration: function(node, walker, parent, key, list, index) {
|
|
3902
|
+
let child0 = node.id;
|
|
3903
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
|
|
3904
|
+
let child1 = node.body;
|
|
3905
|
+
return null != child1 && walker.visitScalar(child1, node, "body") ? index : "TSEnumDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3906
|
+
},
|
|
3907
|
+
TSEnumMember: function(node, walker, parent, key, list, index) {
|
|
3908
|
+
let child0 = node.id;
|
|
3909
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
|
|
3910
|
+
let child1 = node.initializer;
|
|
3911
|
+
return null != child1 && walker.visitScalar(child1, node, "initializer") ? index : "TSEnumMember" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3912
|
+
},
|
|
3913
|
+
TSExportAssignment: function(node, walker, parent, key, list, index) {
|
|
3914
|
+
let child0 = node.expression;
|
|
3915
|
+
return null != child0 && walker.visitScalar(child0, node, "expression") ? index : "TSExportAssignment" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3916
|
+
},
|
|
3917
|
+
TSExternalModuleReference: function(node, walker, parent, key, list, index) {
|
|
3918
|
+
let child0 = node.expression;
|
|
3919
|
+
return null != child0 && walker.visitScalar(child0, node, "expression") ? index : "TSExternalModuleReference" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3920
|
+
},
|
|
3921
|
+
TSFunctionType: function(node, walker, parent, key, list, index) {
|
|
3922
|
+
let child0 = node.typeParameters;
|
|
3923
|
+
if (null != child0 && walker.visitScalar(child0, node, "typeParameters")) return index;
|
|
3924
|
+
let child1 = node.params;
|
|
3925
|
+
if (null != child1 && walker.visitList(child1, node, "params")) return index;
|
|
3926
|
+
let child2 = node.returnType;
|
|
3927
|
+
return null != child2 && walker.visitScalar(child2, node, "returnType") ? index : "TSFunctionType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3928
|
+
},
|
|
3929
|
+
TSImportEqualsDeclaration: function(node, walker, parent, key, list, index) {
|
|
3930
|
+
let child0 = node.id;
|
|
3931
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
|
|
3932
|
+
let child1 = node.moduleReference;
|
|
3933
|
+
return null != child1 && walker.visitScalar(child1, node, "moduleReference") ? index : "TSImportEqualsDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3934
|
+
},
|
|
3935
|
+
TSImportType: function(node, walker, parent, key, list, index) {
|
|
3936
|
+
let child0 = node.source;
|
|
3937
|
+
if (null != child0 && walker.visitScalar(child0, node, "source")) return index;
|
|
3938
|
+
let child1 = node.options;
|
|
3939
|
+
if (null != child1 && walker.visitScalar(child1, node, "options")) return index;
|
|
3940
|
+
let child2 = node.qualifier;
|
|
3941
|
+
if (null != child2 && walker.visitScalar(child2, node, "qualifier")) return index;
|
|
3942
|
+
let child3 = node.typeArguments;
|
|
3943
|
+
return null != child3 && walker.visitScalar(child3, node, "typeArguments") ? index : "TSImportType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3944
|
+
},
|
|
3945
|
+
TSIndexSignature: function(node, walker, parent, key, list, index) {
|
|
3946
|
+
let child0 = node.parameters;
|
|
3947
|
+
if (null != child0 && walker.visitList(child0, node, "parameters")) return index;
|
|
3948
|
+
let child1 = node.typeAnnotation;
|
|
3949
|
+
return null != child1 && walker.visitScalar(child1, node, "typeAnnotation") ? index : "TSIndexSignature" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3950
|
+
},
|
|
3951
|
+
TSIndexedAccessType: function(node, walker, parent, key, list, index) {
|
|
3952
|
+
let child0 = node.objectType;
|
|
3953
|
+
if (null != child0 && walker.visitScalar(child0, node, "objectType")) return index;
|
|
3954
|
+
let child1 = node.indexType;
|
|
3955
|
+
return null != child1 && walker.visitScalar(child1, node, "indexType") ? index : "TSIndexedAccessType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3956
|
+
},
|
|
3957
|
+
TSInferType: function(node, walker, parent, key, list, index) {
|
|
3958
|
+
let child0 = node.typeParameter;
|
|
3959
|
+
return null != child0 && walker.visitScalar(child0, node, "typeParameter") ? index : "TSInferType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3960
|
+
},
|
|
3961
|
+
TSInstantiationExpression: function(node, walker, parent, key, list, index) {
|
|
3962
|
+
let child0 = node.expression;
|
|
3963
|
+
if (null != child0 && walker.visitScalar(child0, node, "expression")) return index;
|
|
3964
|
+
let child1 = node.typeArguments;
|
|
3965
|
+
return null != child1 && walker.visitScalar(child1, node, "typeArguments") ? index : "TSInstantiationExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3966
|
+
},
|
|
3967
|
+
TSInterfaceBody: function(node, walker, parent, key, list, index) {
|
|
3968
|
+
let child0 = node.body;
|
|
3969
|
+
return null != child0 && walker.visitList(child0, node, "body") ? index : "TSInterfaceBody" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3970
|
+
},
|
|
3971
|
+
TSInterfaceDeclaration: function(node, walker, parent, key, list, index) {
|
|
3972
|
+
let child0 = node.id;
|
|
3973
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
|
|
3974
|
+
let child1 = node.typeParameters;
|
|
3975
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return index;
|
|
3976
|
+
let child2 = node.extends;
|
|
3977
|
+
if (null != child2 && walker.visitListKnown(child2, node, "extends", dispatchTSInterfaceHeritage)) return index;
|
|
3978
|
+
let child3 = node.body;
|
|
3979
|
+
return null != child3 && walker.visitScalar(child3, node, "body") ? index : "TSInterfaceDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3980
|
+
},
|
|
3981
|
+
TSInterfaceHeritage: function(node, walker, parent, key, list, index) {
|
|
3982
|
+
let child0 = node.expression;
|
|
3983
|
+
if (null != child0 && walker.visitScalar(child0, node, "expression")) return index;
|
|
3984
|
+
let child1 = node.typeArguments;
|
|
3985
|
+
return null != child1 && walker.visitScalar(child1, node, "typeArguments") ? index : "TSInterfaceHeritage" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3986
|
+
},
|
|
3987
|
+
TSIntersectionType: function(node, walker, parent, key, list, index) {
|
|
3988
|
+
let child0 = node.types;
|
|
3989
|
+
return null != child0 && walker.visitList(child0, node, "types") ? index : "TSIntersectionType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3990
|
+
},
|
|
3991
|
+
TSIntrinsicKeyword: null,
|
|
3992
|
+
TSJSDocNonNullableType: function(node, walker, parent, key, list, index) {
|
|
3993
|
+
let child0 = node.typeAnnotation;
|
|
3994
|
+
return null != child0 && walker.visitScalar(child0, node, "typeAnnotation") ? index : "TSJSDocNonNullableType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3995
|
+
},
|
|
3996
|
+
TSJSDocNullableType: function(node, walker, parent, key, list, index) {
|
|
3997
|
+
let child0 = node.typeAnnotation;
|
|
3998
|
+
return null != child0 && walker.visitScalar(child0, node, "typeAnnotation") ? index : "TSJSDocNullableType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
3999
|
+
},
|
|
4000
|
+
TSJSDocUnknownType: null,
|
|
4001
|
+
TSLiteralType: function(node, walker, parent, key, list, index) {
|
|
4002
|
+
let child0 = node.literal;
|
|
4003
|
+
return null != child0 && walker.visitScalar(child0, node, "literal") ? index : "TSLiteralType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4004
|
+
},
|
|
4005
|
+
TSMappedType: function(node, walker, parent, key, list, index) {
|
|
4006
|
+
let child0 = node.key;
|
|
4007
|
+
if (null != child0 && walker.visitScalar(child0, node, "key")) return index;
|
|
4008
|
+
let child1 = node.constraint;
|
|
4009
|
+
if (null != child1 && walker.visitScalar(child1, node, "constraint")) return index;
|
|
4010
|
+
let child2 = node.nameType;
|
|
4011
|
+
if (null != child2 && walker.visitScalar(child2, node, "nameType")) return index;
|
|
4012
|
+
let child3 = node.typeAnnotation;
|
|
4013
|
+
return null != child3 && walker.visitScalar(child3, node, "typeAnnotation") ? index : "TSMappedType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4014
|
+
},
|
|
4015
|
+
TSMethodSignature: function(node, walker, parent, key, list, index) {
|
|
4016
|
+
let child0 = node.key;
|
|
4017
|
+
if (null != child0 && walker.visitScalar(child0, node, "key")) return index;
|
|
4018
|
+
let child1 = node.typeParameters;
|
|
4019
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return index;
|
|
4020
|
+
let child2 = node.params;
|
|
4021
|
+
if (null != child2 && walker.visitList(child2, node, "params")) return index;
|
|
4022
|
+
let child3 = node.returnType;
|
|
4023
|
+
return null != child3 && walker.visitScalar(child3, node, "returnType") ? index : "TSMethodSignature" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4024
|
+
},
|
|
4025
|
+
TSModuleBlock: function(node, walker, parent, key, list, index) {
|
|
4026
|
+
let child0 = node.body;
|
|
4027
|
+
return null != child0 && walker.visitList(child0, node, "body") ? index : "TSModuleBlock" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4028
|
+
},
|
|
4029
|
+
TSModuleDeclaration: function(node, walker, parent, key, list, index) {
|
|
4030
|
+
let child0 = node.id;
|
|
4031
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
|
|
4032
|
+
let child1 = node.attributes;
|
|
4033
|
+
if (null != child1 && walker.visitScalar(child1, node, "attributes")) return index;
|
|
4034
|
+
let child2 = node.body;
|
|
4035
|
+
return null != child2 && walker.visitScalar(child2, node, "body") ? index : "TSModuleDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4036
|
+
},
|
|
4037
|
+
TSNamedTupleMember: function(node, walker, parent, key, list, index) {
|
|
4038
|
+
let child0 = node.label;
|
|
4039
|
+
if (null != child0 && walker.visitScalar(child0, node, "label")) return index;
|
|
4040
|
+
let child1 = node.elementType;
|
|
4041
|
+
return null != child1 && walker.visitScalar(child1, node, "elementType") ? index : "TSNamedTupleMember" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4042
|
+
},
|
|
4043
|
+
TSNamespaceExportDeclaration: function(node, walker, parent, key, list, index) {
|
|
4044
|
+
let child0 = node.id;
|
|
4045
|
+
return null != child0 && walker.visitScalar(child0, node, "id") ? index : "TSNamespaceExportDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4046
|
+
},
|
|
4047
|
+
TSNeverKeyword: null,
|
|
4048
|
+
TSNonNullExpression: function(node, walker, parent, key, list, index) {
|
|
4049
|
+
let child0 = node.expression;
|
|
4050
|
+
return null != child0 && walker.visitScalar(child0, node, "expression") ? index : "TSNonNullExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4051
|
+
},
|
|
4052
|
+
TSNullKeyword: null,
|
|
4053
|
+
TSNumberKeyword: null,
|
|
4054
|
+
TSObjectKeyword: null,
|
|
4055
|
+
TSOptionalType: function(node, walker, parent, key, list, index) {
|
|
4056
|
+
let child0 = node.typeAnnotation;
|
|
4057
|
+
return null != child0 && walker.visitScalar(child0, node, "typeAnnotation") ? index : "TSOptionalType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4058
|
+
},
|
|
4059
|
+
TSParameterProperty: function(node, walker, parent, key, list, index) {
|
|
4060
|
+
let child0 = node.decorators;
|
|
4061
|
+
if (null != child0 && walker.visitListKnown(child0, node, "decorators", dispatchDecorator)) return index;
|
|
4062
|
+
let child1 = node.parameter;
|
|
4063
|
+
return null != child1 && walker.visitScalar(child1, node, "parameter") ? index : "TSParameterProperty" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4064
|
+
},
|
|
4065
|
+
TSParenthesizedType: function(node, walker, parent, key, list, index) {
|
|
4066
|
+
let child0 = node.typeAnnotation;
|
|
4067
|
+
return null != child0 && walker.visitScalar(child0, node, "typeAnnotation") ? index : "TSParenthesizedType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4068
|
+
},
|
|
4069
|
+
TSPropertySignature: function(node, walker, parent, key, list, index) {
|
|
4070
|
+
let child0 = node.key;
|
|
4071
|
+
if (null != child0 && walker.visitScalar(child0, node, "key")) return index;
|
|
4072
|
+
let child1 = node.typeAnnotation;
|
|
4073
|
+
return null != child1 && walker.visitScalar(child1, node, "typeAnnotation") ? index : "TSPropertySignature" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4074
|
+
},
|
|
4075
|
+
TSQualifiedName: function(node, walker, parent, key, list, index) {
|
|
4076
|
+
let child0 = node.left;
|
|
4077
|
+
if (null != child0 && walker.visitScalar(child0, node, "left")) return index;
|
|
4078
|
+
let child1 = node.right;
|
|
4079
|
+
return null != child1 && walker.visitScalar(child1, node, "right") ? index : "TSQualifiedName" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4080
|
+
},
|
|
4081
|
+
TSRestType: function(node, walker, parent, key, list, index) {
|
|
4082
|
+
let child0 = node.typeAnnotation;
|
|
4083
|
+
return null != child0 && walker.visitScalar(child0, node, "typeAnnotation") ? index : "TSRestType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4084
|
+
},
|
|
4085
|
+
TSSatisfiesExpression: function(node, walker, parent, key, list, index) {
|
|
4086
|
+
let child0 = node.expression;
|
|
4087
|
+
if (null != child0 && walker.visitScalar(child0, node, "expression")) return index;
|
|
4088
|
+
let child1 = node.typeAnnotation;
|
|
4089
|
+
return null != child1 && walker.visitScalar(child1, node, "typeAnnotation") ? index : "TSSatisfiesExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4090
|
+
},
|
|
4091
|
+
TSStringKeyword: null,
|
|
4092
|
+
TSSymbolKeyword: null,
|
|
4093
|
+
TSTemplateLiteralType: function(node, walker, parent, key, list, index) {
|
|
4094
|
+
let child0 = node.quasis;
|
|
4095
|
+
if (null != child0 && walker.visitListKnown(child0, node, "quasis", dispatchTemplateElement)) return index;
|
|
4096
|
+
let child1 = node.types;
|
|
4097
|
+
return null != child1 && walker.visitList(child1, node, "types") ? index : "TSTemplateLiteralType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4098
|
+
},
|
|
4099
|
+
TSThisType: null,
|
|
4100
|
+
TSTupleType: function(node, walker, parent, key, list, index) {
|
|
4101
|
+
let child0 = node.elementTypes;
|
|
4102
|
+
return null != child0 && walker.visitList(child0, node, "elementTypes") ? index : "TSTupleType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4103
|
+
},
|
|
4104
|
+
TSTypeAliasDeclaration: function(node, walker, parent, key, list, index) {
|
|
4105
|
+
let child0 = node.id;
|
|
4106
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
|
|
4107
|
+
let child1 = node.typeParameters;
|
|
4108
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeParameters")) return index;
|
|
4109
|
+
let child2 = node.typeAnnotation;
|
|
4110
|
+
return null != child2 && walker.visitScalar(child2, node, "typeAnnotation") ? index : "TSTypeAliasDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4111
|
+
},
|
|
4112
|
+
TSTypeAnnotation: function(node, walker, parent, key, list, index) {
|
|
4113
|
+
let child0 = node.typeAnnotation;
|
|
4114
|
+
return null != child0 && walker.visitScalar(child0, node, "typeAnnotation") ? index : "TSTypeAnnotation" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4115
|
+
},
|
|
4116
|
+
TSTypeAssertion: function(node, walker, parent, key, list, index) {
|
|
4117
|
+
let child0 = node.typeAnnotation;
|
|
4118
|
+
if (null != child0 && walker.visitScalar(child0, node, "typeAnnotation")) return index;
|
|
4119
|
+
let child1 = node.expression;
|
|
4120
|
+
return null != child1 && walker.visitScalar(child1, node, "expression") ? index : "TSTypeAssertion" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4121
|
+
},
|
|
4122
|
+
TSTypeLiteral: function(node, walker, parent, key, list, index) {
|
|
4123
|
+
let child0 = node.members;
|
|
4124
|
+
return null != child0 && walker.visitList(child0, node, "members") ? index : "TSTypeLiteral" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4125
|
+
},
|
|
4126
|
+
TSTypeOperator: function(node, walker, parent, key, list, index) {
|
|
4127
|
+
let child0 = node.typeAnnotation;
|
|
4128
|
+
return null != child0 && walker.visitScalar(child0, node, "typeAnnotation") ? index : "TSTypeOperator" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4129
|
+
},
|
|
4130
|
+
TSTypeParameter: function(node, walker, parent, key, list, index) {
|
|
4131
|
+
let child0 = node.name;
|
|
4132
|
+
if (null != child0 && walker.visitScalar(child0, node, "name")) return index;
|
|
4133
|
+
let child1 = node.constraint;
|
|
4134
|
+
if (null != child1 && walker.visitScalar(child1, node, "constraint")) return index;
|
|
4135
|
+
let child2 = node.default;
|
|
4136
|
+
return null != child2 && walker.visitScalar(child2, node, "default") ? index : "TSTypeParameter" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4137
|
+
},
|
|
4138
|
+
TSTypeParameterDeclaration: function(node, walker, parent, key, list, index) {
|
|
4139
|
+
let child0 = node.params;
|
|
4140
|
+
return null != child0 && walker.visitListKnown(child0, node, "params", dispatchTSTypeParameter) ? index : "TSTypeParameterDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4141
|
+
},
|
|
4142
|
+
TSTypeParameterInstantiation: function(node, walker, parent, key, list, index) {
|
|
4143
|
+
let child0 = node.params;
|
|
4144
|
+
return null != child0 && walker.visitList(child0, node, "params") ? index : "TSTypeParameterInstantiation" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4145
|
+
},
|
|
4146
|
+
TSTypePredicate: function(node, walker, parent, key, list, index) {
|
|
4147
|
+
let child0 = node.parameterName;
|
|
4148
|
+
if (null != child0 && walker.visitScalar(child0, node, "parameterName")) return index;
|
|
4149
|
+
let child1 = node.typeAnnotation;
|
|
4150
|
+
return null != child1 && walker.visitScalar(child1, node, "typeAnnotation") ? index : "TSTypePredicate" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4151
|
+
},
|
|
4152
|
+
TSTypeQuery: function(node, walker, parent, key, list, index) {
|
|
4153
|
+
let child0 = node.exprName;
|
|
4154
|
+
if (null != child0 && walker.visitScalar(child0, node, "exprName")) return index;
|
|
4155
|
+
let child1 = node.typeArguments;
|
|
4156
|
+
return null != child1 && walker.visitScalar(child1, node, "typeArguments") ? index : "TSTypeQuery" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4157
|
+
},
|
|
4158
|
+
TSTypeReference: function(node, walker, parent, key, list, index) {
|
|
4159
|
+
let child0 = node.typeName;
|
|
4160
|
+
if (null != child0 && walker.visitScalar(child0, node, "typeName")) return index;
|
|
4161
|
+
let child1 = node.typeArguments;
|
|
4162
|
+
return null != child1 && walker.visitScalar(child1, node, "typeArguments") ? index : "TSTypeReference" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4163
|
+
},
|
|
4164
|
+
TSUndefinedKeyword: null,
|
|
4165
|
+
TSUnionType: function(node, walker, parent, key, list, index) {
|
|
4166
|
+
let child0 = node.types;
|
|
4167
|
+
return null != child0 && walker.visitList(child0, node, "types") ? index : "TSUnionType" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4168
|
+
},
|
|
4169
|
+
TSUnknownKeyword: null,
|
|
4170
|
+
TSVoidKeyword: null,
|
|
4171
|
+
TaggedTemplateExpression: function(node, walker, parent, key, list, index) {
|
|
4172
|
+
let child0 = node.tag;
|
|
4173
|
+
if (null != child0 && walker.visitScalar(child0, node, "tag")) return index;
|
|
4174
|
+
let child1 = node.typeArguments;
|
|
4175
|
+
if (null != child1 && walker.visitScalar(child1, node, "typeArguments")) return index;
|
|
4176
|
+
let child2 = node.quasi;
|
|
4177
|
+
return null != child2 && walker.visitScalar(child2, node, "quasi") ? index : "TaggedTemplateExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4178
|
+
},
|
|
4179
|
+
TemplateElement: null,
|
|
4180
|
+
TemplateLiteral: function(node, walker, parent, key, list, index) {
|
|
4181
|
+
let child0 = node.quasis;
|
|
4182
|
+
if (null != child0 && walker.visitListKnown(child0, node, "quasis", dispatchTemplateElement)) return index;
|
|
4183
|
+
let child1 = node.expressions;
|
|
4184
|
+
return null != child1 && walker.visitList(child1, node, "expressions") ? index : "TemplateLiteral" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4185
|
+
},
|
|
4186
|
+
ThisExpression: null,
|
|
4187
|
+
ThrowStatement: function(node, walker, parent, key, list, index) {
|
|
4188
|
+
let child0 = node.argument;
|
|
4189
|
+
return null != child0 && walker.visitScalar(child0, node, "argument") ? index : "ThrowStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4190
|
+
},
|
|
4191
|
+
TryStatement: function(node, walker, parent, key, list, index) {
|
|
4192
|
+
let child0 = node.block;
|
|
4193
|
+
if (null != child0 && walker.visitScalar(child0, node, "block")) return index;
|
|
4194
|
+
let child1 = node.handler;
|
|
4195
|
+
if (null != child1 && walker.visitScalar(child1, node, "handler")) return index;
|
|
4196
|
+
let child2 = node.finalizer;
|
|
4197
|
+
return null != child2 && walker.visitScalar(child2, node, "finalizer") ? index : "TryStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4198
|
+
},
|
|
4199
|
+
UnaryExpression: function(node, walker, parent, key, list, index) {
|
|
4200
|
+
let child0 = node.argument;
|
|
4201
|
+
return null != child0 && walker.visitScalar(child0, node, "argument") ? index : "UnaryExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4202
|
+
},
|
|
4203
|
+
UpdateExpression: function(node, walker, parent, key, list, index) {
|
|
4204
|
+
let child0 = node.argument;
|
|
4205
|
+
return null != child0 && walker.visitScalar(child0, node, "argument") ? index : "UpdateExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4206
|
+
},
|
|
4207
|
+
VariableDeclaration: function(node, walker, parent, key, list, index) {
|
|
4208
|
+
let child0 = node.declarations;
|
|
4209
|
+
return null != child0 && walker.visitListKnown(child0, node, "declarations", dispatchVariableDeclarator) ? index : "VariableDeclaration" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4210
|
+
},
|
|
4211
|
+
VariableDeclarator: function(node, walker, parent, key, list, index) {
|
|
4212
|
+
let child0 = node.id;
|
|
4213
|
+
if (null != child0 && walker.visitScalar(child0, node, "id")) return index;
|
|
4214
|
+
let child1 = node.init;
|
|
4215
|
+
return null != child1 && walker.visitScalar(child1, node, "init") ? index : "VariableDeclarator" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4216
|
+
},
|
|
4217
|
+
WhileStatement: function(node, walker, parent, key, list, index) {
|
|
4218
|
+
let child0 = node.test;
|
|
4219
|
+
if (null != child0 && walker.visitScalar(child0, node, "test")) return index;
|
|
4220
|
+
let child1 = node.body;
|
|
4221
|
+
return null != child1 && walker.visitScalar(child1, node, "body") ? index : "WhileStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4222
|
+
},
|
|
4223
|
+
WithStatement: function(node, walker, parent, key, list, index) {
|
|
4224
|
+
let child0 = node.object;
|
|
4225
|
+
if (null != child0 && walker.visitScalar(child0, node, "object")) return index;
|
|
4226
|
+
let child1 = node.body;
|
|
4227
|
+
return null != child1 && walker.visitScalar(child1, node, "body") ? index : "WithStatement" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4228
|
+
},
|
|
4229
|
+
YieldExpression: function(node, walker, parent, key, list, index) {
|
|
4230
|
+
let child0 = node.argument;
|
|
4231
|
+
return null != child0 && walker.visitScalar(child0, node, "argument") ? index : "YieldExpression" !== node.type ? walker.leaveChanged(node, parent, key, list, index) : index;
|
|
4232
|
+
}
|
|
4233
|
+
}), dispatchDecorator = function(node, walker, parent, key, list, index, walkers) {
|
|
4234
|
+
let type = node.type;
|
|
4235
|
+
if ("Decorator" !== type) {
|
|
4236
|
+
if ("string" != typeof type) throw TypeError(`Unsupported AST node type: ${type}`);
|
|
4237
|
+
let fallback = walkers[type];
|
|
4238
|
+
if (void 0 === fallback) throw TypeError(`Unsupported AST node type: ${type}`);
|
|
4239
|
+
return null === fallback ? index : fallback(node, walker, parent, key, list, index);
|
|
4240
|
+
}
|
|
4241
|
+
let visit = walkers.Decorator;
|
|
4242
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4243
|
+
}, dispatchExportSpecifier = function(node, walker, parent, key, list, index, walkers) {
|
|
4244
|
+
let type = node.type;
|
|
4245
|
+
if ("ExportSpecifier" !== type) {
|
|
4246
|
+
if ("string" != typeof type) throw TypeError(`Unsupported AST node type: ${type}`);
|
|
4247
|
+
let fallback = walkers[type];
|
|
4248
|
+
if (void 0 === fallback) throw TypeError(`Unsupported AST node type: ${type}`);
|
|
4249
|
+
return null === fallback ? index : fallback(node, walker, parent, key, list, index);
|
|
4250
|
+
}
|
|
4251
|
+
let visit = walkers.ExportSpecifier;
|
|
4252
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4253
|
+
}, dispatchImportAttribute = function(node, walker, parent, key, list, index, walkers) {
|
|
4254
|
+
let type = node.type;
|
|
4255
|
+
if ("ImportAttribute" !== type) {
|
|
4256
|
+
if ("string" != typeof type) throw TypeError(`Unsupported AST node type: ${type}`);
|
|
4257
|
+
let fallback = walkers[type];
|
|
4258
|
+
if (void 0 === fallback) throw TypeError(`Unsupported AST node type: ${type}`);
|
|
4259
|
+
return null === fallback ? index : fallback(node, walker, parent, key, list, index);
|
|
4260
|
+
}
|
|
4261
|
+
let visit = walkers.ImportAttribute;
|
|
4262
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4263
|
+
}, dispatchSwitchCase = function(node, walker, parent, key, list, index, walkers) {
|
|
4264
|
+
let type = node.type;
|
|
4265
|
+
if ("SwitchCase" !== type) {
|
|
4266
|
+
if ("string" != typeof type) throw TypeError(`Unsupported AST node type: ${type}`);
|
|
4267
|
+
let fallback = walkers[type];
|
|
4268
|
+
if (void 0 === fallback) throw TypeError(`Unsupported AST node type: ${type}`);
|
|
4269
|
+
return null === fallback ? index : fallback(node, walker, parent, key, list, index);
|
|
4270
|
+
}
|
|
4271
|
+
let visit = walkers.SwitchCase;
|
|
4272
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4273
|
+
}, dispatchTSEnumMember = function(node, walker, parent, key, list, index, walkers) {
|
|
4274
|
+
let type = node.type;
|
|
4275
|
+
if ("TSEnumMember" !== type) {
|
|
4276
|
+
if ("string" != typeof type) throw TypeError(`Unsupported AST node type: ${type}`);
|
|
4277
|
+
let fallback = walkers[type];
|
|
4278
|
+
if (void 0 === fallback) throw TypeError(`Unsupported AST node type: ${type}`);
|
|
4279
|
+
return null === fallback ? index : fallback(node, walker, parent, key, list, index);
|
|
4280
|
+
}
|
|
4281
|
+
let visit = walkers.TSEnumMember;
|
|
4282
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4283
|
+
}, dispatchTSInterfaceHeritage = function(node, walker, parent, key, list, index, walkers) {
|
|
4284
|
+
let type = node.type;
|
|
4285
|
+
if ("TSInterfaceHeritage" !== type) {
|
|
4286
|
+
if ("string" != typeof type) throw TypeError(`Unsupported AST node type: ${type}`);
|
|
4287
|
+
let fallback = walkers[type];
|
|
4288
|
+
if (void 0 === fallback) throw TypeError(`Unsupported AST node type: ${type}`);
|
|
4289
|
+
return null === fallback ? index : fallback(node, walker, parent, key, list, index);
|
|
4290
|
+
}
|
|
4291
|
+
let visit = walkers.TSInterfaceHeritage;
|
|
4292
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4293
|
+
}, dispatchTSTypeParameter = function(node, walker, parent, key, list, index, walkers) {
|
|
4294
|
+
let type = node.type;
|
|
4295
|
+
if ("TSTypeParameter" !== type) {
|
|
4296
|
+
if ("string" != typeof type) throw TypeError(`Unsupported AST node type: ${type}`);
|
|
4297
|
+
let fallback = walkers[type];
|
|
4298
|
+
if (void 0 === fallback) throw TypeError(`Unsupported AST node type: ${type}`);
|
|
4299
|
+
return null === fallback ? index : fallback(node, walker, parent, key, list, index);
|
|
4300
|
+
}
|
|
4301
|
+
let visit = walkers.TSTypeParameter;
|
|
4302
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4303
|
+
}, dispatchTemplateElement = function(node, walker, parent, key, list, index, walkers) {
|
|
4304
|
+
let type = node.type;
|
|
4305
|
+
if ("TemplateElement" !== type) {
|
|
4306
|
+
if ("string" != typeof type) throw TypeError(`Unsupported AST node type: ${type}`);
|
|
4307
|
+
let fallback = walkers[type];
|
|
4308
|
+
if (void 0 === fallback) throw TypeError(`Unsupported AST node type: ${type}`);
|
|
4309
|
+
return null === fallback ? index : fallback(node, walker, parent, key, list, index);
|
|
4310
|
+
}
|
|
4311
|
+
let visit = walkers.TemplateElement;
|
|
4312
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4313
|
+
}, dispatchVariableDeclarator = function(node, walker, parent, key, list, index, walkers) {
|
|
4314
|
+
let type = node.type;
|
|
4315
|
+
if ("VariableDeclarator" !== type) {
|
|
4316
|
+
if ("string" != typeof type) throw TypeError(`Unsupported AST node type: ${type}`);
|
|
4317
|
+
let fallback = walkers[type];
|
|
4318
|
+
if (void 0 === fallback) throw TypeError(`Unsupported AST node type: ${type}`);
|
|
4319
|
+
return null === fallback ? index : fallback(node, walker, parent, key, list, index);
|
|
4320
|
+
}
|
|
4321
|
+
let visit = walkers.VariableDeclarator;
|
|
4322
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4323
|
+
}, baseDispatch = Object.create(null);
|
|
4324
|
+
for (let [type, children] of Object.entries(childVisitors))baseDispatch[type] = {
|
|
4325
|
+
children,
|
|
4326
|
+
enter: null,
|
|
4327
|
+
leave: null
|
|
4328
|
+
};
|
|
4329
|
+
let aliases = {
|
|
4330
|
+
Function: [
|
|
4331
|
+
"FunctionDeclaration",
|
|
4332
|
+
"FunctionExpression",
|
|
4333
|
+
"ArrowFunctionExpression",
|
|
4334
|
+
"TSDeclareFunction",
|
|
4335
|
+
"TSEmptyBodyFunctionExpression"
|
|
4336
|
+
],
|
|
4337
|
+
Class: [
|
|
4338
|
+
"ClassDeclaration",
|
|
4339
|
+
"ClassExpression"
|
|
4340
|
+
]
|
|
4341
|
+
}, owns = (object, key)=>Object.prototype.hasOwnProperty.call(object, key), isNodeType = (type)=>void 0 !== baseDispatch[type];
|
|
4342
|
+
function assertNode(node) {
|
|
4343
|
+
if (!node || "object" != typeof node || !isNodeType(node.type)) throw TypeError(`Unsupported AST node type: ${node?.type}`);
|
|
4344
|
+
}
|
|
4345
|
+
function assertSync(result) {
|
|
4346
|
+
if (null != result && "function" == typeof result.then) throw Promise.resolve(result).catch(()=>{}), TypeError("AST hooks must be synchronous");
|
|
4347
|
+
if (void 0 !== result) throw TypeError("AST hooks must return undefined; use the context to edit nodes");
|
|
4348
|
+
}
|
|
4349
|
+
function walkEnter(node, walker, parent, key, list, index) {
|
|
4350
|
+
return walker.visitHooks(node, parent, key, list, index);
|
|
4351
|
+
}
|
|
4352
|
+
function walkLeave(node, walker, parent, key, list, index) {
|
|
4353
|
+
return walker.visitLeaveHooks(node, parent, key, list, index);
|
|
4354
|
+
}
|
|
4355
|
+
class WalkContext {
|
|
4356
|
+
#frame;
|
|
4357
|
+
#phase;
|
|
4358
|
+
#state;
|
|
4359
|
+
#ancestors = [];
|
|
4360
|
+
#depth = 0;
|
|
4361
|
+
#dispatch;
|
|
4362
|
+
#walkers;
|
|
4363
|
+
#globalEnter;
|
|
4364
|
+
#globalLeave;
|
|
4365
|
+
#storage = {
|
|
4366
|
+
node: null,
|
|
4367
|
+
parent: null,
|
|
4368
|
+
key: null,
|
|
4369
|
+
list: null,
|
|
4370
|
+
index: 0,
|
|
4371
|
+
after: 0,
|
|
4372
|
+
flags: 0
|
|
4373
|
+
};
|
|
4374
|
+
stopped = !1;
|
|
4375
|
+
constructor(state, compiled){
|
|
4376
|
+
this.#state = state, this.#dispatch = compiled.dispatch, this.#walkers = compiled.walkers, this.#globalEnter = compiled.globalEnter, this.#globalLeave = compiled.globalLeave;
|
|
4377
|
+
}
|
|
4378
|
+
#check() {
|
|
4379
|
+
let frame = this.#frame;
|
|
4380
|
+
if (void 0 === frame) throw Error("Walk context is only valid during its hook");
|
|
4381
|
+
return frame;
|
|
4382
|
+
}
|
|
4383
|
+
#editable() {
|
|
4384
|
+
let frame = this.#check();
|
|
4385
|
+
if (2 & frame.flags) throw Error("The current node has been removed");
|
|
4386
|
+
if (!frame.parent) throw Error("Cannot structurally edit the walk root");
|
|
4387
|
+
if (frame.list && frame.parent[frame.key] !== frame.list || (frame.list ? frame.list[frame.index] : frame.parent[frame.key]) !== frame.node) throw Error("The current node's container was changed outside the walk context");
|
|
4388
|
+
return frame;
|
|
4389
|
+
}
|
|
4390
|
+
get node() {
|
|
4391
|
+
return this.#check().node;
|
|
4392
|
+
}
|
|
4393
|
+
get parent() {
|
|
4394
|
+
return this.#check().parent;
|
|
4395
|
+
}
|
|
4396
|
+
get key() {
|
|
4397
|
+
return this.#check().key;
|
|
4398
|
+
}
|
|
4399
|
+
get index() {
|
|
4400
|
+
let frame = this.#check();
|
|
4401
|
+
return 2 & frame.flags || !frame.list ? null : frame.index;
|
|
4402
|
+
}
|
|
4403
|
+
get state() {
|
|
4404
|
+
return this.#check(), this.#state;
|
|
4405
|
+
}
|
|
4406
|
+
ancestors() {
|
|
4407
|
+
return this.#check(), this.#ancestors.slice(0, this.#depth);
|
|
4408
|
+
}
|
|
4409
|
+
skip() {
|
|
4410
|
+
if (this.#check(), "enter" !== this.#phase) throw Error("skip() is only valid in enter hooks");
|
|
4411
|
+
this.#frame.flags |= 1;
|
|
4412
|
+
}
|
|
4413
|
+
stop() {
|
|
4414
|
+
this.#check(), this.stopped = !0;
|
|
4415
|
+
}
|
|
4416
|
+
replace(node) {
|
|
4417
|
+
let frame = this.#editable();
|
|
4418
|
+
assertNode(node), node !== frame.node && (null == node.start && (node.start = frame.node.start), null == node.end && (node.end = frame.node.end), frame.list ? frame.list[frame.index] = node : frame.parent[frame.key] = node, frame.node = node, frame.flags |= 4);
|
|
4419
|
+
}
|
|
4420
|
+
remove() {
|
|
4421
|
+
let frame = this.#editable();
|
|
4422
|
+
if (!frame.list) throw Error("Removal requires an array element");
|
|
4423
|
+
frame.list.splice(frame.index, 1), frame.index--, frame.flags |= 2;
|
|
4424
|
+
}
|
|
4425
|
+
#insert(nodes, after) {
|
|
4426
|
+
let count, frame = this.#editable();
|
|
4427
|
+
if (!frame.list) throw Error("Insertion requires an array element");
|
|
4428
|
+
let index = frame.index + (after ? 1 + frame.after : 0);
|
|
4429
|
+
Array.isArray(nodes) ? (nodes.forEach(assertNode), frame.list.splice(index, 0, ...nodes), count = nodes.length) : (assertNode(nodes), frame.list.splice(index, 0, nodes), count = 1), after ? frame.after += count : frame.index += count;
|
|
4430
|
+
}
|
|
4431
|
+
insertBefore(nodes) {
|
|
4432
|
+
this.#insert(nodes, !1);
|
|
4433
|
+
}
|
|
4434
|
+
insertAfter(nodes) {
|
|
4435
|
+
this.#insert(nodes, !0);
|
|
4436
|
+
}
|
|
4437
|
+
invoke(handlers, frame, phase) {
|
|
4438
|
+
if (this.#frame = frame, this.#phase = phase, "function" == typeof handlers) assertSync(handlers(frame.node, this));
|
|
4439
|
+
else for(let i = 0; i < handlers.length && (assertSync((0, handlers[i])(frame.node, this)), !this.stopped && !(6 & frame.flags) && ("enter" !== phase || !(1 & frame.flags))); i++);
|
|
4440
|
+
this.#frame = void 0;
|
|
4441
|
+
}
|
|
4442
|
+
reset() {
|
|
4443
|
+
this.#frame = void 0, this.#ancestors.length = 0, this.#depth = 0, this.#storage.node = this.#storage.parent = this.#storage.list = null, this.#dispatch = this.#walkers = this.#globalEnter = this.#globalLeave = void 0;
|
|
4444
|
+
}
|
|
4445
|
+
#prepare(node, parent, key, list, index, after) {
|
|
4446
|
+
let frame = this.#storage;
|
|
4447
|
+
frame.node = node, frame.parent = parent, frame.key = key, frame.list = list, frame.index = index, frame.after = after, frame.flags = 0;
|
|
4448
|
+
}
|
|
4449
|
+
visitScalar(value, parent, key) {
|
|
4450
|
+
return this.#ancestors[this.#depth++] = parent, this.visit(value, parent, key, null, 0), this.#depth--, this.stopped;
|
|
4451
|
+
}
|
|
4452
|
+
visitListKnown(value, parent, key, dispatch) {
|
|
4453
|
+
this.#ancestors[this.#depth++] = parent;
|
|
4454
|
+
for(let i = 0; i < value.length; i++){
|
|
4455
|
+
let child = value[i];
|
|
4456
|
+
if (null != child && ("object" != typeof child && assertNode(child), i = dispatch(child, this, parent, key, value, i, this.#walkers)), this.stopped) return !0;
|
|
4457
|
+
}
|
|
4458
|
+
return this.#depth--, this.stopped;
|
|
4459
|
+
}
|
|
4460
|
+
visitList(value, parent, key) {
|
|
4461
|
+
this.#ancestors[this.#depth++] = parent;
|
|
4462
|
+
for(let i = 0; i < value.length; i++){
|
|
4463
|
+
let child = value[i];
|
|
4464
|
+
if (null != child && (i = this.visit(child, parent, key, value, i)), this.stopped) return !0;
|
|
4465
|
+
}
|
|
4466
|
+
return this.#depth--, this.stopped;
|
|
4467
|
+
}
|
|
4468
|
+
visit(node, parent, key, list, index) {
|
|
4469
|
+
return "object" != typeof node && assertNode(node), function(node, walker, parent, key, list, index, walkers) {
|
|
4470
|
+
let type = node.type;
|
|
4471
|
+
if ("Identifier" === type) {
|
|
4472
|
+
let visit = walkers.Identifier;
|
|
4473
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4474
|
+
}
|
|
4475
|
+
switch("string" == typeof type ? type.length : -1){
|
|
4476
|
+
case 5:
|
|
4477
|
+
if ("Super" === type) {
|
|
4478
|
+
let visit = walkers.Super;
|
|
4479
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4480
|
+
}
|
|
4481
|
+
break;
|
|
4482
|
+
case 7:
|
|
4483
|
+
switch(type){
|
|
4484
|
+
case "JSXText":
|
|
4485
|
+
{
|
|
4486
|
+
let visit = walkers.JSXText;
|
|
4487
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4488
|
+
}
|
|
4489
|
+
case "Literal":
|
|
4490
|
+
{
|
|
4491
|
+
let visit = walkers.Literal;
|
|
4492
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4493
|
+
}
|
|
4494
|
+
case "Program":
|
|
4495
|
+
{
|
|
4496
|
+
let visit = walkers.Program;
|
|
4497
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4498
|
+
}
|
|
4499
|
+
}
|
|
4500
|
+
break;
|
|
4501
|
+
case 8:
|
|
4502
|
+
switch(type){
|
|
4503
|
+
case "Hashbang":
|
|
4504
|
+
{
|
|
4505
|
+
let visit = walkers.Hashbang;
|
|
4506
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4507
|
+
}
|
|
4508
|
+
case "Property":
|
|
4509
|
+
{
|
|
4510
|
+
let visit = walkers.Property;
|
|
4511
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4512
|
+
}
|
|
4513
|
+
}
|
|
4514
|
+
break;
|
|
4515
|
+
case 9:
|
|
4516
|
+
switch(type){
|
|
4517
|
+
case "ClassBody":
|
|
4518
|
+
{
|
|
4519
|
+
let visit = walkers.ClassBody;
|
|
4520
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4521
|
+
}
|
|
4522
|
+
case "Decorator":
|
|
4523
|
+
{
|
|
4524
|
+
let visit = walkers.Decorator;
|
|
4525
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4526
|
+
}
|
|
4527
|
+
}
|
|
4528
|
+
break;
|
|
4529
|
+
case 10:
|
|
4530
|
+
switch(type){
|
|
4531
|
+
case "JSXElement":
|
|
4532
|
+
{
|
|
4533
|
+
let visit = walkers.JSXElement;
|
|
4534
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4535
|
+
}
|
|
4536
|
+
case "SwitchCase":
|
|
4537
|
+
{
|
|
4538
|
+
let visit = walkers.SwitchCase;
|
|
4539
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4540
|
+
}
|
|
4541
|
+
case "TSEnumBody":
|
|
4542
|
+
{
|
|
4543
|
+
let visit = walkers.TSEnumBody;
|
|
4544
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4545
|
+
}
|
|
4546
|
+
case "TSRestType":
|
|
4547
|
+
{
|
|
4548
|
+
let visit = walkers.TSRestType;
|
|
4549
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4550
|
+
}
|
|
4551
|
+
case "TSThisType":
|
|
4552
|
+
{
|
|
4553
|
+
let visit = walkers.TSThisType;
|
|
4554
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4555
|
+
}
|
|
4556
|
+
}
|
|
4557
|
+
break;
|
|
4558
|
+
case 11:
|
|
4559
|
+
switch(type){
|
|
4560
|
+
case "CatchClause":
|
|
4561
|
+
{
|
|
4562
|
+
let visit = walkers.CatchClause;
|
|
4563
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4564
|
+
}
|
|
4565
|
+
case "IfStatement":
|
|
4566
|
+
{
|
|
4567
|
+
let visit = walkers.IfStatement;
|
|
4568
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4569
|
+
}
|
|
4570
|
+
case "JSXFragment":
|
|
4571
|
+
{
|
|
4572
|
+
let visit = walkers.JSXFragment;
|
|
4573
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4574
|
+
}
|
|
4575
|
+
case "RestElement":
|
|
4576
|
+
{
|
|
4577
|
+
let visit = walkers.RestElement;
|
|
4578
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4579
|
+
}
|
|
4580
|
+
case "StaticBlock":
|
|
4581
|
+
{
|
|
4582
|
+
let visit = walkers.StaticBlock;
|
|
4583
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4584
|
+
}
|
|
4585
|
+
case "TSArrayType":
|
|
4586
|
+
{
|
|
4587
|
+
let visit = walkers.TSArrayType;
|
|
4588
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4589
|
+
}
|
|
4590
|
+
case "TSInferType":
|
|
4591
|
+
{
|
|
4592
|
+
let visit = walkers.TSInferType;
|
|
4593
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4594
|
+
}
|
|
4595
|
+
case "TSTupleType":
|
|
4596
|
+
{
|
|
4597
|
+
let visit = walkers.TSTupleType;
|
|
4598
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4599
|
+
}
|
|
4600
|
+
case "TSTypeQuery":
|
|
4601
|
+
{
|
|
4602
|
+
let visit = walkers.TSTypeQuery;
|
|
4603
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4604
|
+
}
|
|
4605
|
+
case "TSUnionType":
|
|
4606
|
+
{
|
|
4607
|
+
let visit = walkers.TSUnionType;
|
|
4608
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4609
|
+
}
|
|
4610
|
+
}
|
|
4611
|
+
break;
|
|
4612
|
+
case 12:
|
|
4613
|
+
switch(type){
|
|
4614
|
+
case "ArrayPattern":
|
|
4615
|
+
{
|
|
4616
|
+
let visit = walkers.ArrayPattern;
|
|
4617
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4618
|
+
}
|
|
4619
|
+
case "ForStatement":
|
|
4620
|
+
{
|
|
4621
|
+
let visit = walkers.ForStatement;
|
|
4622
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4623
|
+
}
|
|
4624
|
+
case "JSXAttribute":
|
|
4625
|
+
{
|
|
4626
|
+
let visit = walkers.JSXAttribute;
|
|
4627
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4628
|
+
}
|
|
4629
|
+
case "MetaProperty":
|
|
4630
|
+
{
|
|
4631
|
+
let visit = walkers.MetaProperty;
|
|
4632
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4633
|
+
}
|
|
4634
|
+
case "TSAnyKeyword":
|
|
4635
|
+
{
|
|
4636
|
+
let visit = walkers.TSAnyKeyword;
|
|
4637
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4638
|
+
}
|
|
4639
|
+
case "TSEnumMember":
|
|
4640
|
+
{
|
|
4641
|
+
let visit = walkers.TSEnumMember;
|
|
4642
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4643
|
+
}
|
|
4644
|
+
case "TSImportType":
|
|
4645
|
+
{
|
|
4646
|
+
let visit = walkers.TSImportType;
|
|
4647
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4648
|
+
}
|
|
4649
|
+
case "TSMappedType":
|
|
4650
|
+
{
|
|
4651
|
+
let visit = walkers.TSMappedType;
|
|
4652
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4653
|
+
}
|
|
4654
|
+
case "TryStatement":
|
|
4655
|
+
{
|
|
4656
|
+
let visit = walkers.TryStatement;
|
|
4657
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4658
|
+
}
|
|
4659
|
+
}
|
|
4660
|
+
break;
|
|
4661
|
+
case 13:
|
|
4662
|
+
switch(type){
|
|
4663
|
+
case "JSXIdentifier":
|
|
4664
|
+
{
|
|
4665
|
+
let visit = walkers.JSXIdentifier;
|
|
4666
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4667
|
+
}
|
|
4668
|
+
case "NewExpression":
|
|
4669
|
+
{
|
|
4670
|
+
let visit = walkers.NewExpression;
|
|
4671
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4672
|
+
}
|
|
4673
|
+
case "ObjectPattern":
|
|
4674
|
+
{
|
|
4675
|
+
let visit = walkers.ObjectPattern;
|
|
4676
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4677
|
+
}
|
|
4678
|
+
case "SpreadElement":
|
|
4679
|
+
{
|
|
4680
|
+
let visit = walkers.SpreadElement;
|
|
4681
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4682
|
+
}
|
|
4683
|
+
case "TSLiteralType":
|
|
4684
|
+
{
|
|
4685
|
+
let visit = walkers.TSLiteralType;
|
|
4686
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4687
|
+
}
|
|
4688
|
+
case "TSModuleBlock":
|
|
4689
|
+
{
|
|
4690
|
+
let visit = walkers.TSModuleBlock;
|
|
4691
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4692
|
+
}
|
|
4693
|
+
case "TSNullKeyword":
|
|
4694
|
+
{
|
|
4695
|
+
let visit = walkers.TSNullKeyword;
|
|
4696
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4697
|
+
}
|
|
4698
|
+
case "TSTypeLiteral":
|
|
4699
|
+
{
|
|
4700
|
+
let visit = walkers.TSTypeLiteral;
|
|
4701
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4702
|
+
}
|
|
4703
|
+
case "TSVoidKeyword":
|
|
4704
|
+
{
|
|
4705
|
+
let visit = walkers.TSVoidKeyword;
|
|
4706
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4707
|
+
}
|
|
4708
|
+
case "WithStatement":
|
|
4709
|
+
{
|
|
4710
|
+
let visit = walkers.WithStatement;
|
|
4711
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4712
|
+
}
|
|
4713
|
+
}
|
|
4714
|
+
break;
|
|
4715
|
+
case 14:
|
|
4716
|
+
switch(type){
|
|
4717
|
+
case "BlockStatement":
|
|
4718
|
+
{
|
|
4719
|
+
let visit = walkers.BlockStatement;
|
|
4720
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4721
|
+
}
|
|
4722
|
+
case "BreakStatement":
|
|
4723
|
+
{
|
|
4724
|
+
let visit = walkers.BreakStatement;
|
|
4725
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4726
|
+
}
|
|
4727
|
+
case "CallExpression":
|
|
4728
|
+
{
|
|
4729
|
+
let visit = walkers.CallExpression;
|
|
4730
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4731
|
+
}
|
|
4732
|
+
case "EmptyStatement":
|
|
4733
|
+
{
|
|
4734
|
+
let visit = walkers.EmptyStatement;
|
|
4735
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4736
|
+
}
|
|
4737
|
+
case "ForInStatement":
|
|
4738
|
+
{
|
|
4739
|
+
let visit = walkers.ForInStatement;
|
|
4740
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4741
|
+
}
|
|
4742
|
+
case "ForOfStatement":
|
|
4743
|
+
{
|
|
4744
|
+
let visit = walkers.ForOfStatement;
|
|
4745
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4746
|
+
}
|
|
4747
|
+
case "JSXSpreadChild":
|
|
4748
|
+
{
|
|
4749
|
+
let visit = walkers.JSXSpreadChild;
|
|
4750
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4751
|
+
}
|
|
4752
|
+
case "TSAsExpression":
|
|
4753
|
+
{
|
|
4754
|
+
let visit = walkers.TSAsExpression;
|
|
4755
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4756
|
+
}
|
|
4757
|
+
case "TSFunctionType":
|
|
4758
|
+
{
|
|
4759
|
+
let visit = walkers.TSFunctionType;
|
|
4760
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4761
|
+
}
|
|
4762
|
+
case "TSNeverKeyword":
|
|
4763
|
+
{
|
|
4764
|
+
let visit = walkers.TSNeverKeyword;
|
|
4765
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4766
|
+
}
|
|
4767
|
+
case "TSOptionalType":
|
|
4768
|
+
{
|
|
4769
|
+
let visit = walkers.TSOptionalType;
|
|
4770
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4771
|
+
}
|
|
4772
|
+
case "TSTypeOperator":
|
|
4773
|
+
{
|
|
4774
|
+
let visit = walkers.TSTypeOperator;
|
|
4775
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4776
|
+
}
|
|
4777
|
+
case "ThisExpression":
|
|
4778
|
+
{
|
|
4779
|
+
let visit = walkers.ThisExpression;
|
|
4780
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4781
|
+
}
|
|
4782
|
+
case "ThrowStatement":
|
|
4783
|
+
{
|
|
4784
|
+
let visit = walkers.ThrowStatement;
|
|
4785
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4786
|
+
}
|
|
4787
|
+
case "WhileStatement":
|
|
4788
|
+
{
|
|
4789
|
+
let visit = walkers.WhileStatement;
|
|
4790
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4791
|
+
}
|
|
4792
|
+
}
|
|
4793
|
+
break;
|
|
4794
|
+
case 15:
|
|
4795
|
+
switch(type.charCodeAt(2)){
|
|
4796
|
+
case 66:
|
|
4797
|
+
if ("TSBigIntKeyword" === type) {
|
|
4798
|
+
let visit = walkers.TSBigIntKeyword;
|
|
4799
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4800
|
+
}
|
|
4801
|
+
break;
|
|
4802
|
+
case 73:
|
|
4803
|
+
if ("TSInterfaceBody" === type) {
|
|
4804
|
+
let visit = walkers.TSInterfaceBody;
|
|
4805
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4806
|
+
}
|
|
4807
|
+
break;
|
|
4808
|
+
case 78:
|
|
4809
|
+
if ("TSNumberKeyword" === type) {
|
|
4810
|
+
let visit = walkers.TSNumberKeyword;
|
|
4811
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4812
|
+
}
|
|
4813
|
+
break;
|
|
4814
|
+
case 79:
|
|
4815
|
+
if ("TSObjectKeyword" === type) {
|
|
4816
|
+
let visit = walkers.TSObjectKeyword;
|
|
4817
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4818
|
+
}
|
|
4819
|
+
break;
|
|
4820
|
+
case 81:
|
|
4821
|
+
if ("TSQualifiedName" === type) {
|
|
4822
|
+
let visit = walkers.TSQualifiedName;
|
|
4823
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4824
|
+
}
|
|
4825
|
+
break;
|
|
4826
|
+
case 83:
|
|
4827
|
+
switch(type){
|
|
4828
|
+
case "TSStringKeyword":
|
|
4829
|
+
{
|
|
4830
|
+
let visit = walkers.TSStringKeyword;
|
|
4831
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4832
|
+
}
|
|
4833
|
+
case "TSSymbolKeyword":
|
|
4834
|
+
{
|
|
4835
|
+
let visit = walkers.TSSymbolKeyword;
|
|
4836
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4837
|
+
}
|
|
4838
|
+
}
|
|
4839
|
+
break;
|
|
4840
|
+
case 84:
|
|
4841
|
+
switch(type){
|
|
4842
|
+
case "TSTypeAssertion":
|
|
4843
|
+
{
|
|
4844
|
+
let visit = walkers.TSTypeAssertion;
|
|
4845
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4846
|
+
}
|
|
4847
|
+
case "TSTypeParameter":
|
|
4848
|
+
{
|
|
4849
|
+
let visit = walkers.TSTypeParameter;
|
|
4850
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4851
|
+
}
|
|
4852
|
+
case "TSTypePredicate":
|
|
4853
|
+
{
|
|
4854
|
+
let visit = walkers.TSTypePredicate;
|
|
4855
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4856
|
+
}
|
|
4857
|
+
case "TSTypeReference":
|
|
4858
|
+
{
|
|
4859
|
+
let visit = walkers.TSTypeReference;
|
|
4860
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4861
|
+
}
|
|
4862
|
+
}
|
|
4863
|
+
break;
|
|
4864
|
+
case 97:
|
|
4865
|
+
switch(type){
|
|
4866
|
+
case "AwaitExpression":
|
|
4867
|
+
{
|
|
4868
|
+
let visit = walkers.AwaitExpression;
|
|
4869
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4870
|
+
}
|
|
4871
|
+
case "ChainExpression":
|
|
4872
|
+
{
|
|
4873
|
+
let visit = walkers.ChainExpression;
|
|
4874
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4875
|
+
}
|
|
4876
|
+
case "ClassExpression":
|
|
4877
|
+
{
|
|
4878
|
+
let visit = walkers.ClassExpression;
|
|
4879
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4880
|
+
}
|
|
4881
|
+
case "UnaryExpression":
|
|
4882
|
+
{
|
|
4883
|
+
let visit = walkers.UnaryExpression;
|
|
4884
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4885
|
+
}
|
|
4886
|
+
}
|
|
4887
|
+
break;
|
|
4888
|
+
case 101:
|
|
4889
|
+
if ("YieldExpression" === type) {
|
|
4890
|
+
let visit = walkers.YieldExpression;
|
|
4891
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4892
|
+
}
|
|
4893
|
+
break;
|
|
4894
|
+
case 105:
|
|
4895
|
+
if ("SwitchStatement" === type) {
|
|
4896
|
+
let visit = walkers.SwitchStatement;
|
|
4897
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4898
|
+
}
|
|
4899
|
+
break;
|
|
4900
|
+
case 109:
|
|
4901
|
+
switch(type){
|
|
4902
|
+
case "TemplateElement":
|
|
4903
|
+
{
|
|
4904
|
+
let visit = walkers.TemplateElement;
|
|
4905
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4906
|
+
}
|
|
4907
|
+
case "TemplateLiteral":
|
|
4908
|
+
{
|
|
4909
|
+
let visit = walkers.TemplateLiteral;
|
|
4910
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4911
|
+
}
|
|
4912
|
+
}
|
|
4913
|
+
break;
|
|
4914
|
+
case 112:
|
|
4915
|
+
switch(type){
|
|
4916
|
+
case "ExportSpecifier":
|
|
4917
|
+
{
|
|
4918
|
+
let visit = walkers.ExportSpecifier;
|
|
4919
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4920
|
+
}
|
|
4921
|
+
case "ImportAttribute":
|
|
4922
|
+
{
|
|
4923
|
+
let visit = walkers.ImportAttribute;
|
|
4924
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4925
|
+
}
|
|
4926
|
+
case "ImportSpecifier":
|
|
4927
|
+
{
|
|
4928
|
+
let visit = walkers.ImportSpecifier;
|
|
4929
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4930
|
+
}
|
|
4931
|
+
}
|
|
4932
|
+
break;
|
|
4933
|
+
case 114:
|
|
4934
|
+
if ("ArrayExpression" === type) {
|
|
4935
|
+
let visit = walkers.ArrayExpression;
|
|
4936
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4937
|
+
}
|
|
4938
|
+
break;
|
|
4939
|
+
case 116:
|
|
4940
|
+
if ("ReturnStatement" === type) {
|
|
4941
|
+
let visit = walkers.ReturnStatement;
|
|
4942
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4943
|
+
}
|
|
4944
|
+
}
|
|
4945
|
+
break;
|
|
4946
|
+
case 16:
|
|
4947
|
+
switch(type){
|
|
4948
|
+
case "AccessorProperty":
|
|
4949
|
+
{
|
|
4950
|
+
let visit = walkers.AccessorProperty;
|
|
4951
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4952
|
+
}
|
|
4953
|
+
case "BinaryExpression":
|
|
4954
|
+
{
|
|
4955
|
+
let visit = walkers.BinaryExpression;
|
|
4956
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4957
|
+
}
|
|
4958
|
+
case "ClassDeclaration":
|
|
4959
|
+
{
|
|
4960
|
+
let visit = walkers.ClassDeclaration;
|
|
4961
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4962
|
+
}
|
|
4963
|
+
case "DoWhileStatement":
|
|
4964
|
+
{
|
|
4965
|
+
let visit = walkers.DoWhileStatement;
|
|
4966
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4967
|
+
}
|
|
4968
|
+
case "ImportExpression":
|
|
4969
|
+
{
|
|
4970
|
+
let visit = walkers.ImportExpression;
|
|
4971
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4972
|
+
}
|
|
4973
|
+
case "LabeledStatement":
|
|
4974
|
+
{
|
|
4975
|
+
let visit = walkers.LabeledStatement;
|
|
4976
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4977
|
+
}
|
|
4978
|
+
case "MemberExpression":
|
|
4979
|
+
{
|
|
4980
|
+
let visit = walkers.MemberExpression;
|
|
4981
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4982
|
+
}
|
|
4983
|
+
case "MethodDefinition":
|
|
4984
|
+
{
|
|
4985
|
+
let visit = walkers.MethodDefinition;
|
|
4986
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4987
|
+
}
|
|
4988
|
+
case "ObjectExpression":
|
|
4989
|
+
{
|
|
4990
|
+
let visit = walkers.ObjectExpression;
|
|
4991
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4992
|
+
}
|
|
4993
|
+
case "TSBooleanKeyword":
|
|
4994
|
+
{
|
|
4995
|
+
let visit = walkers.TSBooleanKeyword;
|
|
4996
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
4997
|
+
}
|
|
4998
|
+
case "TSIndexSignature":
|
|
4999
|
+
{
|
|
5000
|
+
let visit = walkers.TSIndexSignature;
|
|
5001
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5002
|
+
}
|
|
5003
|
+
case "TSTypeAnnotation":
|
|
5004
|
+
{
|
|
5005
|
+
let visit = walkers.TSTypeAnnotation;
|
|
5006
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5007
|
+
}
|
|
5008
|
+
case "TSUnknownKeyword":
|
|
5009
|
+
{
|
|
5010
|
+
let visit = walkers.TSUnknownKeyword;
|
|
5011
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5012
|
+
}
|
|
5013
|
+
case "UpdateExpression":
|
|
5014
|
+
{
|
|
5015
|
+
let visit = walkers.UpdateExpression;
|
|
5016
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5017
|
+
}
|
|
5018
|
+
}
|
|
5019
|
+
break;
|
|
5020
|
+
case 17:
|
|
5021
|
+
switch(type){
|
|
5022
|
+
case "AssignmentPattern":
|
|
5023
|
+
{
|
|
5024
|
+
let visit = walkers.AssignmentPattern;
|
|
5025
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5026
|
+
}
|
|
5027
|
+
case "ContinueStatement":
|
|
5028
|
+
{
|
|
5029
|
+
let visit = walkers.ContinueStatement;
|
|
5030
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5031
|
+
}
|
|
5032
|
+
case "DebuggerStatement":
|
|
5033
|
+
{
|
|
5034
|
+
let visit = walkers.DebuggerStatement;
|
|
5035
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5036
|
+
}
|
|
5037
|
+
case "ImportDeclaration":
|
|
5038
|
+
{
|
|
5039
|
+
let visit = walkers.ImportDeclaration;
|
|
5040
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5041
|
+
}
|
|
5042
|
+
case "JSXClosingElement":
|
|
5043
|
+
{
|
|
5044
|
+
let visit = walkers.JSXClosingElement;
|
|
5045
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5046
|
+
}
|
|
5047
|
+
case "JSXNamespacedName":
|
|
5048
|
+
{
|
|
5049
|
+
let visit = walkers.JSXNamespacedName;
|
|
5050
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5051
|
+
}
|
|
5052
|
+
case "JSXOpeningElement":
|
|
5053
|
+
{
|
|
5054
|
+
let visit = walkers.JSXOpeningElement;
|
|
5055
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5056
|
+
}
|
|
5057
|
+
case "LogicalExpression":
|
|
5058
|
+
{
|
|
5059
|
+
let visit = walkers.LogicalExpression;
|
|
5060
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5061
|
+
}
|
|
5062
|
+
case "PrivateIdentifier":
|
|
5063
|
+
{
|
|
5064
|
+
let visit = walkers.PrivateIdentifier;
|
|
5065
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5066
|
+
}
|
|
5067
|
+
case "TSClassImplements":
|
|
5068
|
+
{
|
|
5069
|
+
let visit = walkers.TSClassImplements;
|
|
5070
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5071
|
+
}
|
|
5072
|
+
case "TSConditionalType":
|
|
5073
|
+
{
|
|
5074
|
+
let visit = walkers.TSConditionalType;
|
|
5075
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5076
|
+
}
|
|
5077
|
+
case "TSConstructorType":
|
|
5078
|
+
{
|
|
5079
|
+
let visit = walkers.TSConstructorType;
|
|
5080
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5081
|
+
}
|
|
5082
|
+
case "TSDeclareFunction":
|
|
5083
|
+
{
|
|
5084
|
+
let visit = walkers.TSDeclareFunction;
|
|
5085
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5086
|
+
}
|
|
5087
|
+
case "TSEnumDeclaration":
|
|
5088
|
+
{
|
|
5089
|
+
let visit = walkers.TSEnumDeclaration;
|
|
5090
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5091
|
+
}
|
|
5092
|
+
case "TSMethodSignature":
|
|
5093
|
+
{
|
|
5094
|
+
let visit = walkers.TSMethodSignature;
|
|
5095
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5096
|
+
}
|
|
5097
|
+
}
|
|
5098
|
+
break;
|
|
5099
|
+
case 18:
|
|
5100
|
+
switch(type){
|
|
5101
|
+
case "FunctionExpression":
|
|
5102
|
+
{
|
|
5103
|
+
let visit = walkers.FunctionExpression;
|
|
5104
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5105
|
+
}
|
|
5106
|
+
case "JSXClosingFragment":
|
|
5107
|
+
{
|
|
5108
|
+
let visit = walkers.JSXClosingFragment;
|
|
5109
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5110
|
+
}
|
|
5111
|
+
case "JSXEmptyExpression":
|
|
5112
|
+
{
|
|
5113
|
+
let visit = walkers.JSXEmptyExpression;
|
|
5114
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5115
|
+
}
|
|
5116
|
+
case "JSXOpeningFragment":
|
|
5117
|
+
{
|
|
5118
|
+
let visit = walkers.JSXOpeningFragment;
|
|
5119
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5120
|
+
}
|
|
5121
|
+
case "JSXSpreadAttribute":
|
|
5122
|
+
{
|
|
5123
|
+
let visit = walkers.JSXSpreadAttribute;
|
|
5124
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5125
|
+
}
|
|
5126
|
+
case "PropertyDefinition":
|
|
5127
|
+
{
|
|
5128
|
+
let visit = walkers.PropertyDefinition;
|
|
5129
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5130
|
+
}
|
|
5131
|
+
case "SequenceExpression":
|
|
5132
|
+
{
|
|
5133
|
+
let visit = walkers.SequenceExpression;
|
|
5134
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5135
|
+
}
|
|
5136
|
+
case "TSExportAssignment":
|
|
5137
|
+
{
|
|
5138
|
+
let visit = walkers.TSExportAssignment;
|
|
5139
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5140
|
+
}
|
|
5141
|
+
case "TSIntersectionType":
|
|
5142
|
+
{
|
|
5143
|
+
let visit = walkers.TSIntersectionType;
|
|
5144
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5145
|
+
}
|
|
5146
|
+
case "TSIntrinsicKeyword":
|
|
5147
|
+
{
|
|
5148
|
+
let visit = walkers.TSIntrinsicKeyword;
|
|
5149
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5150
|
+
}
|
|
5151
|
+
case "TSJSDocUnknownType":
|
|
5152
|
+
{
|
|
5153
|
+
let visit = walkers.TSJSDocUnknownType;
|
|
5154
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5155
|
+
}
|
|
5156
|
+
case "TSNamedTupleMember":
|
|
5157
|
+
{
|
|
5158
|
+
let visit = walkers.TSNamedTupleMember;
|
|
5159
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5160
|
+
}
|
|
5161
|
+
case "TSUndefinedKeyword":
|
|
5162
|
+
{
|
|
5163
|
+
let visit = walkers.TSUndefinedKeyword;
|
|
5164
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5165
|
+
}
|
|
5166
|
+
case "VariableDeclarator":
|
|
5167
|
+
{
|
|
5168
|
+
let visit = walkers.VariableDeclarator;
|
|
5169
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5170
|
+
}
|
|
5171
|
+
}
|
|
5172
|
+
break;
|
|
5173
|
+
case 19:
|
|
5174
|
+
switch(type){
|
|
5175
|
+
case "ExpressionStatement":
|
|
5176
|
+
{
|
|
5177
|
+
let visit = walkers.ExpressionStatement;
|
|
5178
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5179
|
+
}
|
|
5180
|
+
case "FunctionDeclaration":
|
|
5181
|
+
{
|
|
5182
|
+
let visit = walkers.FunctionDeclaration;
|
|
5183
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5184
|
+
}
|
|
5185
|
+
case "JSXMemberExpression":
|
|
5186
|
+
{
|
|
5187
|
+
let visit = walkers.JSXMemberExpression;
|
|
5188
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5189
|
+
}
|
|
5190
|
+
case "TSIndexedAccessType":
|
|
5191
|
+
{
|
|
5192
|
+
let visit = walkers.TSIndexedAccessType;
|
|
5193
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5194
|
+
}
|
|
5195
|
+
case "TSInterfaceHeritage":
|
|
5196
|
+
{
|
|
5197
|
+
let visit = walkers.TSInterfaceHeritage;
|
|
5198
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5199
|
+
}
|
|
5200
|
+
case "TSJSDocNullableType":
|
|
5201
|
+
{
|
|
5202
|
+
let visit = walkers.TSJSDocNullableType;
|
|
5203
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5204
|
+
}
|
|
5205
|
+
case "TSModuleDeclaration":
|
|
5206
|
+
{
|
|
5207
|
+
let visit = walkers.TSModuleDeclaration;
|
|
5208
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5209
|
+
}
|
|
5210
|
+
case "TSNonNullExpression":
|
|
5211
|
+
{
|
|
5212
|
+
let visit = walkers.TSNonNullExpression;
|
|
5213
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5214
|
+
}
|
|
5215
|
+
case "TSParameterProperty":
|
|
5216
|
+
{
|
|
5217
|
+
let visit = walkers.TSParameterProperty;
|
|
5218
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5219
|
+
}
|
|
5220
|
+
case "TSParenthesizedType":
|
|
5221
|
+
{
|
|
5222
|
+
let visit = walkers.TSParenthesizedType;
|
|
5223
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5224
|
+
}
|
|
5225
|
+
case "TSPropertySignature":
|
|
5226
|
+
{
|
|
5227
|
+
let visit = walkers.TSPropertySignature;
|
|
5228
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5229
|
+
}
|
|
5230
|
+
case "VariableDeclaration":
|
|
5231
|
+
{
|
|
5232
|
+
let visit = walkers.VariableDeclaration;
|
|
5233
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5234
|
+
}
|
|
5235
|
+
}
|
|
5236
|
+
break;
|
|
5237
|
+
case 20:
|
|
5238
|
+
switch(type){
|
|
5239
|
+
case "AssignmentExpression":
|
|
5240
|
+
{
|
|
5241
|
+
let visit = walkers.AssignmentExpression;
|
|
5242
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5243
|
+
}
|
|
5244
|
+
case "ExportAllDeclaration":
|
|
5245
|
+
{
|
|
5246
|
+
let visit = walkers.ExportAllDeclaration;
|
|
5247
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5248
|
+
}
|
|
5249
|
+
}
|
|
5250
|
+
break;
|
|
5251
|
+
case 21:
|
|
5252
|
+
switch(type){
|
|
5253
|
+
case "ConditionalExpression":
|
|
5254
|
+
{
|
|
5255
|
+
let visit = walkers.ConditionalExpression;
|
|
5256
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5257
|
+
}
|
|
5258
|
+
case "TSSatisfiesExpression":
|
|
5259
|
+
{
|
|
5260
|
+
let visit = walkers.TSSatisfiesExpression;
|
|
5261
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5262
|
+
}
|
|
5263
|
+
case "TSTemplateLiteralType":
|
|
5264
|
+
{
|
|
5265
|
+
let visit = walkers.TSTemplateLiteralType;
|
|
5266
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5267
|
+
}
|
|
5268
|
+
}
|
|
5269
|
+
break;
|
|
5270
|
+
case 22:
|
|
5271
|
+
switch(type){
|
|
5272
|
+
case "ExportNamedDeclaration":
|
|
5273
|
+
{
|
|
5274
|
+
let visit = walkers.ExportNamedDeclaration;
|
|
5275
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5276
|
+
}
|
|
5277
|
+
case "ImportDefaultSpecifier":
|
|
5278
|
+
{
|
|
5279
|
+
let visit = walkers.ImportDefaultSpecifier;
|
|
5280
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5281
|
+
}
|
|
5282
|
+
case "JSXExpressionContainer":
|
|
5283
|
+
{
|
|
5284
|
+
let visit = walkers.JSXExpressionContainer;
|
|
5285
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5286
|
+
}
|
|
5287
|
+
case "TSInterfaceDeclaration":
|
|
5288
|
+
{
|
|
5289
|
+
let visit = walkers.TSInterfaceDeclaration;
|
|
5290
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5291
|
+
}
|
|
5292
|
+
case "TSJSDocNonNullableType":
|
|
5293
|
+
{
|
|
5294
|
+
let visit = walkers.TSJSDocNonNullableType;
|
|
5295
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5296
|
+
}
|
|
5297
|
+
case "TSTypeAliasDeclaration":
|
|
5298
|
+
{
|
|
5299
|
+
let visit = walkers.TSTypeAliasDeclaration;
|
|
5300
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5301
|
+
}
|
|
5302
|
+
}
|
|
5303
|
+
break;
|
|
5304
|
+
case 23:
|
|
5305
|
+
switch(type){
|
|
5306
|
+
case "ArrowFunctionExpression":
|
|
5307
|
+
{
|
|
5308
|
+
let visit = walkers.ArrowFunctionExpression;
|
|
5309
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5310
|
+
}
|
|
5311
|
+
case "ParenthesizedExpression":
|
|
5312
|
+
{
|
|
5313
|
+
let visit = walkers.ParenthesizedExpression;
|
|
5314
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5315
|
+
}
|
|
5316
|
+
}
|
|
5317
|
+
break;
|
|
5318
|
+
case 24:
|
|
5319
|
+
switch(type){
|
|
5320
|
+
case "ExportDefaultDeclaration":
|
|
5321
|
+
{
|
|
5322
|
+
let visit = walkers.ExportDefaultDeclaration;
|
|
5323
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5324
|
+
}
|
|
5325
|
+
case "ImportNamespaceSpecifier":
|
|
5326
|
+
{
|
|
5327
|
+
let visit = walkers.ImportNamespaceSpecifier;
|
|
5328
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5329
|
+
}
|
|
5330
|
+
case "TaggedTemplateExpression":
|
|
5331
|
+
{
|
|
5332
|
+
let visit = walkers.TaggedTemplateExpression;
|
|
5333
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5334
|
+
}
|
|
5335
|
+
}
|
|
5336
|
+
break;
|
|
5337
|
+
case 25:
|
|
5338
|
+
switch(type){
|
|
5339
|
+
case "TSExternalModuleReference":
|
|
5340
|
+
{
|
|
5341
|
+
let visit = walkers.TSExternalModuleReference;
|
|
5342
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5343
|
+
}
|
|
5344
|
+
case "TSImportEqualsDeclaration":
|
|
5345
|
+
{
|
|
5346
|
+
let visit = walkers.TSImportEqualsDeclaration;
|
|
5347
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5348
|
+
}
|
|
5349
|
+
case "TSInstantiationExpression":
|
|
5350
|
+
{
|
|
5351
|
+
let visit = walkers.TSInstantiationExpression;
|
|
5352
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5353
|
+
}
|
|
5354
|
+
}
|
|
5355
|
+
break;
|
|
5356
|
+
case 26:
|
|
5357
|
+
switch(type){
|
|
5358
|
+
case "TSAbstractAccessorProperty":
|
|
5359
|
+
{
|
|
5360
|
+
let visit = walkers.TSAbstractAccessorProperty;
|
|
5361
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5362
|
+
}
|
|
5363
|
+
case "TSAbstractMethodDefinition":
|
|
5364
|
+
{
|
|
5365
|
+
let visit = walkers.TSAbstractMethodDefinition;
|
|
5366
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5367
|
+
}
|
|
5368
|
+
case "TSCallSignatureDeclaration":
|
|
5369
|
+
{
|
|
5370
|
+
let visit = walkers.TSCallSignatureDeclaration;
|
|
5371
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5372
|
+
}
|
|
5373
|
+
case "TSTypeParameterDeclaration":
|
|
5374
|
+
{
|
|
5375
|
+
let visit = walkers.TSTypeParameterDeclaration;
|
|
5376
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5377
|
+
}
|
|
5378
|
+
}
|
|
5379
|
+
break;
|
|
5380
|
+
case 28:
|
|
5381
|
+
switch(type){
|
|
5382
|
+
case "TSAbstractPropertyDefinition":
|
|
5383
|
+
{
|
|
5384
|
+
let visit = walkers.TSAbstractPropertyDefinition;
|
|
5385
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5386
|
+
}
|
|
5387
|
+
case "TSNamespaceExportDeclaration":
|
|
5388
|
+
{
|
|
5389
|
+
let visit = walkers.TSNamespaceExportDeclaration;
|
|
5390
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5391
|
+
}
|
|
5392
|
+
case "TSTypeParameterInstantiation":
|
|
5393
|
+
{
|
|
5394
|
+
let visit = walkers.TSTypeParameterInstantiation;
|
|
5395
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5396
|
+
}
|
|
5397
|
+
}
|
|
5398
|
+
break;
|
|
5399
|
+
case 29:
|
|
5400
|
+
if ("TSEmptyBodyFunctionExpression" === type) {
|
|
5401
|
+
let visit = walkers.TSEmptyBodyFunctionExpression;
|
|
5402
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5403
|
+
}
|
|
5404
|
+
break;
|
|
5405
|
+
case 31:
|
|
5406
|
+
if ("TSConstructSignatureDeclaration" === type) {
|
|
5407
|
+
let visit = walkers.TSConstructSignatureDeclaration;
|
|
5408
|
+
return null === visit ? index : visit(node, walker, parent, key, list, index);
|
|
5409
|
+
}
|
|
5410
|
+
}
|
|
5411
|
+
throw TypeError(`Unsupported AST node type: ${type}`);
|
|
5412
|
+
}(node, this, parent, key, list, index, this.#walkers);
|
|
5413
|
+
}
|
|
5414
|
+
leaveChanged(node, parent, key, list, index) {
|
|
5415
|
+
let entry = this.#dispatch[node.type];
|
|
5416
|
+
void 0 === entry && assertNode(node);
|
|
5417
|
+
let leave = entry.leave ?? this.#globalLeave;
|
|
5418
|
+
return null === leave ? index : (this.#prepare(node, parent, key, list, index, 0), this.invoke(leave, this.#storage, "leave"), this.#storage.index);
|
|
5419
|
+
}
|
|
5420
|
+
visitLeaveHooks(node, parent, key, list, index) {
|
|
5421
|
+
let handlers = this.#dispatch[node.type], type = node.type;
|
|
5422
|
+
return null !== handlers.children && (handlers.children(node, this), this.stopped) ? index : node.type !== type ? this.leaveChanged(node, parent, key, list, index) : (this.#prepare(node, parent, key, list, index, 0), this.invoke(handlers.leave ?? this.#globalLeave, this.#storage, "leave"), this.#storage.index);
|
|
5423
|
+
}
|
|
5424
|
+
visitHooks(node, parent, key, list, index) {
|
|
5425
|
+
let handlers = this.#dispatch[node.type], enter = handlers.enter ?? this.#globalEnter, frame = this.#storage, type = node.type, after = 0, skip = !1;
|
|
5426
|
+
if (null !== enter) {
|
|
5427
|
+
if (this.#prepare(node, parent, key, list, index, 0), this.invoke(enter, frame, "enter"), index = frame.index, this.stopped || 2 & frame.flags) return index;
|
|
5428
|
+
node = frame.node, after = frame.after, skip = 1 & frame.flags, node.type !== type && (type = node.type, void 0 === (handlers = this.#dispatch[type]) && assertNode(node));
|
|
5429
|
+
}
|
|
5430
|
+
if (!skip && null !== handlers.children && (handlers.children(node, this), this.stopped)) return index;
|
|
5431
|
+
node.type !== type && void 0 === (handlers = this.#dispatch[node.type]) && assertNode(node);
|
|
5432
|
+
let leave = handlers.leave ?? this.#globalLeave;
|
|
5433
|
+
return null !== leave && (this.#prepare(node, parent, key, list, index, after), this.invoke(leave, frame, "leave"), index = frame.index), index;
|
|
5434
|
+
}
|
|
5435
|
+
}
|
|
5436
|
+
function recursive(node, state, visitors) {
|
|
5437
|
+
let compiled, hooks = {};
|
|
5438
|
+
for (let type of Object.keys(visitors)){
|
|
5439
|
+
let visitor = visitors[type];
|
|
5440
|
+
visitor && (hooks[type] = (child, context)=>{
|
|
5441
|
+
context.skip(), visitor(child, context.state, visit);
|
|
5442
|
+
});
|
|
5443
|
+
}
|
|
5444
|
+
let walker = (compiled = function(hooks) {
|
|
5445
|
+
let enter, leave;
|
|
5446
|
+
if (!hooks || "object" != typeof hooks) throw TypeError("Expected a hooks object");
|
|
5447
|
+
let entries = Object.entries(hooks), table = new Map(), add = (name, value)=>{
|
|
5448
|
+
let pair = "function" == typeof value ? {
|
|
5449
|
+
enter: value
|
|
5450
|
+
} : value;
|
|
5451
|
+
if (!pair || "object" != typeof pair) throw TypeError(`Invalid hook: ${name}`);
|
|
5452
|
+
for (let key of Object.keys(pair))if ("enter" !== key && "leave" !== key || void 0 !== pair[key] && "function" != typeof pair[key]) throw TypeError(`Invalid hook: ${name}.${key}`);
|
|
5453
|
+
let entry = table.get(name) ?? {
|
|
5454
|
+
enter: [],
|
|
5455
|
+
leave: []
|
|
5456
|
+
};
|
|
5457
|
+
pair.enter && entry.enter.push(pair.enter), pair.leave && entry.leave.unshift(pair.leave), table.set(name, entry);
|
|
5458
|
+
};
|
|
5459
|
+
for (let [name, value] of entries)if (void 0 !== value) {
|
|
5460
|
+
if ("enter" === name || "leave" === name) {
|
|
5461
|
+
if ("function" != typeof value) throw TypeError(`Invalid hook: ${name}`);
|
|
5462
|
+
"enter" === name ? enter = value : leave = value;
|
|
5463
|
+
} else if (!owns(aliases, name) && !isNodeType(name)) throw TypeError(`Unknown AST hook: ${name}`);
|
|
5464
|
+
}
|
|
5465
|
+
for (let [name, value] of entries)if (void 0 !== value && owns(aliases, name)) for (let type of aliases[name])add(type, value);
|
|
5466
|
+
for (let [name, value] of entries)void 0 !== value && isNodeType(name) && add(name, value);
|
|
5467
|
+
for (let pair of table.values())enter && pair.enter.unshift(enter), leave && pair.leave.push(leave);
|
|
5468
|
+
let compact = (handlers)=>0 === handlers.length ? null : 1 === handlers.length ? handlers[0] : handlers, dispatch = 0 === table.size ? baseDispatch : Object.create(baseDispatch);
|
|
5469
|
+
for (let [type, pair] of table)dispatch[type] = {
|
|
5470
|
+
children: childVisitors[type],
|
|
5471
|
+
enter: compact(pair.enter),
|
|
5472
|
+
leave: compact(pair.leave)
|
|
5473
|
+
};
|
|
5474
|
+
let walkers = Object.create(nodeWalkers);
|
|
5475
|
+
for (let type of enter || leave ? Object.keys(nodeWalkers) : [
|
|
5476
|
+
...table.keys()
|
|
5477
|
+
]){
|
|
5478
|
+
let entry = dispatch[type], enterHook = entry.enter ?? enter ?? null, leaveHook = entry.leave ?? leave ?? null;
|
|
5479
|
+
(null !== enterHook || null !== leaveHook) && (walkers[type] = null === enterHook ? walkLeave : walkEnter);
|
|
5480
|
+
}
|
|
5481
|
+
return {
|
|
5482
|
+
dispatch,
|
|
5483
|
+
walkers,
|
|
5484
|
+
globalEnter: enter ?? null,
|
|
5485
|
+
globalLeave: leave ?? null
|
|
5486
|
+
};
|
|
5487
|
+
}(hooks), Object.freeze({
|
|
5488
|
+
walk (root, state) {
|
|
5489
|
+
assertNode(root);
|
|
5490
|
+
let ctx = new WalkContext(state, compiled);
|
|
5491
|
+
try {
|
|
5492
|
+
ctx.visit(root, null, null, null, 0);
|
|
5493
|
+
} finally{
|
|
5494
|
+
ctx.reset();
|
|
5495
|
+
}
|
|
5496
|
+
return root;
|
|
5497
|
+
}
|
|
5498
|
+
}));
|
|
5499
|
+
function visit(child, childState) {
|
|
5500
|
+
walker.walk(child, childState);
|
|
5501
|
+
}
|
|
5502
|
+
visit(node, state);
|
|
2500
5503
|
}
|
|
2501
5504
|
function getDefaultImports(node) {
|
|
2502
5505
|
return node.body.filter((statement)=>{
|
|
@@ -2543,7 +5546,8 @@ let parser = {
|
|
|
2543
5546
|
lang: 'js',
|
|
2544
5547
|
preserveParens: !1,
|
|
2545
5548
|
comments: 'none',
|
|
2546
|
-
semanticErrors: !0
|
|
5549
|
+
semanticErrors: !0,
|
|
5550
|
+
errorRecovery: !0
|
|
2547
5551
|
}), diagnostic = result.diagnostics.find((item)=>'error' === item.severity);
|
|
2548
5552
|
if (diagnostic) throw SyntaxError(diagnostic.message);
|
|
2549
5553
|
return result.program;
|