Example #1
0
        /// <summary>
        /// Generates the code for a FunctionCall node.
        /// </summary>
        /// <param name="fc">The FunctionCall node.</param>
        /// <returns>String containing C# code for FunctionCall fc.</returns>
        private string GenerateFunctionCall(FunctionCall fc)
        {
            string retstr = String.Empty;

            string modinvoke = null;
            if (m_comms != null)
                modinvoke = m_comms.LookupModInvocation(fc.Id);
            
            if (modinvoke != null)
            {
                if (fc.kids[0] is ArgumentList)
                {
                    if ((fc.kids[0] as ArgumentList).kids.Count == 0)
                        retstr += Generate(String.Format("{0}(\"{1}\"",modinvoke,fc.Id), fc);
                    else
                        retstr += Generate(String.Format("{0}(\"{1}\",",modinvoke,fc.Id), fc);
                }
            }
            else
            {
                retstr += Generate(String.Format("{0}(", CheckName(fc.Id)), fc);
            }
            
            foreach (SYMBOL kid in fc.kids)
                retstr += GenerateNode(fc, kid);

            retstr += Generate(")");

            return retstr;
        }
Example #2
0
        /// <summary>
        /// Generates the code for a FunctionCall node.
        /// </summary>
        /// <param name="fc">The FunctionCall node.</param>
        /// <returns>String containing C# code for FunctionCall fc.</returns>
        private string GenerateFunctionCall(FunctionCall fc)
        {
            string retstr = String.Empty;

            retstr += Generate(String.Format("{0}(", CheckName(fc.Id)), fc);

            foreach (SYMBOL kid in fc.kids)
                retstr += GenerateNode(kid);

            retstr += Generate(")");

            return retstr;
        }
Example #3
0
 public  FunctionCallExpression (Parser yyp, FunctionCall  fc ):base(((LSLSyntax
)yyp)){ kids . Add ( fc );
}
Example #4
0
 public  Statement (Parser yyp, FunctionCall  fc ):base(((LSLSyntax
)yyp)){ kids . Add ( fc );
}