add some explanation and use github gem versions

This commit is contained in:
Torsten Ruger 2015-08-20 16:13:57 +02:00
parent ef1235d3e8
commit 1f7c06d626
3 changed files with 55 additions and 35 deletions

12
Gemfile
View File

@ -1,15 +1,15 @@
source 'https://rubygems.org'
gem "opal" , :github => "opal/opal"
gem 'opal-browser'
#gem "salama" , "0.2" , :path => "../salama"
gem "parslet" , path: "../parslet"
gem "salama" , path: "../salama"
gem "salama-reader" , path: "../salama-reader"
gem "salama-arm" , path: "../salama-arm"
gem "salama-object-file" , path: "../salama-object-file"
gem "parslet" , github: "salama/parslet"
gem "salama" , github: "salama/salama"
gem "salama-reader" , github: "salama/salama-reader"
gem "salama-arm" , github: "salama/salama-arm"
gem "salama-object-file" , github: "salama/salama-object-file"
gem "sass"
gem "susy"

View File

@ -1,31 +1,46 @@
PATH
remote: ../parslet
GIT
remote: git://github.com/opal/opal.git
revision: c604685071f8560d3357044683a99b80b210a99b
specs:
opal (0.9.0.dev)
hike (~> 1.2)
sourcemap (~> 0.1.0)
sprockets (~> 3.1)
tilt (>= 1.4)
GIT
remote: git://github.com/salama/parslet.git
revision: d4a6444ae01d5688bbb1e8aa27647eb7db1d34a7
specs:
parslet (1.7.0)
PATH
remote: ../salama
GIT
remote: git://github.com/salama/salama-arm.git
revision: 0bd5091e3f284ecf040e0086a41d2449cd5afb7a
specs:
salama-arm (0.0.1)
GIT
remote: git://github.com/salama/salama-object-file.git
revision: fbae6a02764dbe97e01e4833f9ffffe09879b100
specs:
salama-object-file (0.2.0)
GIT
remote: git://github.com/salama/salama-reader.git
revision: 841592c667acea1e796f950851262e6938b231bc
specs:
salama-reader (0.2.0)
parslet (~> 1.7.0)
GIT
remote: git://github.com/salama/salama.git
revision: c039f3d6e6a89a5e66fbcb37f4fb02646fe9d5d6
specs:
salama (0.2.0)
salama-object-file (~> 0.2)
salama-reader (~> 0.2)
PATH
remote: ../salama-arm
specs:
salama-arm (0.0.1)
PATH
remote: ../salama-object-file
specs:
salama-object-file (0.2.0)
PATH
remote: ../salama-reader
specs:
salama-reader (0.2.0)
parslet (~> 1.7.0)
GEM
remote: https://rubygems.org/
specs:
@ -48,11 +63,6 @@ GEM
multi_json (1.11.2)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
opal (0.8.0.rc3)
hike (~> 1.2)
sourcemap (~> 0.1.0)
sprockets (~> 3.1)
tilt (>= 1.4)
opal-browser (0.2.0)
opal
paggio
@ -88,7 +98,7 @@ GEM
rubyzip (~> 1.0)
websocket (~> 1.0)
sourcemap (0.1.1)
sprockets (3.2.0)
sprockets (3.3.2)
rack (~> 1.0)
susy (2.2.5)
sass (>= 3.3.0, < 3.5)
@ -106,6 +116,7 @@ PLATFORMS
DEPENDENCIES
capybara (~> 2.4.2)
chromedriver2-helper (~> 0.0.8)
opal!
opal-browser
opal-rspec (~> 0.4.2)
parslet!

View File

@ -13,8 +13,17 @@ class MainView < ListView
def initialize
machine = Virtual.machine.boot
code = Ast::OperatorExpression.new("+", Ast::IntegerExpression.new(2),Ast::IntegerExpression.new(5))
Virtual::Compiler.compile( code , machine.space.get_main )
# compile_main includes the parse
# parsing generates an ast as seen below and then compiles it.
machine.compile_main "2 + 5"
# so the code above is functionally equivalent to the one below, minus the parse
# When the ast expression is given all works, so pretty sure it is the parse that fails
# code = Ast::OperatorExpression.new("+", Ast::IntegerExpression.new(2),Ast::IntegerExpression.new(5))
# Virtual::Compiler.compile( code , machine.space.get_main )
machine.run_before "Register::CallImplementation"
@interpreter = Interpreter::Interpreter.new
@parent = $document.body
@ -25,7 +34,7 @@ class MainView < ListView
def draw
node = DOM {
div.info {
span.red "I'm all cooked up."
span.red "Ready to start."
}
}
node.append_to(@parent)