Merge pull request #23974 from ialexryan/patch-1

Fix typo in parser.ts
This commit is contained in:
Mohamed Hegazy
2018-05-08 14:26:25 -07:00
committed by GitHub

View File

@@ -3572,7 +3572,7 @@ namespace ts {
// 2) CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await][no LineTerminator here]=>AsyncConciseBody[?In]
if (token() === SyntaxKind.AsyncKeyword) {
nextToken();
// If the "async" is followed by "=>" token then it is not a begining of an async arrow-function
// If the "async" is followed by "=>" token then it is not a beginning of an async arrow-function
// but instead a simple arrow-function which will be parsed inside "parseAssignmentExpressionOrHigher"
if (scanner.hasPrecedingLineBreak() || token() === SyntaxKind.EqualsGreaterThanToken) {
return Tristate.False;