update reader
This commit is contained in:
parent
b9ddd75a33
commit
9d0d5aa431
@ -7,7 +7,7 @@ GIT
|
|||||||
|
|
||||||
GIT
|
GIT
|
||||||
remote: https://github.com/ruby-in-ruby/crystal-reader.git
|
remote: https://github.com/ruby-in-ruby/crystal-reader.git
|
||||||
revision: 0ed11b507f2159a9557f24a5df1333a516ace27f
|
revision: 7e1c0d7f572256b351655798aadfd160ded07760
|
||||||
specs:
|
specs:
|
||||||
crystal-reader (0.1.0)
|
crystal-reader (0.1.0)
|
||||||
|
|
||||||
|
@ -42,8 +42,14 @@ module Vm
|
|||||||
# storage is a linked list. Has the same api as a ha
|
# storage is a linked list. Has the same api as a ha
|
||||||
@bindings = List.new
|
@bindings = List.new
|
||||||
end
|
end
|
||||||
|
# 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
|
def run instruction
|
||||||
instruction.execute
|
while instruction do
|
||||||
|
next_instruction = instruction.next
|
||||||
|
instruction.execute
|
||||||
|
instruction = next_instruction
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
require_relative '../helper'
|
require_relative '../helper'
|
||||||
require 'parslet/convenience'
|
require 'parslet/convenience'
|
||||||
|
|
||||||
module VmHelper
|
module VirtualHelper
|
||||||
# need a code generator, for arm
|
# need a code generator, for arm
|
||||||
def setup
|
def setup
|
||||||
@object_space = Boot::BootSpace.new "Arm"
|
# @object_space = Boot::BootSpace.new "Arm"
|
||||||
end
|
end
|
||||||
|
|
||||||
def parse
|
def check
|
||||||
parser = Parser::Crystal.new
|
parser = Parser::Crystal.new
|
||||||
syntax = parser.parse_with_debug(@string_input)
|
syntax = parser.parse_with_debug(@string_input)
|
||||||
parts = Parser::Transform.new.apply(syntax)
|
parts = Parser::Transform.new.apply(syntax)
|
||||||
|
Loading…
Reference in New Issue
Block a user