diff --git a/Gemfile.lock b/Gemfile.lock index 15b3af2..0c22520 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,7 +29,7 @@ GEM chromedriver2-helper (0.0.10) nokogiri cliver (0.3.2) - concurrent-ruby (1.0.5) + concurrent-ruby (1.1.1) diff-lcs (1.3) ffi (1.9.23) hike (1.2.3) @@ -38,7 +38,7 @@ GEM minitest (5.11.3) nokogiri (1.8.2) mini_portile2 (~> 2.3.0) - opal (0.11.0) + opal (0.11.3) ast (>= 2.3.0) hike (~> 1.2) parser (= 2.3.3.1) @@ -46,7 +46,7 @@ GEM opal-browser (0.2.0) opal paggio - opal-sprockets (0.4.1.0.11.0.3.1) + opal-sprockets (0.4.2.0.11.0.3.1) opal (~> 0.11.0) sprockets (~> 3.1) tilt (>= 1.4) @@ -58,7 +58,7 @@ GEM cliver (~> 0.3.1) websocket-driver (>= 0.2.0) public_suffix (3.0.2) - rack (2.0.4) + rack (2.0.6) rack-test (1.0.0) rack (>= 1.0, < 3) rspec (3.7.0) @@ -80,7 +80,7 @@ GEM childprocess (~> 0.5) rubyzip (~> 1.2) sourcemap (0.1.1) - sprockets (3.7.1) + sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) tilt (2.0.8) @@ -108,4 +108,4 @@ DEPENDENCIES selenium-webdriver BUNDLED WITH - 1.16.0 + 1.16.1 diff --git a/index.html.erb b/index.html.erb index 8cd7ba7..b215bbb 100644 --- a/index.html.erb +++ b/index.html.erb @@ -2,6 +2,7 @@ Debugger + diff --git a/lib/debugger.js.rb b/lib/debugger.js.rb index 817e552..6c7c49a 100644 --- a/lib/debugger.js.rb +++ b/lib/debugger.js.rb @@ -10,7 +10,7 @@ require "rubyx" require "ast" require "util/eventable" require "risc/interpreter" -# the base, our own litle framework, allows for child and parent views and handles updates +# the base, our own mini framework, allows for child and parent views and handles updates require "base/list_view" # each seperate view is in it's own class. require "views/left_view" @@ -37,11 +37,10 @@ class String end end class MainView < ListView - include AST::Sexp def initialize input = "class Space;def main(arg); return 1; end; end" - linker = RubyX::RubyXCompiler.new(input).ruby_to_binary(:interpreter) + linker = RubyX::RubyXCompiler.new.ruby_to_binary(input , :interpreter) @interpreter = Risc::Interpreter.new(linker) super( [LeftView.new(@interpreter) , VoolView.new(@interpreter) , diff --git a/lib/views/left_view.rb b/lib/views/left_view.rb index 5b18073..adbb649 100644 --- a/lib/views/left_view.rb +++ b/lib/views/left_view.rb @@ -61,7 +61,7 @@ class SelectView < ElementView @interpreter.set_state :stopped @element.at_css(".selected").text = code ruby = get_codes[code] - linker = RubyX::RubyXCompiler.new(as_main(ruby)).ruby_to_binary(:interpreter) + linker = RubyX::RubyXCompiler.new.ruby_to_binary(as_main(ruby), :interpreter) @interpreter.start_program(linker) end def as_main(statements)