2015-10-14 14:48:53 +02:00
|
|
|
int ofthen(int n)
|
2015-10-19 14:10:38 +02:00
|
|
|
if_plus(0)
|
2015-09-18 20:55:02 +02:00
|
|
|
isit = 42
|
|
|
|
else
|
|
|
|
maybenot = 667
|
|
|
|
end
|
|
|
|
end
|
|
|
|
-- -- --
|
2015-10-09 16:28:47 +02:00
|
|
|
s(:statements,
|
2015-10-14 14:48:53 +02:00
|
|
|
s(:function, :Integer,
|
2015-09-19 16:11:15 +02:00
|
|
|
s(:name, :ofthen),
|
|
|
|
s(:parameters,
|
2015-10-14 14:48:53 +02:00
|
|
|
s(:parameter, :Integer, :n)),
|
2015-10-09 16:28:47 +02:00
|
|
|
s(:statements,
|
|
|
|
s(:if_statement,
|
2015-09-19 16:11:15 +02:00
|
|
|
s(:condition,
|
|
|
|
s(:int, 0)),
|
2015-10-09 16:28:47 +02:00
|
|
|
s(:true_statements,
|
|
|
|
s(:assignment,
|
2015-09-19 16:11:15 +02:00
|
|
|
s(:name, :isit),
|
|
|
|
s(:int, 42))),
|
2015-10-09 16:28:47 +02:00
|
|
|
s(:false_statements,
|
|
|
|
s(:assignment,
|
2015-09-19 16:11:15 +02:00
|
|
|
s(:name, :maybenot),
|
|
|
|
s(:int, 667)))))))
|