| ... | @@ -7,10 +7,10 @@ const meta = std.meta; | ... | @@ -7,10 +7,10 @@ const meta = std.meta; |
| 7 | const clang = @import("clang.zig"); | 7 | const clang = @import("clang.zig"); |
| 8 | const aro = @import("aro"); | 8 | const aro = @import("aro"); |
| 9 | const CToken = aro.Tokenizer.Token; | 9 | const CToken = aro.Tokenizer.Token; |
| 10 | const Node = ast.Node; | | |
| 11 | const Tag = Node.Tag; | | |
| 12 | const common = @import("aro_translate_c"); | 10 | const common = @import("aro_translate_c"); |
| 13 | const ast = common.ast; | 11 | const ast = common.ast; |
| | 12 | const Node = ast.Node; |
| | 13 | const Tag = Node.Tag; |
| 14 | const Error = common.Error; | 14 | const Error = common.Error; |
| 15 | const MacroProcessingError = common.MacroProcessingError; | 15 | const MacroProcessingError = common.MacroProcessingError; |
| 16 | const TypeError = common.TypeError; | 16 | const TypeError = common.TypeError; |
| ... | @@ -5985,10 +5985,11 @@ fn parseCCondExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node { | ... | @@ -5985,10 +5985,11 @@ fn parseCCondExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node { |
| 5985 | } | 5985 | } |
| 5986 | _ = m.next(); | 5986 | _ = m.next(); |
| 5987 | | 5987 | |
| | 5988 | const cond_body = try macroIntToBool(c, node); |
| 5988 | const then_body = try parseCOrExpr(c, m, scope); | 5989 | const then_body = try parseCOrExpr(c, m, scope); |
| 5989 | try m.skip(c, .colon); | 5990 | try m.skip(c, .colon); |
| 5990 | const else_body = try parseCCondExpr(c, m, scope); | 5991 | const else_body = try parseCCondExpr(c, m, scope); |
| 5991 | return Tag.@"if".create(c.arena, .{ .cond = node, .then = then_body, .@"else" = else_body }); | 5992 | return Tag.@"if".create(c.arena, .{ .cond = cond_body, .then = then_body, .@"else" = else_body }); |
| 5992 | } | 5993 | } |
| 5993 | | 5994 | |
| 5994 | fn parseCOrExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node { | 5995 | fn parseCOrExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node { |