soml-parser/test/cases/function_definition/function_foo2.tst
Torsten Ruger 6ae4b624b0 leaving the name for field defs
so we can reuse that expression
so we can highlight it in the debugger
2015-11-02 20:10:05 +02:00

17 lines
300 B
Scilab

int foo(int x)
int a = 5
return a
end
-- -- --
s(:statements,
s(:function, :Integer,
s(:name, :foo),
s(:parameters,
s(:parameter, :Integer, :x)),
s(:statements,
s(:field_def, :Integer,
s(:name, :a),
s(:int, 5)),
s(:return,
s(:name, :a)))))