public override object VisitIntExp([NotNull] CoolParser.IntExpContext context) { VisitExpr(context); dotcode += "\"" + context.GetType().Name.Substring(0, context.GetType().Name.Length - 7) + "\"[label=" + context.GetText() + "]" + "\n"; return(VisitChildren(context)); }
public override Node VisitIntExp([NotNull] CoolParser.IntExpContext context) { var s = VisitChildren(context); return(new IntNode(context, s)); }
/// <summary> /// Exit a parse tree produced by the <c>intExp</c> /// labeled alternative in <see cref="CoolParser.expresion"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitIntExp([NotNull] CoolParser.IntExpContext context) { }
/// <summary> /// Visit a parse tree produced by the <c>intExp</c> /// labeled alternative in <see cref="CoolParser.expresion"/>. /// <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 VisitIntExp([NotNull] CoolParser.IntExpContext context) { return(VisitChildren(context)); }
public IntNode(CoolParser.IntExpContext context, Node s) : base(s.Childs) { this.context = context; this.V = int.Parse(context.INT().GetText()); Type = "Int"; }
public static string getCoolType(this CoolParser.IntExpContext s) { return("INT"); }
public override bool VisitIntExp([NotNull] CoolParser.IntExpContext context) { return(VisitChildren(context)); }