Example #1
0
        /* function */
        public override Result VisitExpr_funccall([NotNull] STGrammerParser.Expr_funccallContext context)
        {
            string strFunc = context.funcname.Text + "(";

            foreach (var e in context._args)
            {
                string str = Visit(e).Info as string;
                strFunc += str;
                strFunc += ",";
            }
            if (context._args.Count != 0)
            {
                strFunc = strFunc.Remove(strFunc.Length - 1);
            }

            foreach (var e in context._args2)
            {
                strFunc += ",";
                string str = Visit(e).Info as string;
                strFunc += str;
            }

            strFunc += ")";

            return(new Result(true, strFunc));
        }
 /// <summary>
 /// Visit a parse tree produced by the <c>expr_funccall</c>
 /// labeled alternative in <see cref="STGrammerParser.expr"/>.
 /// <para>
 /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/>
 /// on <paramref name="context"/>.
 /// </para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 /// <return>The visitor result.</return>
 public virtual Result VisitExpr_funccall([NotNull] STGrammerParser.Expr_funccallContext context)
 {
     return(VisitChildren(context));
 }