[wip] allow extended syntaxed to reference updated variables #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
Thanks very much for the PR implementing
extends
. Sorry to let it linger for so long.I had some ideas of how we could get the match patterns from the base syntax definition (which has already been parsed) to use the variables from the derived syntax definition. And that is to store the original "raw regex" on the
MatchPattern
so we can reevaluate it with the "latest" variables. It is probably not the best way to do it, but I feel like at this stage, it is better to get something implemented, merge it and improve it later...To this end, I added a test which should succeed when everything works as expected. I confess that I haven't actually had time to complete the implementation yet, but thought I'd push it here in case you or someone else wants to take over, or in case it pushes me to find more time for it myself...