ea6472c28f
also field to field_def (wip) and lots of whitespace due to ws fix
30 lines
597 B
Scilab
30 lines
597 B
Scilab
ref fibonaccit(int n)
|
|
a = 0
|
|
while(n)
|
|
some = 43
|
|
other = some * 4
|
|
end
|
|
end
|
|
-- -- --
|
|
s(:expressions,
|
|
s(:function, :ref,
|
|
s(:name, :fibonaccit),
|
|
s(:parameters,
|
|
s(:parameter, :int, :n)),
|
|
s(:expressions,
|
|
s(:assign,
|
|
s(:name, :a),
|
|
s(:int, 0)),
|
|
s(:while,
|
|
s(:condition,
|
|
s(:name, :n)),
|
|
s(:expressions,
|
|
s(:assign,
|
|
s(:name, :some),
|
|
s(:int, 43)),
|
|
s(:assign,
|
|
s(:name, :other),
|
|
s(:operator, "*",
|
|
s(:name, :some),
|
|
s(:int, 4))))))))
|