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.
« #282
Changes the rules as follows:
The rules were introducing definitions for all identifiers, regardless of whether they appeared in a definition context. This made the rules easy, but results in unexpected behavior in the UI, because every reference is now also a definition and included in the results for that reference.
Interestingly, this worked in the old DSL because the graph was pruned, so unconnected definitions would just disappear!
To fix this, the rules must be more specific about which identifiers should actually give rise to definitions. The grammar is not optimized for this. For example,
(pattern/identifier)
does not actually catch all identifiers that appear in patterns. This is why many constructs are explicitly listed in the identifier rule.All tests do pass again, but the explicit listing of identifiers makes it more likely that I overlooked cases. We may want to revisit this in the future and consider restructuring the grammar to make this easier.