change type to class name

although int is still allowed for integers (gets replaced though)
This commit is contained in:
Torsten Ruger
2015-10-14 15:48:53 +03:00
parent 1b2802ecf4
commit ab0a94bd51
24 changed files with 79 additions and 70 deletions

View File

@ -9,7 +9,7 @@ s(:statements,
s(:class, :FooBo,
s(:derives, nil),
s(:statements,
s(:function, :int,
s(:function, :Integer,
s(:name, :main),
s(:parameters),
s(:statements,

View File

@ -1,10 +1,9 @@
class Object
int foo(ref x)
int foo(String x)
a = 5
end
end
class Other < Object
int foo()
foo( 3 )
end
@ -14,10 +13,10 @@ s(:statements,
s(:class, :Object,
s(:derives, nil),
s(:statements,
s(:function, :int,
s(:function, :Integer,
s(:name, :foo),
s(:parameters,
s(:parameter, :ref, :x)),
s(:parameter, :String, :x)),
s(:statements,
s(:assignment,
s(:name, :a),
@ -25,7 +24,7 @@ s(:statements,
s(:class, :Other,
s(:derives, :Object),
s(:statements,
s(:function, :int,
s(:function, :Integer,
s(:name, :foo),
s(:parameters),
s(:statements,

View File

@ -20,10 +20,10 @@ s(:statements,
s(:class, :Object,
s(:derives, nil),
s(:statements,
s(:function, :int,
s(:function, :Integer,
s(:name, :fibonaccit),
s(:parameters,
s(:parameter, :int, :n)),
s(:parameter, :Integer, :n)),
s(:statements,
s(:assignment,
s(:name, :a),
@ -57,7 +57,7 @@ s(:statements,
s(:operator_value, :-,
s(:name, :n),
s(:int, 1))))))),
s(:function, :int,
s(:function, :Integer,
s(:name, :main),
s(:parameters),
s(:statements,