2015-09-18 20:55:02 +02:00
|
|
|
ref fibonaccit(int n)
|
|
|
|
a = 0
|
|
|
|
while(n)
|
|
|
|
some = 43
|
|
|
|
other = some * 4
|
|
|
|
end
|
|
|
|
end
|
|
|
|
-- -- --
|
2015-09-19 13:53:30 +02:00
|
|
|
s(:expressions,
|
|
|
|
s(:function, :ref,
|
|
|
|
s(:name, :fibonaccit),
|
|
|
|
s(:parameters,
|
|
|
|
s(:field, :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))))))))
|