My gut feeling is that a separate parsing step would simplify things.
Such a parsing step would not require a dictionary. For example:
// input expression
// => parsed representation
a+2
=> (+;`a;2)
+[a;2]
=> (+;`a;2)
a:b+c
=> (:;`a;(+;`b;`c))
a:x; if[x>0; f(a-1)]; a
=> (";"; (:;`a;`x); (`if; (>;`x;0); (`f;(-;`a;1))); `a)
The parsed rep. can be directly interpreted and that is where you need
a global and local dict. No idea how much work this change would be.
Setting it up as a separate issue so it doesn't get lost.
@Bakul suggested this in a comment on issue #521
Setting it up as a separate issue so it doesn't get lost.