as-test 1.1.4 → 1.1.6

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # Change Log
2
2
 
3
+ ## 2026-05-14 - v1.1.6
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
+ - fix: coverage transform no longer wraps `return this` in constructors, preventing AS231 ("A class with a constructor explicitly returning something else than 'this' must be '@final'").
10
+ - fix: coverage transform preserves expression-body arrows instead of converting them to block bodies, preventing TS1140 ("Type argument expected") on typed arrow parameters such as `[1,2,3].map((x: i32) => x + 1)`.
11
+
3
12
  ## 2026-05-14 - v1.1.4
4
13
 
5
14
  - 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.
@@ -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
- return true;
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(), coverage.ignore);
954
- cloned.ignore.labels = [...(coverage.ignore.labels ?? [])];
955
- cloned.ignore.names = [...(coverage.ignore.names ?? [])];
956
- cloned.ignore.locations = [...(coverage.ignore.locations ?? [])];
957
- cloned.ignore.snippets = [...(coverage.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "as-test",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "author": "Jairus Tanaka",
5
5
  "repository": {
6
6
  "type": "git",
@@ -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 == 31) {
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 == 15)
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 === 36) {
282
+ if (node.body.kind === NodeKind.Export) {
282
283
  const coverStmt = SimpleParser.parseStatement(`{
283
284
  __COVER("${point.hash}")
284
285
  return $$REPLACE_ME
@@ -297,10 +298,8 @@ export class CoverageTransform extends Visitor {
297
298
  node.body.statements.unshift(coverStmt);
298
299
  }
299
300
  else if (node.body instanceof ExpressionStatement) {
300
- const expression = node.body.expression;
301
- node.body = Node.createBlockStatement([Node.createReturnStatement(expression, expression.range)], expression.range);
302
- const bodyBlock = node.body;
303
- bodyBlock.statements.unshift(coverStmt);
301
+ const exprBody = node.body;
302
+ exprBody.expression = createCoverExpression(point.hash, exprBody.expression, node);
304
303
  }
305
304
  this.withScope(point, () => {
306
305
  this.visit(node.name, node);
@@ -327,14 +326,14 @@ export class CoverageTransform extends Visitor {
327
326
  const ifFalse = node.ifFalse;
328
327
  const path = node.range.source.normalizedPath;
329
328
  if (ifTrue &&
330
- ifTrue.kind !== 31 &&
329
+ ifTrue.kind !== NodeKind.Block &&
331
330
  !isBuiltinStatement(ifTrue)) {
332
331
  node.ifTrue = this.instrumentStatementBody(path, ifTrue, "IfBranch");
333
332
  visitIfTrue = true;
334
333
  visitIfFalse = !!ifFalse;
335
334
  }
336
335
  if (ifFalse &&
337
- ifFalse.kind !== 31 &&
336
+ ifFalse.kind !== NodeKind.Block &&
338
337
  !isBuiltinStatement(ifFalse)) {
339
338
  node.ifFalse = this.instrumentStatementBody(path, ifFalse, "IfBranch");
340
339
  visitIfTrue = true;
@@ -444,6 +443,8 @@ export class CoverageTransform extends Visitor {
444
443
  super.visitReturnStatement(node);
445
444
  if (!node.value || isBuiltinCallExpression(node.value))
446
445
  return;
446
+ if (node.value.kind === NodeKind.This)
447
+ return;
447
448
  const path = node.range.source.normalizedPath;
448
449
  const point = this.createPoint(path, node.value, "Return");
449
450
  const replacer = new RangeTransform(node);
@@ -533,35 +534,35 @@ function getCallName(node) {
533
534
  return getExpressionName(node.expression);
534
535
  }
535
536
  function isBuiltinStatement(node) {
536
- if (node.kind !== 39)
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 !== 10)
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 !== 7)
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 === 21) {
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 7:
561
+ case NodeKind.Identifier:
561
562
  return node.text;
562
- case 22:
563
+ case NodeKind.PropertyAccess:
563
564
  return node.property.text;
564
- case 21:
565
+ case NodeKind.Parenthesized:
565
566
  return getExpressionName(node.expression);
566
567
  default:
567
568
  return null;
@@ -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 ? entrySource.simplePath : "unknown";
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);
@@ -1,3 +1,6 @@
1
+ import * as asc from "assemblyscript/dist/assemblyscript.js";
2
+ export const NodeKind = asc
3
+ .NodeKind;
1
4
  export var PropertyFlags;
2
5
  (function (PropertyFlags) {
3
6
  PropertyFlags[PropertyFlags["OmitNull"] = 0] = "OmitNull";
@@ -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 0:
18
+ case NodeKind.Source:
18
19
  this.visitSource(node, ref);
19
20
  break;
20
- case 1:
21
+ case NodeKind.NamedType:
21
22
  this.visitNamedTypeNode(node, ref);
22
23
  break;
23
- case 2:
24
+ case NodeKind.FunctionType:
24
25
  this.visitFunctionTypeNode(node, ref);
25
26
  break;
26
- case 4:
27
+ case NodeKind.TupleType:
28
+ break;
29
+ case NodeKind.TypeName:
27
30
  this.visitTypeName(node, ref);
28
31
  break;
29
- case 5:
32
+ case NodeKind.TypeParameter:
30
33
  this.visitTypeParameter(node, ref);
31
34
  break;
32
- case 7:
35
+ case NodeKind.Identifier:
33
36
  this.visitIdentifierExpression(node, ref);
34
37
  break;
35
- case 8:
38
+ case NodeKind.Assertion:
36
39
  this.visitAssertionExpression(node, ref);
37
40
  break;
38
- case 9:
41
+ case NodeKind.Binary:
39
42
  this.visitBinaryExpression(node, ref);
40
43
  break;
41
- case 10:
44
+ case NodeKind.Call:
42
45
  this.visitCallExpression(node, ref);
43
46
  break;
44
- case 11:
47
+ case NodeKind.Class:
45
48
  this.visitClassExpression(node, ref);
46
49
  break;
47
- case 12:
50
+ case NodeKind.Comma:
48
51
  this.visitCommaExpression(node, ref);
49
52
  break;
50
- case 13:
53
+ case NodeKind.ElementAccess:
51
54
  this.visitElementAccessExpression(node, ref);
52
55
  break;
53
- case 15:
56
+ case NodeKind.Function:
54
57
  this.visitFunctionExpression(node, ref);
55
58
  break;
56
- case 16:
59
+ case NodeKind.InstanceOf:
57
60
  this.visitInstanceOfExpression(node, ref);
58
61
  break;
59
- case 17:
62
+ case NodeKind.Literal:
60
63
  this.visitLiteralExpression(node, ref);
61
64
  break;
62
- case 18:
65
+ case NodeKind.New:
63
66
  this.visitNewExpression(node, ref);
64
67
  break;
65
- case 21:
68
+ case NodeKind.Parenthesized:
66
69
  this.visitParenthesizedExpression(node, ref);
67
70
  break;
68
- case 22:
71
+ case NodeKind.PropertyAccess:
69
72
  this.visitPropertyAccessExpression(node, ref);
70
73
  break;
71
- case 23:
74
+ case NodeKind.Ternary:
72
75
  this.visitTernaryExpression(node, ref);
73
76
  break;
74
- case 28:
77
+ case NodeKind.UnaryPostfix:
75
78
  this.visitUnaryPostfixExpression(node, ref);
76
79
  break;
77
- case 29:
80
+ case NodeKind.UnaryPrefix:
78
81
  this.visitUnaryPrefixExpression(node, ref);
79
82
  break;
80
- case 31:
83
+ case NodeKind.Block:
81
84
  this.visitBlockStatement(node, ref);
82
85
  break;
83
- case 32:
86
+ case NodeKind.Break:
84
87
  this.visitBreakStatement(node, ref);
85
88
  break;
86
- case 33:
89
+ case NodeKind.Continue:
87
90
  this.visitContinueStatement(node, ref);
88
91
  break;
89
- case 34:
92
+ case NodeKind.Do:
90
93
  this.visitDoStatement(node, ref);
91
94
  break;
92
- case 35:
95
+ case NodeKind.Empty:
93
96
  this.visitEmptyStatement(node, ref);
94
97
  break;
95
- case 36:
98
+ case NodeKind.Export:
96
99
  this.visitExportStatement(node, ref);
97
100
  break;
98
- case 37:
101
+ case NodeKind.ExportDefault:
99
102
  this.visitExportDefaultStatement(node, ref);
100
103
  break;
101
- case 38:
104
+ case NodeKind.ExportImport:
102
105
  this.visitExportImportStatement(node, ref);
103
106
  break;
104
- case 39:
107
+ case NodeKind.Expression:
105
108
  this.visitExpressionStatement(node, ref);
106
109
  break;
107
- case 40:
110
+ case NodeKind.For:
108
111
  this.visitForStatement(node, ref);
109
112
  break;
110
- case 42:
113
+ case NodeKind.If:
111
114
  this.visitIfStatement(node, ref);
112
115
  break;
113
- case 43:
116
+ case NodeKind.Import:
114
117
  this.visitImportStatement(node, ref);
115
118
  break;
116
- case 44:
119
+ case NodeKind.Return:
117
120
  this.visitReturnStatement(node, ref);
118
121
  break;
119
- case 45:
122
+ case NodeKind.Switch:
120
123
  this.visitSwitchStatement(node, ref);
121
124
  break;
122
- case 46:
125
+ case NodeKind.Throw:
123
126
  this.visitThrowStatement(node, ref);
124
127
  break;
125
- case 47:
128
+ case NodeKind.Try:
126
129
  this.visitTryStatement(node, ref);
127
130
  break;
128
- case 48:
131
+ case NodeKind.Variable:
129
132
  this.visitVariableStatement(node, ref);
130
133
  break;
131
- case 50:
134
+ case NodeKind.While:
132
135
  this.visitWhileStatement(node, ref);
133
136
  break;
134
- case 52:
137
+ case NodeKind.ClassDeclaration:
135
138
  this.visitClassDeclaration(node, false, ref);
136
139
  break;
137
- case 53:
140
+ case NodeKind.EnumDeclaration:
138
141
  this.visitEnumDeclaration(node, false, ref);
139
142
  break;
140
- case 54:
143
+ case NodeKind.EnumValueDeclaration:
141
144
  this.visitEnumValueDeclaration(node, ref);
142
145
  break;
143
- case 55:
146
+ case NodeKind.FieldDeclaration:
144
147
  this.visitFieldDeclaration(node, ref);
145
148
  break;
146
- case 56:
149
+ case NodeKind.FunctionDeclaration:
147
150
  this.visitFunctionDeclaration(node, false, ref);
148
151
  break;
149
- case 57:
152
+ case NodeKind.ImportDeclaration:
150
153
  this.visitImportDeclaration(node, ref);
151
154
  break;
152
- case 58:
155
+ case NodeKind.InterfaceDeclaration:
153
156
  this.visitInterfaceDeclaration(node, false, ref);
154
157
  break;
155
- case 59:
158
+ case NodeKind.MethodDeclaration:
156
159
  this.visitMethodDeclaration(node, ref);
157
160
  break;
158
- case 60:
161
+ case NodeKind.NamespaceDeclaration:
159
162
  this.visitNamespaceDeclaration(node, false, ref);
160
163
  break;
161
- case 61:
164
+ case NodeKind.TypeDeclaration:
162
165
  this.visitTypeDeclaration(node, ref);
163
166
  break;
164
- case 62:
167
+ case NodeKind.VariableDeclaration:
165
168
  this.visitVariableDeclaration(node, ref);
166
169
  break;
167
- case 63:
170
+ case NodeKind.Decorator:
168
171
  this.visitDecoratorNode(node, ref);
169
172
  break;
170
- case 64:
173
+ case NodeKind.ExportMember:
171
174
  this.visitExportMember(node, ref);
172
175
  break;
173
- case 65:
176
+ case NodeKind.SwitchCase:
174
177
  this.visitSwitchCase(node, ref);
175
178
  break;
176
- case 66:
179
+ case NodeKind.IndexSignature:
177
180
  this.visitIndexSignature(node, ref);
178
181
  break;
179
- case 19:
182
+ case NodeKind.Null:
180
183
  this.visitNullExpression(node, ref);
181
184
  break;
182
- case 26: {
185
+ case NodeKind.True: {
183
186
  this.visitTrueExpression(node, ref);
184
187
  break;
185
188
  }
186
- case 14: {
189
+ case NodeKind.False: {
187
190
  this.visitFalseExpression(node, ref);
188
191
  break;
189
192
  }
190
- case 30: {
193
+ case NodeKind.Compiled: {
191
194
  this.visitCompiledExpression(node, ref);
192
195
  break;
193
196
  }
194
- case 27: {
197
+ case NodeKind.Constructor: {
195
198
  this.visitConstructorExpression(node, ref);
196
199
  break;
197
200
  }
198
- case 67: {
201
+ case NodeKind.Comment: {
199
202
  this.visitComment(node, ref);
200
203
  break;
201
204
  }
202
- case 41: {
205
+ case NodeKind.ForOf: {
203
206
  this.visitForOfStatement(node, ref);
204
207
  break;
205
208
  }
206
- case 51: {
209
+ case NodeKind.Module: {
207
210
  this.visitModuleDeclaration(node, ref);
208
211
  break;
209
212
  }
210
- case 20: {
213
+ case NodeKind.Omitted: {
211
214
  this.visitOmittedExpression(node, ref);
212
215
  break;
213
216
  }
214
- case 6: {
217
+ case NodeKind.Parameter: {
215
218
  this.visitParameter(node, ref);
216
219
  break;
217
220
  }
218
- case 24: {
221
+ case NodeKind.Super: {
219
222
  this.visitSuperExpression(node, ref);
220
223
  break;
221
224
  }
222
- case 25: {
225
+ case NodeKind.This: {
223
226
  this.visitThisExpression(node, ref);
224
227
  break;
225
228
  }
226
- case 49: {
229
+ case NodeKind.Void: {
227
230
  this.visitVoidStatement(node, ref);
228
231
  break;
229
232
  }