remove unnecessary captures within pipe expressions (fixes #78): #81
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.
#78 is correct - keywords following pipes are not being scoped appropriately. They are being caught up in the 2nd capture group of "Pipe operator call without parenthesis." What's interesting is that the entire block seems redundant:
|>
operator is captured separately elsewhere in the grammar (askeyword.operator.other.elixir
), so removing the first capture does not affect scoping/highlighting of the pipe itself.entity.name.function-call.elixir
) without any special capturing, so the 2nd capture group can be removed as well.keyword.control.elixir
). Since this can be done without any explicitinclude
s, this seems like all upside to me. We aren't deleting any parent scope for the entire expression, because only the sub-captures were used.