You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while (true) {
!break;
}
while (true) {
--break;
}
while (true) {
1+break;
}
All three pass the grammar as defined in grammar.y, and I believe the first two have no impact on actual zig compilation results. The third one fails the zig compiler due to unreachable code (it considers the 1 + to be unreachable)
PrimaryExpr is the relevant rule. All of the binary and unary operations coming in from PrefixExpr on the left-hand-side is what allows for this unexpected grammar.
The text was updated successfully, but these errors were encountered:
All three pass the grammar as defined in
grammar.y
, and I believe the first two have no impact on actual zig compilation results. The third one fails the zig compiler due to unreachable code (it considers the1 +
to be unreachable)PrimaryExpr
is the relevant rule. All of the binary and unary operations coming in fromPrefixExpr
on the left-hand-side is what allows for this unexpected grammar.The text was updated successfully, but these errors were encountered: