is there a way to make this code work without messing up the global namespace?
x = 10 function f() eval(:(local x = 20)) return eval(:x) end f() @assert f() == 20 @assert x == 10
This is a minimal example for my real problem. Basically, I want to parse some TOML files and allow the user to refer to do stuff like this:
[cell] x = "rand()" y = "cell.x + rand()"
I figured out a nice way to do that, with the only problem that it messes with the global (or a modules) variables.