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-09-20 15:03:27 +02:00
|
|
|
s(:function, :int,
|
|
|
|
s(:name, :foo),
|
|
|
|
s(:parameters,
|
|
|
|
s(:parameter, :int, :x)),
|
2015-10-09 16:32:05 +02:00
|
|
|
s(:statements,
|
2015-09-20 15:03:27 +02:00
|
|
|
s(:field_def, :int, :abba,
|
|
|
|
s(:int, 5)),
|
2015-10-09 16:32:05 +02:00
|
|
|
s(:return,
|
|
|
|
s(:operator_value, :+,
|
|
|
|
s(:name, :abba),
|
|
|
|
s(:int, 5))))))))
|