A good start on the macro idea
I call it macro because it lets you insert basically arbitrary risc code into the ruby level. The way it works: Reserve namespace X map any X.some_call to a Mom instruction by the name SomeCall which must take the same args in constructor as given And obviously produce whatever risc it wants Hoping to rewrite builtin around this idea (with the existing Mom builtn instructions)
This commit is contained in:
@ -2,12 +2,20 @@ require_relative "../helper"
|
||||
|
||||
module Ruby
|
||||
module RubyTests
|
||||
include ScopeHelper
|
||||
def setup
|
||||
Parfait.boot!(Parfait.default_test_options)
|
||||
end
|
||||
def compile(input)
|
||||
RubyCompiler.compile(input)
|
||||
end
|
||||
def compile_main(input)
|
||||
RubyCompiler.compile(as_main(input))
|
||||
end
|
||||
def compile_main_vool(input)
|
||||
xcompiler = RubyX::RubyXCompiler.new(RubyX.default_test_options)
|
||||
xcompiler.ruby_to_vool(as_main(input))
|
||||
end
|
||||
|
||||
def assert_raises_muted &block
|
||||
orig_stdout = $stdout
|
||||
|
Reference in New Issue
Block a user