2015-07-22 15:17:25 +02:00
|
|
|
|
|
|
|
class Debugger
|
|
|
|
|
|
|
|
include React::Component
|
2015-07-23 15:23:10 +02:00
|
|
|
required_param :machine , :type => Virtual::Machine
|
|
|
|
define_state :interpreter => Interpreter.new
|
2015-07-22 15:17:25 +02:00
|
|
|
|
2015-07-23 16:26:48 +02:00
|
|
|
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"
|
2015-07-23 19:08:40 +02:00
|
|
|
interpreter.start machine.init
|
2015-07-23 16:26:48 +02:00
|
|
|
end
|
2015-07-22 15:17:25 +02:00
|
|
|
def render
|
2015-07-23 12:15:26 +02:00
|
|
|
div.container do
|
|
|
|
div.row do
|
|
|
|
div.col_md_1 do
|
2015-07-23 13:59:29 +02:00
|
|
|
ClassView classes: machine.space.classes
|
2015-07-22 21:05:31 +02:00
|
|
|
end
|
2015-07-23 12:15:26 +02:00
|
|
|
div.col_md_11 do
|
|
|
|
div.row do
|
|
|
|
div.col_md_4 do
|
2015-07-22 22:08:36 +02:00
|
|
|
"Future one"
|
|
|
|
end
|
2015-07-23 16:26:48 +02:00
|
|
|
div.col_md_8 do
|
2015-07-23 19:08:40 +02:00
|
|
|
BlockView interpreter: interpreter
|
2015-07-22 22:08:36 +02:00
|
|
|
end
|
|
|
|
end
|
2015-07-23 19:08:40 +02:00
|
|
|
RegisterView interpreter: interpreter
|
2015-07-22 21:05:31 +02:00
|
|
|
end
|
|
|
|
end
|
2015-07-22 15:17:25 +02:00
|
|
|
end
|
2015-07-22 22:08:36 +02:00
|
|
|
|
2015-07-22 15:17:25 +02:00
|
|
|
end
|
|
|
|
end
|