public Type Visit(Argument argument, FunctionGeneratorEnvironment arg) { arg.AllocateVariable(argument.id, (Type)argument.type); Program.Emit(T42Instruction.DECL(1)); return((Type)argument.type); }
public T42Program Generate(Statement stmt) { var globalEnvironment = new FunctionGeneratorEnvironment(); Program.Emit(T42Instruction.DECL(1)); Program.Emit(T42Instruction.BSR("main")); Program.Emit(T42Instruction.END); stmt.Accept(this, globalEnvironment); Program.Link(); return(Program); }