2015-07-23 13:59:29 +02:00
|
|
|
require 'opal'
|
|
|
|
require "opal/parser"
|
|
|
|
|
|
|
|
require "salama"
|
2015-07-23 15:23:10 +02:00
|
|
|
require "interpreter"
|
|
|
|
|
|
|
|
require 'opal-react'
|
|
|
|
|
2015-07-23 13:59:29 +02:00
|
|
|
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'
|
|
|
|
|
2015-07-23 13:59:29 +02:00
|
|
|
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"
|
|
|
|
|
2015-07-23 13:59:29 +02:00
|
|
|
end
|