@@ -806,7 +806,7 @@ class TypeScriptFullIdentListener(node: TSIdentify) : TypeScriptAstListener() {
806806 when (singleExprCtx) {
807807 is TypeScriptParser .ArgumentsExpressionContext -> {
808808 currentFunc.FunctionCalls + = CodeCall (
809- Parameters = buildArguments (singleExprCtx.arguments ()),
809+ Parameters = processArgumentList (singleExprCtx.argumentList ()),
810810 FunctionName = buildFunctionName(singleExprCtx),
811811 NodeName = wrapTargetType(singleExprCtx),
812812 Position = buildPosition(ctx)
@@ -911,7 +911,12 @@ class TypeScriptFullIdentListener(node: TSIdentify) : TypeScriptAstListener() {
911911 return arrayOf()
912912 }
913913
914- return arguments?.argumentList()?.argument()?.map {
914+ val argumentList = arguments?.argumentList()
915+ return processArgumentList(argumentList)
916+ }
917+
918+ private fun processArgumentList (argumentList : TypeScriptParser .ArgumentListContext ? ) =
919+ argumentList?.argument()?.map {
915920 parseSingleExpression(it.singleExpression())
916921 val typeValue: String = when (val expr = it.singleExpression()) {
917922 is TypeScriptParser .LiteralExpressionContext -> {
@@ -921,14 +926,14 @@ class TypeScriptFullIdentListener(node: TSIdentify) : TypeScriptAstListener() {
921926 it.text
922927 }
923928 }
929+
924930 else -> {
925931 it.text;
926932 }
927933 }
928934
929935 CodeProperty (TypeValue = typeValue, TypeType = " " )
930936 }?.toTypedArray() ? : arrayOf()
931- }
932937
933938// override fun enterExportDefaultDeclaration(ctx: TypeScriptParser.ExportDefaultDeclarationContext?) {
934939// val singleExpr = ctx!!.singleExpression()
0 commit comments