From b62d5f6696cab153d789754da21811f659b1910b Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Wed, 13 Sep 2017 10:26:11 -0700 Subject: [PATCH] Use createMissingNode for sentinel node --- src/compiler/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index dbd57c6f9be..6a1f5824135 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3027,7 +3027,7 @@ namespace ts { if (inParameter && requireEqualsToken) { // = is required when speculatively parsing arrow function parameters, // so return a fake initializer as a signal that the equals token was missing - const result = createNode(SyntaxKind.Identifier, scanner.getStartPos()) as Identifier; + const result = createMissingNode(SyntaxKind.Identifier, /*reportAtCurrentPosition*/ true, Diagnostics._0_expected, "=") as Identifier; result.escapedText = "= not found" as __String; return result; }