-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The global
and local
scope of a variable
#128
Comments
global
and local
scope of a variable
Hmm, I think this would require modifying |
Can you check if #129 does what you want? I used
I'm not sure I implemented it properly, so some testing would be nice. |
This example exposed an issue with using Without that change, this example wasn't working:
|
Nice, I am happy with the PR, it solves my issue. It would be good to put the above examples in the tests to help people understand. Regarding your concern, I think d = Dict(:two=>Dict(:x=>3), :x=>2) is more intuitive. |
Current parser will search for local scope first and then the global scope, e.g.
Is it possible to invoke the global variable when names clash? e.g. with a
!
Note:
In my using case, I wish to identity the (global) variables that a user need to provide by inspecting the string only. Which means the global variables used in the local context should be identified. In Mustache.js, the global variables can not be accessed, see: janl/mustache.js#399 .
The text was updated successfully, but these errors were encountered: