update reader
This commit is contained in:
parent
9d0d5aa431
commit
33c62a7db1
@ -7,7 +7,7 @@ GIT
|
||||
|
||||
GIT
|
||||
remote: https://github.com/ruby-in-ruby/crystal-reader.git
|
||||
revision: 7e1c0d7f572256b351655798aadfd160ded07760
|
||||
revision: 3a56ae1a8d96845bbb80f760626c8203d57cb1c3
|
||||
specs:
|
||||
crystal-reader (0.1.0)
|
||||
|
||||
|
@ -8,3 +8,4 @@ require_relative "module_expression"
|
||||
require_relative "operator_expressions"
|
||||
require_relative "return_expression"
|
||||
require_relative "while_expression"
|
||||
require_relative "expression_list"
|
||||
|
@ -1,4 +1,4 @@
|
||||
module Vm
|
||||
module Virtual
|
||||
# The Virtual Machine is a value based virtual machine in which ruby is implemented. While it is value based,
|
||||
# it resembles oo in basic ways of object encapsulation and method invokation, it is a "closed" / static sytem
|
||||
# in that all types are know and there is no dynamic dispatch (so we don't bite our tail here).
|
||||
@ -42,6 +42,8 @@ module Vm
|
||||
# storage is a linked list. Has the same api as a ha
|
||||
@bindings = List.new
|
||||
end
|
||||
attr_reader :bindings
|
||||
|
||||
# run the instruction stream given. Instructions are a graph and executing means traversing it.
|
||||
# If there is no next instruction the machine stops
|
||||
def run instruction
|
||||
|
@ -11,10 +11,9 @@ module VirtualHelper
|
||||
parser = Parser::Crystal.new
|
||||
syntax = parser.parse_with_debug(@string_input)
|
||||
parts = Parser::Transform.new.apply(syntax)
|
||||
|
||||
parts.each_with_index do |part,index|
|
||||
expr = part.compile( @object_space.context )
|
||||
end
|
||||
machine = Virtual::Machine.new
|
||||
puts parts.class.inspect
|
||||
parts.compile(machine.bindings)
|
||||
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user