Skip to content

Commit 9a8d927

Browse files
committed
fix(ts): align erros
1 parent 1d6feaa commit 9a8d927

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,7 @@ singleExpression
923923
| This # ThisExpression
924924
| Super # SuperExpression
925925
| typeArguments? identifierName singleExpression? # IdentifierExpression
926+
| typeArguments expressionSequence? # GenericTypes
926927
| literal # LiteralExpression
927928
| arrayLiteral # ArrayLiteralExpression
928929
| objectLiteral # ObjectLiteralExpression

chapi-ast-typescript/src/main/kotlin/chapi/ast/typescriptast/TypeScriptFullIdentListener.kt

+7-7
Original file line numberDiff line numberDiff line change
@@ -622,14 +622,14 @@ class TypeScriptFullIdentListener(node: TSIdentify) : TypeScriptAstListener() {
622622
when (ctx) {
623623
is IdentifierExpressionContext -> {
624624
currentExprIdent = ctx.identifierName().text
625-
//
626-
// if (ctx.singleExpression() != null) {
627-
// parseSingleExpression(ctx.singleExpression())
628-
// }
625+
626+
if (ctx.singleExpression() != null) {
627+
parseSingleExpression(ctx.singleExpression())
628+
}
629+
}
630+
is TypeScriptParser.GenericTypesContext -> {
631+
parseExpressionSequence(ctx.expressionSequence())
629632
}
630-
// is TypeScriptParser.GenericTypesContext -> {
631-
// parseExpressionSequence(ctx.expressionSequence())
632-
// }
633633
is TypeScriptParser.ArgumentsExpressionContext -> {
634634
argumentsExpressionToCall(ctx)
635635
}

0 commit comments

Comments
 (0)