Skip to content

Commit b62d5f6

Browse files
committed
Use createMissingNode for sentinel node
1 parent 1cffd5f commit b62d5f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3027,7 +3027,7 @@ namespace ts {
30273027
if (inParameter && requireEqualsToken) {
30283028
// = is required when speculatively parsing arrow function parameters,
30293029
// so return a fake initializer as a signal that the equals token was missing
3030-
const result = createNode(SyntaxKind.Identifier, scanner.getStartPos()) as Identifier;
3030+
const result = createMissingNode(SyntaxKind.Identifier, /*reportAtCurrentPosition*/ true, Diagnostics._0_expected, "=") as Identifier;
30313031
result.escapedText = "= not found" as __String;
30323032
return result;
30333033
}

0 commit comments

Comments
 (0)