soml-parser/test/cases/class_def/class_derived.tst
2015-09-20 14:43:08 +03:00

29 lines
575 B
Scilab

class Foo < Object
int field = 3
int func()
return self.field
end
ofthen(3 , var)
end
-- -- --
s(:expressions,
s(:class, :Foo,
s(:derives, :Object),
s(:field_def, :int, :field,
s(:int, 3)),
s(:function, :int,
s(:name, :func),
s(:parameters),
s(:expressions,
s(:return,
s(:field_access,
s(:receiver,
s(:name, :self)),
s(:field,
s(:name, :field)))))),
s(:call,
s(:name, :ofthen),
s(:arguments,
s(:int, 3),
s(:name, :var)))))