| ... | ... | @@ -1656,7 +1656,7 @@ const PrecClass = struct { |
| 1656 | 1656 | break :b order; |
| 1657 | 1657 | }; |
| 1658 | 1658 | |
| 1659 | | /// Uses the table from Zig-0.16.0 |
| 1659 | /// Uses the table from Zig-0.17.0 |
| 1660 | 1660 | /// * / % *% *| || |
| 1661 | 1661 | /// + - ++ +% -% +| -| |
| 1662 | 1662 | /// << >> <<| |
| ... | ... | @@ -1664,7 +1664,7 @@ const PrecClass = struct { |
| 1664 | 1664 | /// == != < > <= >= |
| 1665 | 1665 | /// and |
| 1666 | 1666 | /// or |
| 1667 | | const v0_16_precedence_ordering = b: { |
| 1667 | const v0_17_precedence_ordering = b: { |
| 1668 | 1668 | @setEvalBranchQuota(20_000); |
| 1669 | 1669 | |
| 1670 | 1670 | var order: PrecedenceArray = @splat(@splat(null)); |
| ... | ... | @@ -1704,8 +1704,8 @@ const PrecClass = struct { |
| 1704 | 1704 | return PrecClass.precedence_ordering[@backingInt(lhs.group)][@backingInt(rhs.group)]; |
| 1705 | 1705 | } |
| 1706 | 1706 | |
| 1707 | | pub fn v0_16_cmp(lhs: PrecClass, rhs: PrecClass) Rel { |
| 1708 | | return PrecClass.v0_16_precedence_ordering[@backingInt(lhs.group)][@backingInt(rhs.group)].?; |
| 1707 | pub fn v0_17_cmp(lhs: PrecClass, rhs: PrecClass) Rel { |
| 1708 | return PrecClass.v0_17_precedence_ordering[@backingInt(lhs.group)][@backingInt(rhs.group)].?; |
| 1709 | 1709 | } |
| 1710 | 1710 | |
| 1711 | 1711 | fn computeTransitiveOrdering(order: *PrecedenceArray) void { |
| ... | ... | @@ -1782,7 +1782,7 @@ fn parseExprPrecedence(p: *Parse, min_exc_prec: PrecClass, prev_operator_token: |
| 1782 | 1782 | const rel = info.prec.cmp(min_exc_prec) orelse b: { |
| 1783 | 1783 | const prev_op_tok_tag = p.tokenTag(prev_operator_token); |
| 1784 | 1784 | const prev_op_info = operTable[@backingInt(prev_op_tok_tag)]; |
| 1785 | | const v0_16_rel = prev_op_info.prec.v0_16_cmp(info.prec); |
| 1785 | const v0_17_rel = prev_op_info.prec.v0_17_cmp(info.prec); |
| 1786 | 1786 | try p.warnMsg(.{ |
| 1787 | 1787 | .tag = .ambiguous_operator_precedence, |
| 1788 | 1788 | .is_note = false, |
| ... | ... | @@ -1796,7 +1796,7 @@ fn parseExprPrecedence(p: *Parse, min_exc_prec: PrecClass, prev_operator_token: |
| 1796 | 1796 | .is_note = true, |
| 1797 | 1797 | .token = prev_operator_token, |
| 1798 | 1798 | }); |
| 1799 | | if (v0_16_rel == .gt or v0_16_rel == .eq) { |
| 1799 | if (v0_17_rel == .gt or v0_17_rel == .eq) { |
| 1800 | 1800 | try p.warnMsg(.{ |
| 1801 | 1801 | .tag = .hint_operator_precedence_left, |
| 1802 | 1802 | .is_note = true, |
| ... | ... | @@ -1816,7 +1816,7 @@ fn parseExprPrecedence(p: *Parse, min_exc_prec: PrecClass, prev_operator_token: |
| 1816 | 1816 | }); |
| 1817 | 1817 | } |
| 1818 | 1818 | // Use the old precedence rules to construct the tree to ease automatic fixups |
| 1819 | | break :b info.prec.v0_16_cmp(min_exc_prec); |
| 1819 | break :b info.prec.v0_17_cmp(min_exc_prec); |
| 1820 | 1820 | }; |
| 1821 | 1821 | |
| 1822 | 1822 | if (rel == .lt) { |