rubyx-debugger/app/main.rb

25 lines
666 B
Ruby
Raw Normal View History

require 'opal'
require "opal/parser"
require "salama"
2015-07-23 15:23:10 +02:00
require "interpreter"
require 'opal-react'
require "class_view"
require "register_view"
require "source_view"
require "block_view"
require "debugger"
2015-07-23 15:23:10 +02:00
require 'opal-jquery'
Document.ready? do # Document.ready? is a opal-jquery method.
2015-07-23 15:23:10 +02:00
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