mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-10 10:02:38 +03:00
Merge pull request #5412 from aybeedee/precedence-fix
fixed precedence difference for && || operators
This commit is contained in:
commit
1fe4aae19d
@ -4,21 +4,21 @@ use std::cmp::Ordering;
|
||||
use std::fmt;
|
||||
|
||||
const PRECEDENCES: [(BinOp, u8); 20] = [
|
||||
(Caret, 7),
|
||||
(Star, 6),
|
||||
(Slash, 6),
|
||||
(DoubleSlash, 5),
|
||||
(Percent, 5),
|
||||
(Plus, 4),
|
||||
(Minus, 4),
|
||||
(Pizza, 3),
|
||||
(Equals, 2),
|
||||
(NotEquals, 2),
|
||||
(LessThan, 1),
|
||||
(GreaterThan, 1),
|
||||
(LessThanOrEq, 1),
|
||||
(GreaterThanOrEq, 1),
|
||||
(And, 0),
|
||||
(Caret, 8),
|
||||
(Star, 7),
|
||||
(Slash, 7),
|
||||
(DoubleSlash, 6),
|
||||
(Percent, 6),
|
||||
(Plus, 5),
|
||||
(Minus, 5),
|
||||
(Pizza, 4),
|
||||
(Equals, 3),
|
||||
(NotEquals, 3),
|
||||
(LessThan, 2),
|
||||
(GreaterThan, 2),
|
||||
(LessThanOrEq, 2),
|
||||
(GreaterThanOrEq, 2),
|
||||
(And, 1),
|
||||
(Or, 0),
|
||||
// These should never come up
|
||||
(Assignment, 255),
|
||||
|
Loading…
Reference in New Issue
Block a user