small fix
This commit is contained in:
parent
efca5254f4
commit
87693112d4
@ -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}"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user