Example #1
0
        public override AST_Node VisitAsignacion([NotNull] CoolParser.AsignacionContext context)
        {
            AST_Expresion exp = (AST_Expresion)Visit(context.expr());
            string        id  = context.ID().GetText();

            return(new AST_Asignacion(context, id, exp));
        }
 /// <summary>
 /// Visit a parse tree produced by the <c>asignacion</c>
 /// labeled alternative in <see cref="CoolParser.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 VisitAsignacion([NotNull] CoolParser.AsignacionContext context)
 {
     return(VisitChildren(context));
 }