Skip to content
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

Allow all variable names to be retrieve from ScopeChain/Scope #291

Closed
zemian opened this issue Sep 9, 2017 · 3 comments · Fixed by #496
Closed

Allow all variable names to be retrieve from ScopeChain/Scope #291

zemian opened this issue Sep 9, 2017 · 3 comments · Fixed by #496
Milestone

Comments

@zemian
Copy link

zemian commented Sep 9, 2017

Hi,

I want to write a custom function to return all the variable names available from the current context (it's very valuable for debugging purpose). I can get ScopeChain from EvaluationContext, but there is no method exposed to retrieve all the keys from each Scope's backingMap. I got around this by using Java reflection so far, but it will be nice to have this available from the API.

Thanks,
Zemian

@axeld
Copy link

axeld commented Nov 22, 2017

I second this, not just for debugging purposes. I've implemented a function that allows expression evaluation within my application (it comes with its own expression language); there is currently no way to pass on the scope chain as bindings.

@ashokgelal
Copy link

ashokgelal commented Feb 2, 2020

@ebussieres Can we have this please? This seems very trivial to add (just a function) and I don't see any downside of this. I can send a PR but I'm not sure whether you want this supported or not.

@ebussieres
Copy link
Member

Sure, just make a PR and I'll gladly review it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants