trying to find exception

This commit is contained in:
Torsten Ruger 2015-07-23 16:23:10 +03:00
parent 03c0041255
commit 1f19a28906
3 changed files with 15 additions and 19 deletions

View File

@ -2,18 +2,8 @@
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
def initialize
@interpreter = Interpreter.new
end
required_param :machine , :type => Virtual::Machine
define_state :interpreter => Interpreter.new
def render
div.container do
@ -33,7 +23,7 @@ class Debugger
BlockView block: [ "block 1" , "block 2"]
end
end
RegisterView registers: @interpreter.registers
RegisterView registers: interpreter.registers
end
end
end

View File

@ -1,17 +1,24 @@
require 'opal'
require "opal/parser"
require 'opal-jquery'
require "json"
require 'opal-react'
require "salama"
require "interpreter"
require 'opal-react'
require "class_view"
require "register_view"
require "source_view"
require "block_view"
require "interpreter"
require "debugger"
require 'opal-jquery'
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

View File

@ -1,7 +1,6 @@
# config.ru
require 'bundler'
Bundler.require
require "opal/parser"
Opal.use_gem "salama"
Opal.use_gem "salama-arm"