diff options
| author | Vallahor <vallahor91@gmail.com> | 2022-05-29 05:56:26 -0300 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-07-19 19:10:12 -0700 |
| commit | 1213123ad04e90d67b5c004ddc8744fe409cd839 (patch) | |
| tree | 83a37ab79dde69f14e2879945481baa49dd373e0 /src | |
| parent | d23ccdb8d9e4d3510667164545f9c3be3374d529 (diff) | |
| download | zig-1213123ad04e90d67b5c004ddc8744fe409cd839.tar.gz zig-1213123ad04e90d67b5c004ddc8744fe409cd839.zip | |
fix: *.{} array are now printed as type *[]comptime
Diffstat (limited to 'src')
| -rw-r--r-- | src/Autodoc.zig | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/Autodoc.zig b/src/Autodoc.zig index e07c2a9b29..d29a468b91 100644 --- a/src/Autodoc.zig +++ b/src/Autodoc.zig @@ -416,6 +416,7 @@ const DocData = struct { address_space: ?Expr = null, bit_start: ?Expr = null, host_size: ?Expr = null, + is_ref: bool = false, is_allowzero: bool = false, is_mutable: bool = false, is_volatile: bool = false, @@ -582,8 +583,9 @@ const DocData = struct { \\"has_align": {}, \\"has_addrspace": {}, \\"has_bit_range": {}, + \\"is_ref": {}, \\ - , .{ v.is_allowzero, v.is_mutable, v.is_volatile, v.has_sentinel, v.has_align, v.has_addrspace, v.has_bit_range }); + , .{ v.is_allowzero, v.is_mutable, v.is_volatile, v.has_sentinel, v.has_align, v.has_addrspace, v.has_bit_range, v.is_ref }); if (options.whitespace) |ws| try ws.outputIndent(w); try w.print( \\"child": @@ -1962,17 +1964,12 @@ fn walkInstruction( } const type_slot_index = self.types.items.len; - try self.types.append(self.arena, .{ - .Array = .{ - .len = .{ - .int = .{ - .value = operands.len - 1, - .negated = false, - }, - }, - .child = array_type.?, - }, - }); + try self.types.append(self.arena, .{ .Pointer = .{ + .size = .Slice, + .child = array_type.?, + .is_mutable = true, + .is_ref = true, + } }); return DocData.WalkResult{ .typeRef = .{ .type = type_slot_index }, |
