You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wider context: this library is used by elm-review, which -among other things - allows writing custom linting rules for elm source code. Unfortunately since the expressions are not parsed correctly by this library, this leads to all sorts of false positives as in the following example
Because elm-syntax parses this as (f <| x) || y it gives this false positive warning, which shouldn't be there, because || has higher precedence than <|, so the correct parsing should look like f <| (x || y).
The text was updated successfully, but these errors were encountered:
@jhrcek Thank you for your report. That was clearly a bug.
The fix @MartinSStewart made a functional fix for this which is already released in 7.1.2.
I've just prepared a pull request (#66) that will ship with 8.0.0, which will ensure that most programs have proper parsing of operators (and will nog require parsing of dependencies).
It seems to me, that operator precedence is not take into account when parsing expressions.
For example the following two expressions
both produce the same shape of the expression tree, the first one being obviously incorrect
I created SSCCE which demonstrated this issue: https://github.com/jhrcek/elm-syntax-sscce
Wider context: this library is used by elm-review, which -among other things - allows writing custom linting rules for elm source code. Unfortunately since the expressions are not parsed correctly by this library, this leads to all sorts of false positives as in the following example
Because elm-syntax parses this as
(f <| x) || y
it gives this false positive warning, which shouldn't be there, because||
has higher precedence than<|
, so the correct parsing should look likef <| (x || y)
.The text was updated successfully, but these errors were encountered: