Skip to content

Commit e46442f

Browse files
committed
addressed PR feedback: fixed typo in function name
1 parent 171a5f8 commit e46442f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/compiler/parser.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2975,9 +2975,10 @@ module ts {
29752975
return !scanner.hasPrecedingLineBreak() && isIdentifier()
29762976
}
29772977

2978-
function netTokenIsIdentifierOrStartOfDestructuringOnTheSameLine() {
2978+
function nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine() {
29792979
nextToken();
2980-
return !scanner.hasPrecedingLineBreak() && (isIdentifier() || token === SyntaxKind.OpenBraceToken || token === SyntaxKind.OpenBracketToken)
2980+
return !scanner.hasPrecedingLineBreak() &&
2981+
(isIdentifier() || token === SyntaxKind.OpenBraceToken || token === SyntaxKind.OpenBracketToken);
29812982
}
29822983

29832984
function parseYieldExpression(): YieldExpression {
@@ -4878,9 +4879,9 @@ module ts {
48784879
}
48794880

48804881
function isLetDeclaration() {
4881-
// It is let declaration if in strict mode or next token is identifier\open brace\open curly on same line.
4882+
// It is let declaration if in strict mode or next token is identifier\open bracket\open curly on same line.
48824883
// otherwise it needs to be treated like identifier
4883-
return inStrictModeContext() || lookAhead(netTokenIsIdentifierOrStartOfDestructuringOnTheSameLine);
4884+
return inStrictModeContext() || lookAhead(nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine);
48844885
}
48854886

48864887
function isDeclarationStart(): boolean {

0 commit comments

Comments
 (0)