| ... | @@ -4438,10 +4438,18 @@ fn transCreateNodeFloat(c: *Context, int: anytype) !*ast.Node { | ... | @@ -4438,10 +4438,18 @@ fn transCreateNodeFloat(c: *Context, int: anytype) !*ast.Node { |
| 4438 | } | 4438 | } |
| 4439 | | 4439 | |
| 4440 | fn transCreateNodeOpaqueType(c: *Context) !*ast.Node { | 4440 | fn transCreateNodeOpaqueType(c: *Context) !*ast.Node { |
| 4441 | const call_node = try c.createBuiltinCall("@Type", 1); | 4441 | const container_tok = try appendToken(c, .Keyword_opaque, "opaque"); |
| 4442 | call_node.params()[0] = try transCreateNodeEnumLiteral(c, "Opaque"); | 4442 | const lbrace_token = try appendToken(c, .LBrace, "{"); |
| 4443 | call_node.rparen_token = try appendToken(c, .RParen, ")"); | 4443 | const container_node = try ast.Node.ContainerDecl.alloc(c.arena, 0); |
| 4444 | return &call_node.base; | 4444 | container_node.* = .{ |
| | 4445 | .kind_token = container_tok, |
| | 4446 | .layout_token = null, |
| | 4447 | .lbrace_token = lbrace_token, |
| | 4448 | .rbrace_token = try appendToken(c, .RBrace, "}"), |
| | 4449 | .fields_and_decls_len = 0, |
| | 4450 | .init_arg_expr = .None, |
| | 4451 | }; |
| | 4452 | return &container_node.base; |
| 4445 | } | 4453 | } |
| 4446 | | 4454 | |
| 4447 | fn transCreateNodeMacroFn(c: *Context, name: []const u8, ref: *ast.Node, proto_alias: *ast.Node.FnProto) !*ast.Node { | 4455 | fn transCreateNodeMacroFn(c: *Context, name: []const u8, ref: *ast.Node, proto_alias: *ast.Node.FnProto) !*ast.Node { |