| ... | @@ -5375,7 +5375,7 @@ fn parseCPrimaryExpr(c: *Context, it: *CTokenList.Iterator, source: []const u8, | ... | @@ -5375,7 +5375,7 @@ fn parseCPrimaryExpr(c: *Context, it: *CTokenList.Iterator, source: []const u8, |
| 5375 | const first_tok = it.list.at(0); | 5375 | const first_tok = it.list.at(0); |
| 5376 | const token = try appendToken(c, .CharLiteral, try zigifyEscapeSequences(c, source[tok.start..tok.end], source[first_tok.start..first_tok.end], source_loc)); | 5376 | const token = try appendToken(c, .CharLiteral, try zigifyEscapeSequences(c, source[tok.start..tok.end], source[first_tok.start..first_tok.end], source_loc)); |
| 5377 | const node = try c.a().create(ast.Node.CharLiteral); | 5377 | const node = try c.a().create(ast.Node.CharLiteral); |
| 5378 | node.* = ast.Node.CharLiteral{ | 5378 | node.* = .{ |
| 5379 | .token = token, | 5379 | .token = token, |
| 5380 | }; | 5380 | }; |
| 5381 | return &node.base; | 5381 | return &node.base; |
| ... | @@ -5384,7 +5384,7 @@ fn parseCPrimaryExpr(c: *Context, it: *CTokenList.Iterator, source: []const u8, | ... | @@ -5384,7 +5384,7 @@ fn parseCPrimaryExpr(c: *Context, it: *CTokenList.Iterator, source: []const u8, |
| 5384 | const first_tok = it.list.at(0); | 5384 | const first_tok = it.list.at(0); |
| 5385 | const token = try appendToken(c, .StringLiteral, try zigifyEscapeSequences(c, source[tok.start..tok.end], source[first_tok.start..first_tok.end], source_loc)); | 5385 | const token = try appendToken(c, .StringLiteral, try zigifyEscapeSequences(c, source[tok.start..tok.end], source[first_tok.start..first_tok.end], source_loc)); |
| 5386 | const node = try c.a().create(ast.Node.StringLiteral); | 5386 | const node = try c.a().create(ast.Node.StringLiteral); |
| 5387 | node.* = ast.Node.StringLiteral{ | 5387 | node.* = .{ |
| 5388 | .token = token, | 5388 | .token = token, |
| 5389 | }; | 5389 | }; |
| 5390 | return &node.base; | 5390 | return &node.base; |
| ... | @@ -5793,12 +5793,13 @@ fn parseCSuffixOpExpr(c: *Context, it: *CTokenList.Iterator, source: []const u8, | ... | @@ -5793,12 +5793,13 @@ fn parseCSuffixOpExpr(c: *Context, it: *CTokenList.Iterator, source: []const u8, |
| 5793 | return node; | 5793 | return node; |
| 5794 | }, | 5794 | }, |
| 5795 | } | 5795 | } |
| | 5796 | const cast_fn = if (bool_op) macroIntToBool else macroBoolToInt; |
| | 5797 | const lhs_node = try cast_fn(c, node); |
| 5796 | const rhs_node = try parseCPrefixOpExpr(c, it, source, source_loc, scope); | 5798 | const rhs_node = try parseCPrefixOpExpr(c, it, source, source_loc, scope); |
| 5797 | const op_node = try c.a().create(ast.Node.InfixOp); | 5799 | const op_node = try c.a().create(ast.Node.InfixOp); |
| 5798 | const cast_fn = if (bool_op) macroIntToBool else macroBoolToInt; | | |
| 5799 | op_node.* = .{ | 5800 | op_node.* = .{ |
| 5800 | .op_token = op_token, | 5801 | .op_token = op_token, |
| 5801 | .lhs = try cast_fn(c, node), | 5802 | .lhs = lhs_node, |
| 5802 | .op = op_id, | 5803 | .op = op_id, |
| 5803 | .rhs = try cast_fn(c, rhs_node), | 5804 | .rhs = try cast_fn(c, rhs_node), |
| 5804 | }; | 5805 | }; |