trying to find exception
This commit is contained in:
parent
03c0041255
commit
1f19a28906
@ -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
|
||||||
|
17
app/main.rb
17
app/main.rb
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user