2015-10-05 23:22:18 +02:00
|
|
|
int foo(int x)
|
|
|
|
int a = 5
|
|
|
|
return a
|
|
|
|
end
|
|
|
|
-- -- --
|
2015-10-09 16:28:47 +02:00
|
|
|
s(:statements,
|
2015-10-05 23:22:18 +02:00
|
|
|
s(:function, :int,
|
|
|
|
s(:name, :foo),
|
|
|
|
s(:parameters,
|
|
|
|
s(:parameter, :int, :x)),
|
2015-10-09 16:28:47 +02:00
|
|
|
s(:statements,
|
2015-10-05 23:22:18 +02:00
|
|
|
s(:field_def, :int, :a,
|
|
|
|
s(:int, 5)),
|
|
|
|
s(:return,
|
2015-10-09 16:28:47 +02:00
|
|
|
s(:name, :a)))))
|