From e46442f45f99f3277d6e2fc222402c5051379c6f Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 13 Mar 2015 12:08:58 -0700 Subject: [PATCH] addressed PR feedback: fixed typo in function name --- src/compiler/parser.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 7656e2eb2c9..2620c23398b 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -2975,9 +2975,10 @@ module ts { return !scanner.hasPrecedingLineBreak() && isIdentifier() } - function netTokenIsIdentifierOrStartOfDestructuringOnTheSameLine() { + function nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine() { nextToken(); - return !scanner.hasPrecedingLineBreak() && (isIdentifier() || token === SyntaxKind.OpenBraceToken || token === SyntaxKind.OpenBracketToken) + return !scanner.hasPrecedingLineBreak() && + (isIdentifier() || token === SyntaxKind.OpenBraceToken || token === SyntaxKind.OpenBracketToken); } function parseYieldExpression(): YieldExpression { @@ -4878,9 +4879,9 @@ module ts { } function isLetDeclaration() { - // It is let declaration if in strict mode or next token is identifier\open brace\open curly on same line. + // It is let declaration if in strict mode or next token is identifier\open bracket\open curly on same line. // otherwise it needs to be treated like identifier - return inStrictModeContext() || lookAhead(netTokenIsIdentifierOrStartOfDestructuringOnTheSameLine); + return inStrictModeContext() || lookAhead(nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine); } function isDeclarationStart(): boolean {