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

23 lines
473 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, :int,
s(:name, :foo),
s(:parameters,
s(:parameter, :int, :x)),
2015-10-09 16:32:05 +02:00
s(:statements,
s(:field_def, :int, :abba,
s(:int, 5)),
2015-10-09 16:32:05 +02:00
s(:return,
s(:operator_value, :+,
s(:name, :abba),
s(:int, 5))))))))