public static ExpressionSyntax Transpile(this Syntax.FunctionCallSyntax functionCallNode) { _ = functionCallNode ?? throw new ArgumentNullException(nameof(functionCallNode)); var functionCall = SyntaxFactory.InvocationExpression( functionCallNode.IdentifierNameNode.TranspileExpression()); if (functionCallNode.EmptyArgumentListNode is null) { return(functionCall.AddArgumentListArguments(functionCallNode.ArgumentListNode.Transpile().ToArray())); } return(functionCall); }
public static void Transpile(this Syntax.FunctionCallSyntax functionCallNode, ref StringBuilder sb, out bool isString) { _ = functionCallNode ?? throw new ArgumentNullException(nameof(functionCallNode)); isString = TranspileStringConcatenationHandler.IsFunctionStringReturnType(functionCallNode.IdentifierNameNode.ValueText); functionCallNode.IdentifierNameNode.TranspileExpression(ref sb); sb.Append('('); if (functionCallNode.EmptyArgumentListNode is null) { functionCallNode.ArgumentListNode.Transpile(ref sb); } sb.Append(')'); }