ea6472c28f
also field to field_def (wip) and lots of whitespace due to ws fix
29 lines
639 B
Scilab
29 lines
639 B
Scilab
module Opers
|
|
int foo(int x)
|
|
int abba = x + self.index
|
|
return abba + 5
|
|
end
|
|
end
|
|
-- -- --
|
|
s(:expressions,
|
|
s(:module, :Opers,
|
|
s(:function, :int,
|
|
s(:name, :foo),
|
|
s(:parameters,
|
|
s(:parameter, :int, :x)),
|
|
s(:expressions,
|
|
s(:name, :int),
|
|
s(:assign,
|
|
s(:name, :abba),
|
|
s(:operator, "+",
|
|
s(:name, :x),
|
|
s(:field_access,
|
|
s(:receiver,
|
|
s(:name, :self)),
|
|
s(:field,
|
|
s(:name, :index))))),
|
|
s(:return,
|
|
s(:operator, "+",
|
|
s(:name, :abba),
|
|
s(:int, 5)))))))
|