Skip to content

Commit db90510

Browse files
committed
fix(ts): fix await issue
1 parent 9a8d927 commit db90510

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

chapi-ast-typescript/src/main/antlr/TypeScriptParser.g4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -878,13 +878,11 @@ singleExpression
878878
| iteratorBlock # IteratorsExpression // ECMAScript 6
879879
| generatorBlock # GeneratorsExpression // ECMAScript 6
880880
| generatorFunctionDeclaration # GeneratorsFunctionExpression // ECMAScript 6
881-
| yieldStatement # YieldExpression // ECMAScript 6
882-
| Await singleExpression # AwaitExpression
883881

884882
// TODO: careful use those
885883
| singleExpression '(' (argumentList ','?)? ')' # ArgumentsExpression
886884
// RealtionExpression will have conflict
887-
| singleExpression '<' typeArgumentList '>' '(' (argumentList ','?)? ')'# ArgumentsExpression
885+
| singleExpression '<' typeArgumentList '>' '(' (argumentList ','?)? ')' # ArgumentsExpression
888886

889887
// respect precedence by order of sub-rules
890888
| singleExpression assignmentOperator singleExpression # AssignmentExpression
@@ -922,6 +920,8 @@ singleExpression
922920

923921
| This # ThisExpression
924922
| Super # SuperExpression
923+
| yieldStatement # YieldExpression // ECMAScript 6
924+
| Await singleExpression # AwaitExpression
925925
| typeArguments? identifierName singleExpression? # IdentifierExpression
926926
| typeArguments expressionSequence? # GenericTypes
927927
| literal # LiteralExpression

0 commit comments

Comments
 (0)