QLogo
QLogo copied to clipboard
Flatten the AST
This is a high priority. Currently, when Logo source code is parsed then a syntax tree is created. Then when the code is executed the tree is walked. This works 99% of the time.
Most notably, the call stack can become exhausted without a means to gracefully stop execution. This has been mitigated somewhat by counting the number of calls to user-defined functions and by tail recursion optimization, but the problem still surfaces at times.
Also, there are errors in the handling of some user-defined procedures. (See #48 #33 and #32.)
After the AST is built it needs to be walked so that a flattened list can be walked instead.