2015-09-18 20:55:02 +02:00
|
|
|
class Opers
|
|
|
|
int foo(int x)
|
|
|
|
int abba = 5
|
2015-10-09 16:32:05 +02:00
|
|
|
return abba + 5
|
2015-09-18 20:55:02 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
-- -- --
|
2015-10-09 16:32:05 +02:00
|
|
|
s(:statements,
|
2015-09-20 11:56:06 +02:00
|
|
|
s(:class, :Opers,
|
|
|
|
s(:derives, nil),
|
2015-10-09 16:32:05 +02:00
|
|
|
s(:statements,
|
2015-10-14 14:48:53 +02:00
|
|
|
s(:function, :Integer,
|
2015-09-20 15:03:27 +02:00
|
|
|
s(:name, :foo),
|
|
|
|
s(:parameters,
|
2015-10-14 14:48:53 +02:00
|
|
|
s(:parameter, :Integer, :x)),
|
2015-10-09 16:32:05 +02:00
|
|
|
s(:statements,
|
2015-10-14 14:48:53 +02:00
|
|
|
s(:field_def, :Integer, :abba,
|
2015-09-20 15:03:27 +02:00
|
|
|
s(:int, 5)),
|
2015-10-09 16:32:05 +02:00
|
|
|
s(:return,
|
|
|
|
s(:operator_value, :+,
|
|
|
|
s(:name, :abba),
|
|
|
|
s(:int, 5))))))))
|