public override object VisitStringExp([NotNull] CoolParser.StringExpContext context) { VisitExpr(context); //var s = context.s.Text; dotcode += "\"" + context.GetType().Name.Substring(0, context.GetType().Name.Length - 7) + "\"[label=" + context.GetText() + "]" + "\n"; return(VisitChildren(context)); }
public override Node VisitStringExp([NotNull] CoolParser.StringExpContext context) { //Data.Add("string" + stringcount++ + ":" + "\t.asciiz\t" + context.STRING().GetText()); SymbolTable.StringVariables[context.STRING().GetText()] = stringcount; var s = VisitChildren(context); return(new StringNode(context, s)); }
public StringNode(CoolParser.StringExpContext context, Node s) : base(s.Childs) { this.context = context; this.s = s; this.V = context.STRING().GetText(); I = MIPS.stringCount++; Type = "String"; }
/// <summary> /// Exit a parse tree produced by the <c>stringExp</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 ExitStringExp([NotNull] CoolParser.StringExpContext context) { }
/// <summary> /// Visit a parse tree produced by the <c>stringExp</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 VisitStringExp([NotNull] CoolParser.StringExpContext context) { return(VisitChildren(context)); }
public static string getCoolType(this CoolParser.StringExpContext s) { return("STRING"); }
public override bool VisitStringExp([NotNull] CoolParser.StringExpContext context) { return(VisitChildren(context)); }