-
Notifications
You must be signed in to change notification settings - Fork 317
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
Dynamic databinding variable expressions #550
Conversation
Very nice, I like it! Are there any limitations to this approach compared to #547? I'm curious whether it works on the left-hand side of Does it properly report variable names of nested addresses? E.g. will the expression |
Indeed i needed to fix it tracking the embedded variables. But now it works. |
Hey, did you get a chance to take a look at expressions on left-hand side/assignments? I wonder if we still need something like #547, or if there is another way to approach that on top of this PR. Any thoughts? |
Left-hand side is definitely doable. Would you want to merge this first and go for dynamic assignment in a separate PR or all in one? |
I don't mind either way. I'll start reviewing this code now, and you can decide if you want to reuse this, or make a new PR. If you add everything here, it would be nice if you keep the commits clean, or do an interactive rebase at the end. |
If you're starting your review i'll hold of on adding assignment support, so i dont have too many headaches at once :D |
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.
Overall, I very much like what you achieve with only changes within the data expression code. Well done! The feature seems very useful, so thanks for making the PR.
I have some suggestions here, most of which are relatively small.
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.
Nice work! Just a couple of small comments :)
Do you want me to merge this PR once these are addressed, and open a new PR for assignment support?
Co-authored-by: Michael R. P. Ragazzon <[email protected]>
Awesome work, thanks a lot! That's a very neat feature :) And I'm very happy with the implementation, and particularly that it could be implemented entirely in the parser, nice. Only missing piece now is expression support in assignments. |
Prompted by the submission of #547 here is my branch for fully dynamic expressions to access array indices in databinding addresses.
This is done by enabling a fast-path for the pre-existing fixed addresses, and a stack based index resolution of dynamic addresses.
I did not submit this PR earlier because i feared another CSS Variables incident with a giant PR destined to fail.