Skip to content

Commit 5d51a42

Browse files
committed
Use createMissingNode for sentinel node
1 parent d1efefe commit 5d51a42

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
@@ -3028,7 +3028,7 @@ namespace ts {
30283028
if (inParameter && requireEqualsToken) {
30293029
// = is required when speculatively parsing arrow function parameters,
30303030
// so return a fake initializer as a signal that the equals token was missing
3031-
const result = createNode(SyntaxKind.Identifier, scanner.getStartPos()) as Identifier;
3031+
const result = createMissingNode(SyntaxKind.Identifier, /*reportAtCurrentPosition*/ true, Diagnostics._0_expected, "=") as Identifier;
30323032
result.escapedText = "= not found" as __String;
30333033
return result;
30343034
}

0 commit comments

Comments
 (0)