as-test 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/bin/commands/run-core.js +68 -2
- package/bin/util.js +7 -6
- package/package.json +1 -1
- package/transform/lib/coverage.js +13 -12
- package/transform/lib/index.js +3 -1
- package/transform/lib/types.js +3 -0
- package/transform/lib/visitor.js +70 -67
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 2026-05-15 - v1.1.5
|
|
4
|
+
|
|
5
|
+
- fix: coverage `mode` and `dependencies` filtering now correctly handles AssemblyScript-normalized `~lib/<pkg>/...` paths, which are the actual runtime paths emitted for `node_modules` imports.
|
|
6
|
+
- fix: `ENTRY_FILE` injected by the transform now uses the full relative path instead of the basename, preventing snapshot key collisions between specs with the same filename in different directories; snapshot lookup normalizes the file prefix to maintain backward compatibility with existing `.snap` files.
|
|
7
|
+
- fix: transform visitor and coverage instrumentation now resolve `NodeKind` values at runtime instead of relying on compile-time const enum inlining, so they remain correct across AssemblyScript versions.
|
|
8
|
+
- fix: add a no-op `TupleType` case to the transform visitor so files using tuple types no longer throw during instrumentation.
|
|
9
|
+
|
|
3
10
|
## 2026-05-14 - v1.1.4
|
|
4
11
|
|
|
5
12
|
- feat: add `coverage.mode` (`project` or `all`) plus `coverage.dependencies` package allowlisting so dependency coverage can include normal or pnpm-installed packages without raw path globs.
|
package/bin/commands/run-core.js
CHANGED
|
@@ -23,6 +23,7 @@ class SnapshotStore {
|
|
|
23
23
|
this.matched = 0;
|
|
24
24
|
this.failed = 0;
|
|
25
25
|
this.warnedMissing = new Set();
|
|
26
|
+
this.specBasename = path.basename(specFile);
|
|
26
27
|
const dir = path.join(process.cwd(), snapshotDir);
|
|
27
28
|
const relative = resolveArtifactRelativePath(specFile, "__tests__").replace(/\.ts$/, ".snap");
|
|
28
29
|
this.filePath = path.join(dir, relative);
|
|
@@ -37,6 +38,7 @@ class SnapshotStore {
|
|
|
37
38
|
}
|
|
38
39
|
assert(key, actual, allowSnapshot, createSnapshots, overwriteSnapshots) {
|
|
39
40
|
key = canonicalizeSnapshotKey(key);
|
|
41
|
+
key = normalizeSnapshotKeyPrefix(key, this.specBasename);
|
|
40
42
|
if (!allowSnapshot)
|
|
41
43
|
return { ok: true, expected: actual, warnMissing: false };
|
|
42
44
|
if (!(key in this.data)) {
|
|
@@ -260,6 +262,12 @@ function localizeSnapshotKey(specFile, key) {
|
|
|
260
262
|
const prefix = `${path.basename(specFile)}::`;
|
|
261
263
|
return key.startsWith(prefix) ? key.slice(prefix.length) : key;
|
|
262
264
|
}
|
|
265
|
+
function normalizeSnapshotKeyPrefix(key, specBasename) {
|
|
266
|
+
const sep = key.indexOf("::");
|
|
267
|
+
if (sep < 0)
|
|
268
|
+
return key;
|
|
269
|
+
return `${specBasename}::${key.slice(sep + 2)}`;
|
|
270
|
+
}
|
|
263
271
|
function qualifySnapshotKey(specFile, key) {
|
|
264
272
|
return `${path.basename(specFile)}::${key}`;
|
|
265
273
|
}
|
|
@@ -1382,9 +1390,52 @@ function isAllowedCoverageSourceFile(file) {
|
|
|
1382
1390
|
const lower = file.toLowerCase();
|
|
1383
1391
|
return lower.endsWith(".ts") || lower.endsWith(".as");
|
|
1384
1392
|
}
|
|
1393
|
+
// AssemblyScript normalizes node_modules/<pkg>/... to ~lib/<pkg>/... in Source.normalizedPath.
|
|
1394
|
+
// This set contains the root names that are actual AS stdlib modules, so we can distinguish
|
|
1395
|
+
// real stdlib (~lib/array.ts) from third-party packages (~lib/json-as/assembly/index.ts).
|
|
1396
|
+
const AS_STDLIB_ROOT_NAMES = new Set([
|
|
1397
|
+
"array",
|
|
1398
|
+
"arraybuffer",
|
|
1399
|
+
"atomics",
|
|
1400
|
+
"bindings",
|
|
1401
|
+
"builtins",
|
|
1402
|
+
"compat",
|
|
1403
|
+
"console",
|
|
1404
|
+
"crypto",
|
|
1405
|
+
"dataview",
|
|
1406
|
+
"date",
|
|
1407
|
+
"diagnostics",
|
|
1408
|
+
"error",
|
|
1409
|
+
"function",
|
|
1410
|
+
"iterator",
|
|
1411
|
+
"map",
|
|
1412
|
+
"math",
|
|
1413
|
+
"memory",
|
|
1414
|
+
"number",
|
|
1415
|
+
"object",
|
|
1416
|
+
"polyfills",
|
|
1417
|
+
"process",
|
|
1418
|
+
"reference",
|
|
1419
|
+
"regexp",
|
|
1420
|
+
"rt",
|
|
1421
|
+
"set",
|
|
1422
|
+
"shared",
|
|
1423
|
+
"staticarray",
|
|
1424
|
+
"string",
|
|
1425
|
+
"symbol",
|
|
1426
|
+
"table",
|
|
1427
|
+
"typedarray",
|
|
1428
|
+
"uri",
|
|
1429
|
+
"util",
|
|
1430
|
+
"vector",
|
|
1431
|
+
]);
|
|
1385
1432
|
function isAssemblyScriptStdlibFile(file) {
|
|
1386
|
-
if (file.startsWith("~lib/"))
|
|
1387
|
-
|
|
1433
|
+
if (file.startsWith("~lib/")) {
|
|
1434
|
+
// Extract the first path segment after ~lib/ (strip any file extension)
|
|
1435
|
+
const after = file.slice("~lib/".length);
|
|
1436
|
+
const root = (after.split("/")[0] ?? "").replace(/\.[^.]+$/, "");
|
|
1437
|
+
return AS_STDLIB_ROOT_NAMES.has(root);
|
|
1438
|
+
}
|
|
1388
1439
|
if (file.includes("/~lib/"))
|
|
1389
1440
|
return true;
|
|
1390
1441
|
if (file.startsWith("assemblyscript/std/"))
|
|
@@ -1402,6 +1453,21 @@ function classifyCoverageFile(file) {
|
|
|
1402
1453
|
}
|
|
1403
1454
|
function resolveCoverageDependencyPackage(file) {
|
|
1404
1455
|
const normalized = file.replace(/\\/g, "/");
|
|
1456
|
+
// AssemblyScript normalizes node_modules/<pkg>/... to ~lib/<pkg>/... at compile time.
|
|
1457
|
+
// Handle that path format so coverage.mode and coverage.dependencies work at runtime.
|
|
1458
|
+
if (normalized.startsWith("~lib/")) {
|
|
1459
|
+
const after = normalized.slice("~lib/".length);
|
|
1460
|
+
const segments = after.split("/").filter(Boolean);
|
|
1461
|
+
if (!segments.length)
|
|
1462
|
+
return null;
|
|
1463
|
+
if (segments[0].startsWith("@")) {
|
|
1464
|
+
if (segments.length < 2)
|
|
1465
|
+
return null;
|
|
1466
|
+
return `${segments[0]}/${segments[1]}`;
|
|
1467
|
+
}
|
|
1468
|
+
// Strip file extension for bare module entries like ~lib/json-as.ts (unusual but safe)
|
|
1469
|
+
return segments[0].replace(/\.[^.]+$/, "") || null;
|
|
1470
|
+
}
|
|
1405
1471
|
const marker = "/node_modules/";
|
|
1406
1472
|
const prefixed = normalized.startsWith("node_modules/")
|
|
1407
1473
|
? `/${normalized}`
|
package/bin/util.js
CHANGED
|
@@ -946,15 +946,16 @@ function cloneCoverageOptions(coverage) {
|
|
|
946
946
|
if (typeof coverage == "boolean")
|
|
947
947
|
return coverage;
|
|
948
948
|
const cloned = Object.assign(new CoverageOptions(), coverage);
|
|
949
|
+
const ignore = coverage.ignore ?? new CoverageIgnoreOptions();
|
|
949
950
|
cloned.mode = coverage.mode ?? "project";
|
|
950
951
|
cloned.dependencies = [...(coverage.dependencies ?? [])];
|
|
951
952
|
cloned.include = [...(coverage.include ?? [])];
|
|
952
953
|
cloned.exclude = [...(coverage.exclude ?? [])];
|
|
953
|
-
cloned.ignore = Object.assign(new CoverageIgnoreOptions(),
|
|
954
|
-
cloned.ignore.labels = [...(
|
|
955
|
-
cloned.ignore.names = [...(
|
|
956
|
-
cloned.ignore.locations = [...(
|
|
957
|
-
cloned.ignore.snippets = [...(
|
|
954
|
+
cloned.ignore = Object.assign(new CoverageIgnoreOptions(), ignore);
|
|
955
|
+
cloned.ignore.labels = [...(ignore.labels ?? [])];
|
|
956
|
+
cloned.ignore.names = [...(ignore.names ?? [])];
|
|
957
|
+
cloned.ignore.locations = [...(ignore.locations ?? [])];
|
|
958
|
+
cloned.ignore.snippets = [...(ignore.snippets ?? [])];
|
|
958
959
|
return cloned;
|
|
959
960
|
}
|
|
960
961
|
function cloneBuildOptions(options) {
|
|
@@ -1293,8 +1294,8 @@ function appendPathSegment(basePath, segment) {
|
|
|
1293
1294
|
}
|
|
1294
1295
|
export function getCliVersion() {
|
|
1295
1296
|
const candidates = [
|
|
1296
|
-
join(process.cwd(), "package.json"),
|
|
1297
1297
|
join(dirname(fileURLToPath(import.meta.url)), "..", "package.json"),
|
|
1298
|
+
join(process.cwd(), "package.json"),
|
|
1298
1299
|
];
|
|
1299
1300
|
for (const pkgPath of candidates) {
|
|
1300
1301
|
if (!existsSync(pkgPath))
|
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@ import { BlockStatement, ExpressionStatement, Node, } from "assemblyscript/dist/
|
|
|
2
2
|
import { RangeTransform } from "./range.js";
|
|
3
3
|
import { isStdlib, SimpleParser } from "./util.js";
|
|
4
4
|
import { Visitor } from "./visitor.js";
|
|
5
|
+
import { NodeKind } from "./types.js";
|
|
5
6
|
const COVERAGE_IGNORED_CALLS = new Set([
|
|
6
7
|
"beforeAll",
|
|
7
8
|
"afterAll",
|
|
@@ -114,7 +115,7 @@ export class CoverageTransform extends Visitor {
|
|
|
114
115
|
const coverStmt = createCoverStatement(point.hash, node);
|
|
115
116
|
replacer.visit(coverStmt);
|
|
116
117
|
this.globalStatements.push(registerStmt);
|
|
117
|
-
if (node.kind ==
|
|
118
|
+
if (node.kind == NodeKind.Block) {
|
|
118
119
|
const block = node;
|
|
119
120
|
block.statements.unshift(coverStmt);
|
|
120
121
|
return block;
|
|
@@ -150,7 +151,7 @@ export class CoverageTransform extends Visitor {
|
|
|
150
151
|
this.visit(node.expression, node);
|
|
151
152
|
this.visit(node.typeArguments, node);
|
|
152
153
|
for (const arg of node.args) {
|
|
153
|
-
if (arg.kind ==
|
|
154
|
+
if (arg.kind == NodeKind.Function)
|
|
154
155
|
continue;
|
|
155
156
|
this.visit(arg, node);
|
|
156
157
|
}
|
|
@@ -278,7 +279,7 @@ export class CoverageTransform extends Visitor {
|
|
|
278
279
|
const registerStmt = createRegisterStatement(point);
|
|
279
280
|
replacer.visit(registerStmt);
|
|
280
281
|
this.globalStatements.push(registerStmt);
|
|
281
|
-
if (node.body.kind ===
|
|
282
|
+
if (node.body.kind === NodeKind.Export) {
|
|
282
283
|
const coverStmt = SimpleParser.parseStatement(`{
|
|
283
284
|
__COVER("${point.hash}")
|
|
284
285
|
return $$REPLACE_ME
|
|
@@ -327,14 +328,14 @@ export class CoverageTransform extends Visitor {
|
|
|
327
328
|
const ifFalse = node.ifFalse;
|
|
328
329
|
const path = node.range.source.normalizedPath;
|
|
329
330
|
if (ifTrue &&
|
|
330
|
-
ifTrue.kind !==
|
|
331
|
+
ifTrue.kind !== NodeKind.Block &&
|
|
331
332
|
!isBuiltinStatement(ifTrue)) {
|
|
332
333
|
node.ifTrue = this.instrumentStatementBody(path, ifTrue, "IfBranch");
|
|
333
334
|
visitIfTrue = true;
|
|
334
335
|
visitIfFalse = !!ifFalse;
|
|
335
336
|
}
|
|
336
337
|
if (ifFalse &&
|
|
337
|
-
ifFalse.kind !==
|
|
338
|
+
ifFalse.kind !== NodeKind.Block &&
|
|
338
339
|
!isBuiltinStatement(ifFalse)) {
|
|
339
340
|
node.ifFalse = this.instrumentStatementBody(path, ifFalse, "IfBranch");
|
|
340
341
|
visitIfTrue = true;
|
|
@@ -533,35 +534,35 @@ function getCallName(node) {
|
|
|
533
534
|
return getExpressionName(node.expression);
|
|
534
535
|
}
|
|
535
536
|
function isBuiltinStatement(node) {
|
|
536
|
-
if (node.kind !==
|
|
537
|
+
if (node.kind !== NodeKind.Expression)
|
|
537
538
|
return false;
|
|
538
539
|
return isBuiltinCallExpression(node.expression);
|
|
539
540
|
}
|
|
540
541
|
function isBuiltinCallExpression(node) {
|
|
541
542
|
const unwrapped = unwrapParenthesized(node);
|
|
542
|
-
if (unwrapped.kind !==
|
|
543
|
+
if (unwrapped.kind !== NodeKind.Call)
|
|
543
544
|
return false;
|
|
544
545
|
const call = unwrapped;
|
|
545
546
|
const expression = unwrapParenthesized(call.expression);
|
|
546
|
-
if (expression.kind !==
|
|
547
|
+
if (expression.kind !== NodeKind.Identifier)
|
|
547
548
|
return false;
|
|
548
549
|
const name = expression.text;
|
|
549
550
|
return COVERAGE_IGNORED_BUILTINS.has(name);
|
|
550
551
|
}
|
|
551
552
|
function unwrapParenthesized(node) {
|
|
552
553
|
let current = node;
|
|
553
|
-
while (current.kind ===
|
|
554
|
+
while (current.kind === NodeKind.Parenthesized) {
|
|
554
555
|
current = current.expression;
|
|
555
556
|
}
|
|
556
557
|
return current;
|
|
557
558
|
}
|
|
558
559
|
function getExpressionName(node) {
|
|
559
560
|
switch (node.kind) {
|
|
560
|
-
case
|
|
561
|
+
case NodeKind.Identifier:
|
|
561
562
|
return node.text;
|
|
562
|
-
case
|
|
563
|
+
case NodeKind.PropertyAccess:
|
|
563
564
|
return node.property.text;
|
|
564
|
-
case
|
|
565
|
+
case NodeKind.Parenthesized:
|
|
565
566
|
return getExpressionName(node.expression);
|
|
566
567
|
default:
|
|
567
568
|
return null;
|
package/transform/lib/index.js
CHANGED
|
@@ -27,7 +27,9 @@ export default class Transformer extends Transform {
|
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
const entrySource = sources.find((v) => v.sourceKind == 1);
|
|
30
|
-
const entryFile = entrySource
|
|
30
|
+
const entryFile = entrySource
|
|
31
|
+
? entrySource.normalizedPath.replace(/\.ts$/, "")
|
|
32
|
+
: "unknown";
|
|
31
33
|
const mockedImportTargets = collectMockImportTargets(sources);
|
|
32
34
|
for (const target of mockedImportTargets) {
|
|
33
35
|
mock.importMocked.add(target);
|
package/transform/lib/types.js
CHANGED
package/transform/lib/visitor.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NodeKind } from "./types.js";
|
|
1
2
|
export class Visitor {
|
|
2
3
|
currentSource = null;
|
|
3
4
|
visit(node, ref = null) {
|
|
@@ -14,216 +15,218 @@ export class Visitor {
|
|
|
14
15
|
}
|
|
15
16
|
_visit(node, ref) {
|
|
16
17
|
switch (node.kind) {
|
|
17
|
-
case
|
|
18
|
+
case NodeKind.Source:
|
|
18
19
|
this.visitSource(node, ref);
|
|
19
20
|
break;
|
|
20
|
-
case
|
|
21
|
+
case NodeKind.NamedType:
|
|
21
22
|
this.visitNamedTypeNode(node, ref);
|
|
22
23
|
break;
|
|
23
|
-
case
|
|
24
|
+
case NodeKind.FunctionType:
|
|
24
25
|
this.visitFunctionTypeNode(node, ref);
|
|
25
26
|
break;
|
|
26
|
-
case
|
|
27
|
+
case NodeKind.TupleType:
|
|
28
|
+
break;
|
|
29
|
+
case NodeKind.TypeName:
|
|
27
30
|
this.visitTypeName(node, ref);
|
|
28
31
|
break;
|
|
29
|
-
case
|
|
32
|
+
case NodeKind.TypeParameter:
|
|
30
33
|
this.visitTypeParameter(node, ref);
|
|
31
34
|
break;
|
|
32
|
-
case
|
|
35
|
+
case NodeKind.Identifier:
|
|
33
36
|
this.visitIdentifierExpression(node, ref);
|
|
34
37
|
break;
|
|
35
|
-
case
|
|
38
|
+
case NodeKind.Assertion:
|
|
36
39
|
this.visitAssertionExpression(node, ref);
|
|
37
40
|
break;
|
|
38
|
-
case
|
|
41
|
+
case NodeKind.Binary:
|
|
39
42
|
this.visitBinaryExpression(node, ref);
|
|
40
43
|
break;
|
|
41
|
-
case
|
|
44
|
+
case NodeKind.Call:
|
|
42
45
|
this.visitCallExpression(node, ref);
|
|
43
46
|
break;
|
|
44
|
-
case
|
|
47
|
+
case NodeKind.Class:
|
|
45
48
|
this.visitClassExpression(node, ref);
|
|
46
49
|
break;
|
|
47
|
-
case
|
|
50
|
+
case NodeKind.Comma:
|
|
48
51
|
this.visitCommaExpression(node, ref);
|
|
49
52
|
break;
|
|
50
|
-
case
|
|
53
|
+
case NodeKind.ElementAccess:
|
|
51
54
|
this.visitElementAccessExpression(node, ref);
|
|
52
55
|
break;
|
|
53
|
-
case
|
|
56
|
+
case NodeKind.Function:
|
|
54
57
|
this.visitFunctionExpression(node, ref);
|
|
55
58
|
break;
|
|
56
|
-
case
|
|
59
|
+
case NodeKind.InstanceOf:
|
|
57
60
|
this.visitInstanceOfExpression(node, ref);
|
|
58
61
|
break;
|
|
59
|
-
case
|
|
62
|
+
case NodeKind.Literal:
|
|
60
63
|
this.visitLiteralExpression(node, ref);
|
|
61
64
|
break;
|
|
62
|
-
case
|
|
65
|
+
case NodeKind.New:
|
|
63
66
|
this.visitNewExpression(node, ref);
|
|
64
67
|
break;
|
|
65
|
-
case
|
|
68
|
+
case NodeKind.Parenthesized:
|
|
66
69
|
this.visitParenthesizedExpression(node, ref);
|
|
67
70
|
break;
|
|
68
|
-
case
|
|
71
|
+
case NodeKind.PropertyAccess:
|
|
69
72
|
this.visitPropertyAccessExpression(node, ref);
|
|
70
73
|
break;
|
|
71
|
-
case
|
|
74
|
+
case NodeKind.Ternary:
|
|
72
75
|
this.visitTernaryExpression(node, ref);
|
|
73
76
|
break;
|
|
74
|
-
case
|
|
77
|
+
case NodeKind.UnaryPostfix:
|
|
75
78
|
this.visitUnaryPostfixExpression(node, ref);
|
|
76
79
|
break;
|
|
77
|
-
case
|
|
80
|
+
case NodeKind.UnaryPrefix:
|
|
78
81
|
this.visitUnaryPrefixExpression(node, ref);
|
|
79
82
|
break;
|
|
80
|
-
case
|
|
83
|
+
case NodeKind.Block:
|
|
81
84
|
this.visitBlockStatement(node, ref);
|
|
82
85
|
break;
|
|
83
|
-
case
|
|
86
|
+
case NodeKind.Break:
|
|
84
87
|
this.visitBreakStatement(node, ref);
|
|
85
88
|
break;
|
|
86
|
-
case
|
|
89
|
+
case NodeKind.Continue:
|
|
87
90
|
this.visitContinueStatement(node, ref);
|
|
88
91
|
break;
|
|
89
|
-
case
|
|
92
|
+
case NodeKind.Do:
|
|
90
93
|
this.visitDoStatement(node, ref);
|
|
91
94
|
break;
|
|
92
|
-
case
|
|
95
|
+
case NodeKind.Empty:
|
|
93
96
|
this.visitEmptyStatement(node, ref);
|
|
94
97
|
break;
|
|
95
|
-
case
|
|
98
|
+
case NodeKind.Export:
|
|
96
99
|
this.visitExportStatement(node, ref);
|
|
97
100
|
break;
|
|
98
|
-
case
|
|
101
|
+
case NodeKind.ExportDefault:
|
|
99
102
|
this.visitExportDefaultStatement(node, ref);
|
|
100
103
|
break;
|
|
101
|
-
case
|
|
104
|
+
case NodeKind.ExportImport:
|
|
102
105
|
this.visitExportImportStatement(node, ref);
|
|
103
106
|
break;
|
|
104
|
-
case
|
|
107
|
+
case NodeKind.Expression:
|
|
105
108
|
this.visitExpressionStatement(node, ref);
|
|
106
109
|
break;
|
|
107
|
-
case
|
|
110
|
+
case NodeKind.For:
|
|
108
111
|
this.visitForStatement(node, ref);
|
|
109
112
|
break;
|
|
110
|
-
case
|
|
113
|
+
case NodeKind.If:
|
|
111
114
|
this.visitIfStatement(node, ref);
|
|
112
115
|
break;
|
|
113
|
-
case
|
|
116
|
+
case NodeKind.Import:
|
|
114
117
|
this.visitImportStatement(node, ref);
|
|
115
118
|
break;
|
|
116
|
-
case
|
|
119
|
+
case NodeKind.Return:
|
|
117
120
|
this.visitReturnStatement(node, ref);
|
|
118
121
|
break;
|
|
119
|
-
case
|
|
122
|
+
case NodeKind.Switch:
|
|
120
123
|
this.visitSwitchStatement(node, ref);
|
|
121
124
|
break;
|
|
122
|
-
case
|
|
125
|
+
case NodeKind.Throw:
|
|
123
126
|
this.visitThrowStatement(node, ref);
|
|
124
127
|
break;
|
|
125
|
-
case
|
|
128
|
+
case NodeKind.Try:
|
|
126
129
|
this.visitTryStatement(node, ref);
|
|
127
130
|
break;
|
|
128
|
-
case
|
|
131
|
+
case NodeKind.Variable:
|
|
129
132
|
this.visitVariableStatement(node, ref);
|
|
130
133
|
break;
|
|
131
|
-
case
|
|
134
|
+
case NodeKind.While:
|
|
132
135
|
this.visitWhileStatement(node, ref);
|
|
133
136
|
break;
|
|
134
|
-
case
|
|
137
|
+
case NodeKind.ClassDeclaration:
|
|
135
138
|
this.visitClassDeclaration(node, false, ref);
|
|
136
139
|
break;
|
|
137
|
-
case
|
|
140
|
+
case NodeKind.EnumDeclaration:
|
|
138
141
|
this.visitEnumDeclaration(node, false, ref);
|
|
139
142
|
break;
|
|
140
|
-
case
|
|
143
|
+
case NodeKind.EnumValueDeclaration:
|
|
141
144
|
this.visitEnumValueDeclaration(node, ref);
|
|
142
145
|
break;
|
|
143
|
-
case
|
|
146
|
+
case NodeKind.FieldDeclaration:
|
|
144
147
|
this.visitFieldDeclaration(node, ref);
|
|
145
148
|
break;
|
|
146
|
-
case
|
|
149
|
+
case NodeKind.FunctionDeclaration:
|
|
147
150
|
this.visitFunctionDeclaration(node, false, ref);
|
|
148
151
|
break;
|
|
149
|
-
case
|
|
152
|
+
case NodeKind.ImportDeclaration:
|
|
150
153
|
this.visitImportDeclaration(node, ref);
|
|
151
154
|
break;
|
|
152
|
-
case
|
|
155
|
+
case NodeKind.InterfaceDeclaration:
|
|
153
156
|
this.visitInterfaceDeclaration(node, false, ref);
|
|
154
157
|
break;
|
|
155
|
-
case
|
|
158
|
+
case NodeKind.MethodDeclaration:
|
|
156
159
|
this.visitMethodDeclaration(node, ref);
|
|
157
160
|
break;
|
|
158
|
-
case
|
|
161
|
+
case NodeKind.NamespaceDeclaration:
|
|
159
162
|
this.visitNamespaceDeclaration(node, false, ref);
|
|
160
163
|
break;
|
|
161
|
-
case
|
|
164
|
+
case NodeKind.TypeDeclaration:
|
|
162
165
|
this.visitTypeDeclaration(node, ref);
|
|
163
166
|
break;
|
|
164
|
-
case
|
|
167
|
+
case NodeKind.VariableDeclaration:
|
|
165
168
|
this.visitVariableDeclaration(node, ref);
|
|
166
169
|
break;
|
|
167
|
-
case
|
|
170
|
+
case NodeKind.Decorator:
|
|
168
171
|
this.visitDecoratorNode(node, ref);
|
|
169
172
|
break;
|
|
170
|
-
case
|
|
173
|
+
case NodeKind.ExportMember:
|
|
171
174
|
this.visitExportMember(node, ref);
|
|
172
175
|
break;
|
|
173
|
-
case
|
|
176
|
+
case NodeKind.SwitchCase:
|
|
174
177
|
this.visitSwitchCase(node, ref);
|
|
175
178
|
break;
|
|
176
|
-
case
|
|
179
|
+
case NodeKind.IndexSignature:
|
|
177
180
|
this.visitIndexSignature(node, ref);
|
|
178
181
|
break;
|
|
179
|
-
case
|
|
182
|
+
case NodeKind.Null:
|
|
180
183
|
this.visitNullExpression(node, ref);
|
|
181
184
|
break;
|
|
182
|
-
case
|
|
185
|
+
case NodeKind.True: {
|
|
183
186
|
this.visitTrueExpression(node, ref);
|
|
184
187
|
break;
|
|
185
188
|
}
|
|
186
|
-
case
|
|
189
|
+
case NodeKind.False: {
|
|
187
190
|
this.visitFalseExpression(node, ref);
|
|
188
191
|
break;
|
|
189
192
|
}
|
|
190
|
-
case
|
|
193
|
+
case NodeKind.Compiled: {
|
|
191
194
|
this.visitCompiledExpression(node, ref);
|
|
192
195
|
break;
|
|
193
196
|
}
|
|
194
|
-
case
|
|
197
|
+
case NodeKind.Constructor: {
|
|
195
198
|
this.visitConstructorExpression(node, ref);
|
|
196
199
|
break;
|
|
197
200
|
}
|
|
198
|
-
case
|
|
201
|
+
case NodeKind.Comment: {
|
|
199
202
|
this.visitComment(node, ref);
|
|
200
203
|
break;
|
|
201
204
|
}
|
|
202
|
-
case
|
|
205
|
+
case NodeKind.ForOf: {
|
|
203
206
|
this.visitForOfStatement(node, ref);
|
|
204
207
|
break;
|
|
205
208
|
}
|
|
206
|
-
case
|
|
209
|
+
case NodeKind.Module: {
|
|
207
210
|
this.visitModuleDeclaration(node, ref);
|
|
208
211
|
break;
|
|
209
212
|
}
|
|
210
|
-
case
|
|
213
|
+
case NodeKind.Omitted: {
|
|
211
214
|
this.visitOmittedExpression(node, ref);
|
|
212
215
|
break;
|
|
213
216
|
}
|
|
214
|
-
case
|
|
217
|
+
case NodeKind.Parameter: {
|
|
215
218
|
this.visitParameter(node, ref);
|
|
216
219
|
break;
|
|
217
220
|
}
|
|
218
|
-
case
|
|
221
|
+
case NodeKind.Super: {
|
|
219
222
|
this.visitSuperExpression(node, ref);
|
|
220
223
|
break;
|
|
221
224
|
}
|
|
222
|
-
case
|
|
225
|
+
case NodeKind.This: {
|
|
223
226
|
this.visitThisExpression(node, ref);
|
|
224
227
|
break;
|
|
225
228
|
}
|
|
226
|
-
case
|
|
229
|
+
case NodeKind.Void: {
|
|
227
230
|
this.visitVoidStatement(node, ref);
|
|
228
231
|
break;
|
|
229
232
|
}
|