2015-09-18 20:55:02 +02:00
|
|
|
module Opers
|
|
|
|
int foo(int x)
|
|
|
|
int abba = 5
|
|
|
|
return abba + 5
|
|
|
|
end
|
|
|
|
end
|
|
|
|
-- -- --
|
2015-09-19 13:53:30 +02:00
|
|
|
s(:expressions,
|
|
|
|
s(:module, :Opers,
|
|
|
|
s(:function, :int,
|
|
|
|
s(:name, :foo),
|
|
|
|
s(:parameters,
|
|
|
|
s(:field, :int, :x)),
|
|
|
|
s(:expressions,
|
|
|
|
s(:name, :int),
|
|
|
|
s(:assign,
|
|
|
|
s(:name, :abba),
|
|
|
|
s(:int, 5)),
|
|
|
|
s(:return,
|
|
|
|
s(:operator, "+",
|
|
|
|
s(:name, :abba),
|
|
|
|
s(:int, 5)))))))
|