soml-parser/test/cases/module_def/module_ops.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

29 lines
639 B
Scilab

module Opers
int foo(int x)
int abba = x + self.index
return abba + 5
end
end
-- -- --
s(:expressions,
s(:module, :Opers,
s(:function, :int,
s(:name, :foo),
s(:parameters,
s(:parameter, :int, :x)),
s(:expressions,
s(:name, :int),
s(:assign,
s(:name, :abba),
s(:operator, "+",
s(:name, :x),
s(:field_access,
s(:receiver,
s(:name, :self)),
s(:field,
s(:name, :index))))),
s(:return,
s(:operator, "+",
s(:name, :abba),
s(:int, 5)))))))