move parse to view

This commit is contained in:
Torsten Ruger 2015-07-13 15:14:34 +03:00
parent c213931fb3
commit 5a4bf30559
2 changed files with 9 additions and 10 deletions

View File

@ -15,15 +15,6 @@ module Main
end end
def about def about
ParseTask.parse(1).then do |result|
puts result
is = Ast::Expression.from_basic(result)
puts "back #{is.class}"
Virtual::Compiler.compile( is , Virtual.machine.space.get_main )
puts Virtual.machine.space.objects
end.fail do |error|
puts "Error: #{error}"
end
end end

View File

@ -19,7 +19,15 @@ class MainView
registers = RegisterView.new(height - 150) registers = RegisterView.new(height - 150)
@container.add_child registers @container.add_child registers
space = SpaceView.new
ParseTask.parse(1).then do |result|
is = Ast::Expression.from_basic(result)
Virtual::Compiler.compile( is , Virtual.machine.space.get_main )
puts Virtual.machine.space
end.fail do |error|
puts "Error: #{error}"
end
space = SpaceView.new Sof::Members.new(Virtual.machine.space).objects
@container.add_child space @container.add_child space
animate = Proc.new do animate = Proc.new do