public override void ExitReturnStmt(ssuplParser.ReturnStmtContext context) { // returnStmt : RETURN expr code.Put(context, code.Get(context.expr()), "pop rax", "ret"); }
public override void ExitReturnStmt(ssuplParser.ReturnStmtContext context) { var regname = resultRegister.Get(context.expr()); code.Put(context, code.Get(context.expr()), "pop rax", "ret"); }
/// <summary> /// Exit a parse tree produced by <see cref="ssuplParser.returnStmt"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitReturnStmt([NotNull] ssuplParser.ReturnStmtContext context) { }
public override void ExitReturnStmt(ssuplParser.ReturnStmtContext context) { code.Put(context, code.Get(context.expr()), "ret"); }