From eaf097752a5d1dc40dc99a8f40eb37df8dd7d114 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Thu, 8 May 2014 19:31:36 +0300 Subject: [PATCH] use debug when parsing --- test/test_runner.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/test_runner.rb b/test/test_runner.rb index 8aa8adf4..198c32fc 100644 --- a/test/test_runner.rb +++ b/test/test_runner.rb @@ -1,5 +1,6 @@ require_relative 'helper' require "yaml" +require "parslet/convenience" class TestRunner < MiniTest::Test # this creates test methods dynamically , one for each file in runners directory @@ -18,10 +19,11 @@ class TestRunner < MiniTest::Test def execute file string = File.read(file) - syntax = Parser::Composed.new.parse(string) - main = Parser::Transform.new.apply(syntax) - + parser = Parser::Composed.new + syntax = parser.function_definition.parse_with_debug(string) program = Vm::Program.new "Arm" + main = Parser::Transform.new.apply(syntax) + program.main = main.compile( program.context )