Skip to content

Commit ae0caed

Browse files
committed
Merge pull request #1473 from Microsoft/parsePrimaryExpression
Switch order of switch cases in parsePrimaryExpression
2 parents de062ae + ba963c3 commit ae0caed

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/compiler/parser.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2670,16 +2670,16 @@ module ts {
26702670

26712671
function parsePrimaryExpression(): PrimaryExpression {
26722672
switch (token) {
2673+
case SyntaxKind.NumericLiteral:
2674+
case SyntaxKind.StringLiteral:
2675+
case SyntaxKind.NoSubstitutionTemplateLiteral:
2676+
return parseLiteralNode();
26732677
case SyntaxKind.ThisKeyword:
26742678
case SyntaxKind.SuperKeyword:
26752679
case SyntaxKind.NullKeyword:
26762680
case SyntaxKind.TrueKeyword:
26772681
case SyntaxKind.FalseKeyword:
26782682
return parseTokenNode<PrimaryExpression>();
2679-
case SyntaxKind.NumericLiteral:
2680-
case SyntaxKind.StringLiteral:
2681-
case SyntaxKind.NoSubstitutionTemplateLiteral:
2682-
return parseLiteralNode();
26832683
case SyntaxKind.OpenParenToken:
26842684
return parseParenthesizedExpression();
26852685
case SyntaxKind.OpenBracketToken:

0 commit comments

Comments
 (0)