soml-parser/test/cases/function_definition/function_ops.tst
2015-10-09 17:28:47 +03:00

19 lines
369 B
Scilab

int foo(int x)
int abba = 5
abba = abba + 5
end
-- -- --
s(:statements,
s(:function, :int,
s(:name, :foo),
s(:parameters,
s(:parameter, :int, :x)),
s(:statements,
s(:field_def, :int, :abba,
s(:int, 5)),
s(:assignment,
s(:name, :abba),
s(:operator_value, :+,
s(:name, :abba),
s(:int, 5))))))