public override Result VisitFunc_named_arg([NotNull] STGrammerParser.Func_named_argContext context) { string strLhs = Visit(context.lhs).Info as string; string strRhs = Visit(context.rhs).Info as string; switch (context.op.Type) { case STGrammerParser.ASSIGN: return(new Result(true, strLhs + ":=" + strRhs)); case STGrammerParser.OUTREF: return(new Result(true, strLhs + "=>" + strRhs)); default: return(DefaultResult); } }
/// <summary> /// Visit a parse tree produced by the <c>func_named_arg</c> /// labeled alternative in <see cref="STGrammerParser.func_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 VisitFunc_named_arg([NotNull] STGrammerParser.Func_named_argContext context) { return(VisitChildren(context)); }