Repository navigation
Highlight field access differently from calls - #73
Conversation
589accf to
4d5e000
Compare
| operator: "|>" | ||
| right: (call | ||
| target: (dot | ||
| right: (identifier) @function))) |
There was a problem hiding this comment.
For what is worth, Elixir will likely emit runtime warnings for this in the future (i.e. Elixir agrees it is a function call but it will treat the code without parens as deprecated).
There was a problem hiding this comment.
Do you mean the same for foo |> bar?
There was a problem hiding this comment.
We will warn on foo |> bar in the future as well. But first we want to change the formatter to automatically add the parens.
There was a problem hiding this comment.
Sounds good. I think it's fine to keep highlighting for now and align once is changes upstream. Highlighting rules are an easy change.
There was a problem hiding this comment.
Yes, to be clear, it will always be a call. So this is correct. We will just emit warnings too.
See #72 (comment).