rubyx/test/virtual/virtual_helper.rb

21 lines
518 B
Ruby

require_relative '../helper'
require 'parslet/convenience'
module VirtualHelper
# need a code generator, for arm
def setup
# @object_space = Boot::BootSpace.new "Arm"
end
def check
parser = Parser::Sapphire.new
syntax = parser.parse_with_debug(@string_input)
parts = Parser::Transform.new.apply(syntax)
machine = Virtual::Machine.new
main = Virtual::MethodDefinition.main
expressions = parts.compile(machine.frame , main )
assert_equal @output , expressions
end
end