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

Add support for local reference targets #150

Merged
merged 1 commit into from
Nov 8, 2022
Merged

Conversation

radeksimko
Copy link
Member

This PR intended to be no-op for the end-user.

It introduces the concept of "local references", which can be utilised for count.index, each.* and self.* references, as drafted within #149

While there are tests attached, there is no code actually collecting such local targets - that is left for follow-up PRs which can be made out of the linked PR.

It also leaves out the question of rendering such reference targets. Now that there can be two ways of referring to the same target, there can be some contexts where it is appropriate to use one address over the other, and vice versa. I could not find any way to solve that problem in an abstract sense which would work for all three use cases. So I left this for the follow-up PRs. I did however leave TODOs in a few places where it is likely this problem will need to be addressed + I introduced an Address() method to reference.Target, which should essentially "just work" for the simpler cases of count.index and each.*.

@radeksimko radeksimko added the enhancement New feature or request label Nov 4, 2022
@radeksimko radeksimko requested a review from a team November 4, 2022 20:58
Copy link
Member

@dbanck dbanck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@dbanck dbanck merged commit 628a057 into main Nov 8, 2022
@dbanck dbanck deleted the f-local-targets-foundation branch November 8, 2022 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants