soml-parser/test/cases/root/module_method.tst
Torsten Ruger 486e24514b there goes the module
it was ruby after all
should be reborn as twins: namespace and aspect
2015-10-08 22:57:39 +03:00

22 lines
409 B
Scilab

class Fibo
int fibonaccit(int n)
int a = 0
return a
end
end
-- -- --
s(:expressions,
s(:class, :Fibo,
s(:derives, nil),
s(:expressions,
s(:function, :int,
s(:name, :fibonaccit),
s(:parameters,
s(:parameter, :int, :n)),
s(:expressions,
s(:field_def, :int, :a,
s(:int, 0)),
s(:return,
s(:name, :a)))))))