trying to find exception
This commit is contained in:
parent
03c0041255
commit
1f19a28906
@ -2,18 +2,8 @@
|
||||
class Debugger
|
||||
|
||||
include React::Component
|
||||
# required_param :machine
|
||||
define_state :machine => Virtual.machine.boot
|
||||
|
||||
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
|
||||
required_param :machine , :type => Virtual::Machine
|
||||
define_state :interpreter => Interpreter.new
|
||||
|
||||
def render
|
||||
div.container do
|
||||
@ -33,7 +23,7 @@ class Debugger
|
||||
BlockView block: [ "block 1" , "block 2"]
|
||||
end
|
||||
end
|
||||
RegisterView registers: @interpreter.registers
|
||||
RegisterView registers: interpreter.registers
|
||||
end
|
||||
end
|
||||
end
|
||||
|
17
app/main.rb
17
app/main.rb
@ -1,17 +1,24 @@
|
||||
require 'opal'
|
||||
require "opal/parser"
|
||||
require 'opal-jquery'
|
||||
require "json"
|
||||
require 'opal-react'
|
||||
|
||||
require "salama"
|
||||
require "interpreter"
|
||||
|
||||
require 'opal-react'
|
||||
|
||||
require "class_view"
|
||||
require "register_view"
|
||||
require "source_view"
|
||||
require "block_view"
|
||||
require "interpreter"
|
||||
require "debugger"
|
||||
|
||||
require 'opal-jquery'
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user