soml-parser/test/cases/root/module_method.tst
Torsten Ruger ea6472c28f rename field to parameter in parameter_list
also field to field_def (wip)
and lots of whitespace due to ws fix
2015-09-20 12:56:06 +03:00

28 lines
490 B
Scilab

module Fibo
int fibonaccit(int n)
int a = 0
return a
end
fibonaccit( 10 )
end
-- -- --
s(:expressions,
s(:module, :Fibo,
s(:function, :int,
s(:name, :fibonaccit),
s(:parameters,
s(:parameter, :int, :n)),
s(:expressions,
s(:name, :int),
s(:assign,
s(:name, :a),
s(:int, 0)),
s(:return,
s(:name, :a)))),
s(:call,
s(:name, :fibonaccit),
s(:arguments,
s(:int, 10)))))