had to let go of crystal (sniff) as the name was taken
This commit is contained in:
@ -17,7 +17,7 @@ module Fragments
|
||||
end
|
||||
|
||||
def parse
|
||||
parser = Parser::Crystal.new
|
||||
parser = Parser::Sapphire.new
|
||||
syntax = parser.parse_with_debug(@string_input)
|
||||
parts = Parser::Transform.new.apply(syntax)
|
||||
# file is a list of expressions, all but the last must be a function
|
||||
|
@ -5,10 +5,10 @@ class TestHello < MiniTest::Test
|
||||
|
||||
def test_hello
|
||||
@string_input = <<HERE
|
||||
"Hello Raisa, I am crystal".putstring()
|
||||
"Hello Raisa, I am sapphire".putstring()
|
||||
HERE
|
||||
@should = [0x0,0x40,0x2d,0xe9,0x1,0x0,0xa0,0xe3,0x2,0x10,0xa0,0xe1,0x3,0x20,0xa0,0xe1,0x4,0x70,0xa0,0xe3,0x0,0x0,0x0,0xef,0x0,0x80,0xbd,0xe8]
|
||||
@output = "Hello Raisa, I am crystal "
|
||||
@output = "Hello Raisa, I am sapphire "
|
||||
@target = [:Object , :putstring]
|
||||
parse
|
||||
write "hello"
|
||||
|
@ -75,7 +75,7 @@ HERE
|
||||
end
|
||||
|
||||
def parse
|
||||
parser = Parser::Crystal.new
|
||||
parser = Parser::Sapphire.new
|
||||
syntax = parser.parse_with_debug(@string_input)
|
||||
parts = Parser::Transform.new.apply(syntax)
|
||||
# file is a list of expressions, all but the last must be a function
|
||||
|
@ -28,4 +28,4 @@ require "minitest/autorun"
|
||||
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
||||
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'test'))
|
||||
|
||||
require 'crystal'
|
||||
require 'sapphire'
|
||||
|
@ -19,7 +19,7 @@ class TestRunner < MiniTest::Test
|
||||
|
||||
def execute file
|
||||
string = File.read(file)
|
||||
parser = Parser::Crystal.new
|
||||
parser = Parser::Sapphire.new
|
||||
object_space = Vm::Program.new "Arm"
|
||||
syntax = parser.parse_with_debug(string)
|
||||
assert syntax
|
||||
|
@ -8,7 +8,7 @@ module VirtualHelper
|
||||
end
|
||||
|
||||
def check
|
||||
parser = Parser::Crystal.new
|
||||
parser = Parser::Sapphire.new
|
||||
syntax = parser.parse_with_debug(@string_input)
|
||||
parts = Parser::Transform.new.apply(syntax)
|
||||
machine = Virtual::Machine.new
|
||||
|
Reference in New Issue
Block a user