rubyx-debugger/app/debugger.rb

43 lines
985 B
Ruby
Raw Normal View History

2015-07-22 15:17:25 +02:00
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
2015-07-22 15:17:25 +02:00
2015-07-23 12:15:26 +02:00
def initialize
@interpreter = Interpreter.new
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
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 12:15:26 +02:00
div.col_md_4 do
2015-07-22 22:08:36 +02:00
"Future two"
end
2015-07-23 12:15:26 +02:00
div.col_md_4 do
2015-07-22 22:08:36 +02:00
BlockView block: [ "block 1" , "block 2"]
end
end
2015-07-23 12:15:26 +02:00
RegisterView registers: @interpreter.registers
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