-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support class scoped variable lookup in interpolation lambdas (take 2) #45
Support class scoped variable lookup in interpolation lambdas (take 2) #45
Conversation
I mean, I don't love this approach. Notions of scoping shouldn't be explicit in an AST, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davepeck This looks great! Thanks a lot for working on these changes.
I just pushed a commit that slightly improves the code in symtable.c
and brings it closer to other cases like this.
Let's merge this!
Ah, thanks — that's useful for me to see! Glad it wasn't too far off. |
With these changes, the following code works:
This PR follows #44 but takes an approach closer to what we want. Interpolation expressions are no longer wrapped in lambdas.
compiler_interpolation()
andsymtable_visit_expr()
are both updated to support this. In addition,ste_*
flags are set to allow interpolation expressions to see class scope variables.