soml-parser/test/cases/class_definition/class_ops.tst

23 lines
485 B
Scilab
Raw Normal View History

class Opers
int foo(int x)
int abba = 5
2015-10-09 16:32:05 +02:00
return abba + 5
end
end
-- -- --
2015-10-09 16:32:05 +02:00
s(:statements,
s(:class, :Opers,
s(:derives, nil),
2015-10-09 16:32:05 +02:00
s(:statements,
s(:function, :Integer,
s(:name, :foo),
s(:parameters,
s(:parameter, :Integer, :x)),
2015-10-09 16:32:05 +02:00
s(:statements,
s(:field_def, :Integer, :abba,
s(:int, 5)),
2015-10-09 16:32:05 +02:00
s(:return,
s(:operator_value, :+,
s(:name, :abba),
s(:int, 5))))))))