Open damonwang opened 14 years ago
current implementation assumes all larch code in scope comes from the last file it read; this needs fixing.
We might have to wrap the raw ASTs in something that can track this metadata, if I can't find a way to just shove it into the AST itself.
Never mind the previous, I can just manually push things into __dict__
Also, right now all the arguments are off by one: that is, when I say
File "c:\users\dwang\appdata\local\temp\larchcmpiyt", line 9, in f(10)
#enddef
--> f(10)
I mean, the next frame should be f(10)
problem is, the python interpreter will supply a stack trace with a new call frame for every element of the larch AST, which would be unreadable.
Instead, we should construct a stack trace by looking for function calls in the larch code, each of which will correspond to a python
on_call
frame handling anast.Call
node.