now I beginning to understand the bytecode generator and it seems that I was even able to fix a bug. The Nyanga bytecode generator does not emit the instruction for the implicit return when required.
For example the following code raise an error:
i = 0
n = 10
function count()
if i < n then
i = i + 1
return i
end
end
for k in count do
print(k)
end
Hi Richard,
now I beginning to understand the bytecode generator and it seems that I was even able to fix a bug. The Nyanga bytecode generator does not emit the instruction for the implicit return when required.
For example the following code raise an error:
I propose a simple fix for this problem.
Francesco