2015-09-18 20:55:02 +02:00
|
|
|
class Foo < Object
|
2015-09-27 11:05:35 +02:00
|
|
|
field int fff = 3
|
2015-09-20 13:29:24 +02:00
|
|
|
int func()
|
2015-09-27 11:05:35 +02:00
|
|
|
return self.fff
|
2015-09-20 13:29:24 +02:00
|
|
|
end
|
2015-09-18 20:55:02 +02:00
|
|
|
ofthen(3 , var)
|
|
|
|
end
|
|
|
|
-- -- --
|
2015-09-20 13:29:24 +02:00
|
|
|
s(:expressions,
|
|
|
|
s(:class, :Foo,
|
|
|
|
s(:derives, :Object),
|
2015-09-20 15:03:27 +02:00
|
|
|
s(:expressions,
|
2015-09-27 11:05:35 +02:00
|
|
|
s(:class_field, :int, :fff,
|
2015-09-20 15:03:27 +02:00
|
|
|
s(:int, 3)),
|
|
|
|
s(:function, :int,
|
|
|
|
s(:name, :func),
|
|
|
|
s(:parameters),
|
|
|
|
s(:expressions,
|
|
|
|
s(:return,
|
|
|
|
s(:field_access,
|
|
|
|
s(:receiver,
|
|
|
|
s(:name, :self)),
|
|
|
|
s(:field,
|
2015-09-27 11:05:35 +02:00
|
|
|
s(:name, :fff)))))),
|
2015-09-20 15:03:27 +02:00
|
|
|
s(:call,
|
|
|
|
s(:name, :ofthen),
|
|
|
|
s(:arguments,
|
|
|
|
s(:int, 3),
|
|
|
|
s(:name, :var))))))
|