trying to find exception

This commit is contained in:
Torsten Ruger 2015-07-23 16:23:10 +03:00
parent 03c0041255
commit 1f19a28906
3 changed files with 15 additions and 19 deletions

View File

@ -2,18 +2,8 @@
class Debugger class Debugger
include React::Component include React::Component
# required_param :machine required_param :machine , :type => Virtual::Machine
define_state :machine => Virtual.machine.boot define_state :interpreter => Interpreter.new
before_mount do
code = Ast::ExpressionList.new [Ast::CallSiteExpression.new( "putstring", [], Ast::StringExpression.new("Hello again"))]
Virtual::Compiler.compile( code , machine.space.get_main )
machine.run_before "Register::CallImplementation"
end
def initialize
@interpreter = Interpreter.new
end
def render def render
div.container do div.container do
@ -33,7 +23,7 @@ class Debugger
BlockView block: [ "block 1" , "block 2"] BlockView block: [ "block 1" , "block 2"]
end end
end end
RegisterView registers: @interpreter.registers RegisterView registers: interpreter.registers
end end
end end
end end

View File

@ -1,17 +1,24 @@
require 'opal' require 'opal'
require "opal/parser" require "opal/parser"
require 'opal-jquery'
require "json"
require 'opal-react'
require "salama" require "salama"
require "interpreter"
require 'opal-react'
require "class_view" require "class_view"
require "register_view" require "register_view"
require "source_view" require "source_view"
require "block_view" require "block_view"
require "interpreter"
require "debugger" require "debugger"
require 'opal-jquery'
Document.ready? do # Document.ready? is a opal-jquery method. Document.ready? do # Document.ready? is a opal-jquery method.
React.render( React.create_element( Debugger ), Element['#content'] ) machine = Virtual.machine.boot
React.render( React.create_element( Debugger , :machine => machine ), Element['#content'] )
code = Ast::ExpressionList.new( [Ast::CallSiteExpression.new(:putstring, [] ,Ast::StringExpression.new("Hello again"))])
Virtual::Compiler.compile( code , machine.space.get_main )
machine.run_before "Register::CallImplementation"
end end

View File

@ -1,7 +1,6 @@
# config.ru # config.ru
require 'bundler' require 'bundler'
Bundler.require Bundler.require
require "opal/parser"
Opal.use_gem "salama" Opal.use_gem "salama"
Opal.use_gem "salama-arm" Opal.use_gem "salama-arm"