From 87693112d4e7cc31d1d8bfdcbc56f1559ccf920a Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Sat, 10 Dec 2016 18:07:38 +0200 Subject: [PATCH] small fix --- lib/typed/compiler/class_statement.rb | 2 +- lib/typed/compiler/field_def.rb | 2 +- test/typed/expressions/test_field_access.rb | 2 +- test/typed/expressions/test_ops.rb | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/typed/compiler/class_statement.rb b/lib/typed/compiler/class_statement.rb index 4a26800e..f7dcb97c 100644 --- a/lib/typed/compiler/class_statement.rb +++ b/lib/typed/compiler/class_statement.rb @@ -3,7 +3,7 @@ module Typed def on_ClassStatement statement - raise "classes dont yet play babushka, get coding #{name}" if @clazz + raise "classes dont yet play babushka, get coding #{statement.name}" if @clazz @clazz = Parfait::Space.object_space.get_class_by_name! statement.name #puts "Compiling class #{@clazz.name.inspect}" diff --git a/lib/typed/compiler/field_def.rb b/lib/typed/compiler/field_def.rb index 6d5b0342..750536d1 100644 --- a/lib/typed/compiler/field_def.rb +++ b/lib/typed/compiler/field_def.rb @@ -9,7 +9,7 @@ module Typed name_s = no_space( statement.name.value ) @method.ensure_local( name_s, statement.type ) unless( @method.has_arg(name_s)) # if there is a value assigned, process it as am assignemnt statement (kind of call on_assign) - process( Typed::Assignment.new(statement.name , statement.value ) ) if statement.value + process( Tree::Assignment.new(statement.name , statement.value ) ) if statement.value return nil end end diff --git a/test/typed/expressions/test_field_access.rb b/test/typed/expressions/test_field_access.rb index f612d041..157dd768 100644 --- a/test/typed/expressions/test_field_access.rb +++ b/test/typed/expressions/test_field_access.rb @@ -27,7 +27,7 @@ module Register end def test_field - add_object_field(:bro,:Object) + add_space_field(:bro,:Object) @root = :field_access @input = s(:field_access, s(:receiver, s(:name, :self)), s(:field, s(:name, :bro))) @output = Register::RegisterValue diff --git a/test/typed/expressions/test_ops.rb b/test/typed/expressions/test_ops.rb index 7fb13eee..4dbc7645 100644 --- a/test/typed/expressions/test_ops.rb +++ b/test/typed/expressions/test_ops.rb @@ -32,7 +32,7 @@ module Register end def test_field_int - add_object_field(:bro,:int) + add_space_field(:bro,:int) @input = s(:operator_value, :+, s(:field_access, s(:receiver, s(:name, :self)), s(:field, s(:name, :bro))), s(:int, 3)) @@ -40,7 +40,7 @@ module Register end def test_int_field - add_object_field(:bro,:int) + add_space_field(:bro,:int) @input = s(:operator_value, :+, s(:int, 3), s(:field_access, s(:receiver, s(:name, :self)), s(:field,s(:name, :bro)))) check