Skip to content

Commit

Permalink
Merge pull request #5412 from aybeedee/precedence-fix
Browse files Browse the repository at this point in the history
fixed precedence difference for && || operators
  • Loading branch information
bhansconnect committed May 15, 2023
2 parents 9c6aae9 + 98226cb commit 1fe4aae
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions crates/compiler/module/src/called_via.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 1fe4aae

Please sign in to comment.