mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Use createMissingNode for sentinel node
This commit is contained in:
1 parent
1cffd5f8aa
commit
b62d5f6696
1 file changed
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user