ab0a94bd51
although int is still allowed for integers (gets replaced though)
23 lines
485 B
Scilab
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))))))))
|