コード例 #1
0
    private static IEnumerable <string> GenerateExternCall(IExternCall externCall, string contentOfFunctionName, int level)
    {
        var functionName     = externCall.Function.Name;
        var saneFunctionName = _namingHelper.FixExternalFunction(functionName);

        if (VERBOSE)
        {
            yield return("\r\n//<externCall>\r\n");
        }
        yield return($"__ext_{saneFunctionName}(");

        bool first = true;

        foreach (var argExpr in externCall.ArgExprs)
        {
            if (first)
            {
                first = false;
            }
            else
            {
                yield return(", ");
            }

            foreach (var argExprCode in GenerateExpression(argExpr, contentOfFunctionName, level))
            {
                yield return(argExprCode);
            }
        }

        yield return(")");
    }