authorgravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2026-10-20 14:44:06-07:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-22 12:21:43+02:00
log755333971b19907375410c131433668528bb1bc0
tree4a19721bfd8241a5d77cf407fe3ed50dc543b5af
parenta071b0e6d2b1f09d2292d719c33b0b1ee91f0918

0.16 -> 0.17


1 files changed, 7 insertions(+), 7 deletions(-)

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