renaming mom builtin to macro

This commit is contained in:
2019-09-11 20:17:43 +03:00
parent 5ea91df4c1
commit 616dd3487c
55 changed files with 49 additions and 47 deletions

20
lib/mom/macro/exit.rb Normal file
View File

@@ -0,0 +1,20 @@
module Mom
module Builtin
class Exit < ::Mom::Instruction
def to_risc(compiler)
builder = compiler.builder(compiler.source)
builder.prepare_int_return # makes integer_tmp variable as return
Builtin.exit_sequence(builder)
return compiler
end
end
end
class Exit < Macro
def to_risc(compiler)
builder = compiler.builder(compiler.source)
builder.prepare_int_return # makes integer_tmp variable as return
Builtin.exit_sequence(builder)
return compiler
end
end
end