soml-parser/test/cases/class_definition/class_ops.tst
Torsten Ruger ab0a94bd51 change type to class name
although int is still allowed for integers (gets replaced though)
2015-10-14 15:48:53 +03:00

23 lines
485 B
Scilab

class Opers
int foo(int x)
int abba = 5
return abba + 5
end
end
-- -- --
s(:statements,
s(:class, :Opers,
s(:derives, nil),
s(:statements,
s(:function, :Integer,
s(:name, :foo),
s(:parameters,
s(:parameter, :Integer, :x)),
s(:statements,
s(:field_def, :Integer, :abba,
s(:int, 5)),
s(:return,
s(:operator_value, :+,
s(:name, :abba),
s(:int, 5))))))))