Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/syntax/src/res_token.ml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ type t =
let precedence = function
| HashEqual | ColonEqual -> 1
| Lor -> 2
| Land -> 3
| Caret -> 4
| Caret -> 3
| Land -> 4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table in https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_precedence#table shows the order as

Bildschirmfoto 2025-04-13 um 07 32 17

though.

So the original Lor, Land, Caret order seems correct?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You right, I had confused token names 😞 There is just no Token.Bar for binary expr yet.

| Equal | EqualEqual | EqualEqualEqual | LessThan | GreaterThan | BangEqual
| BangEqualEqual | LessEqual | GreaterEqual | BarGreater ->
5
Expand Down