| ... | @@ -632,7 +632,7 @@ const DocData = struct { | ... | @@ -632,7 +632,7 @@ const DocData = struct { |
| 632 | sizeOf: usize, // index in `exprs` | 632 | sizeOf: usize, // index in `exprs` |
| 633 | bitSizeOf: usize, // index in `exprs` | 633 | bitSizeOf: usize, // index in `exprs` |
| 634 | enumToInt: usize, // index in `exprs` | 634 | enumToInt: usize, // index in `exprs` |
| 635 | compileError: []const u8, | 635 | compileError: usize, //index in `exprs` |
| 636 | errorSets: usize, | 636 | errorSets: usize, |
| 637 | string: []const u8, // direct value | 637 | string: []const u8, // direct value |
| 638 | sliceIndex: usize, | 638 | sliceIndex: usize, |
| ... | @@ -1027,13 +1027,11 @@ fn walkInstruction( | ... | @@ -1027,13 +1027,11 @@ fn walkInstruction( |
| 1027 | false, | 1027 | false, |
| 1028 | ); | 1028 | ); |
| 1029 | | 1029 | |
| | 1030 | const operand_index = self.exprs.items.len; |
| | 1031 | try self.exprs.append(self.arena, operand.expr); |
| | 1032 | |
| 1030 | return DocData.WalkResult{ | 1033 | return DocData.WalkResult{ |
| 1031 | .expr = .{ | 1034 | .expr = .{ .compileError = operand_index }, |
| 1032 | .compileError = switch (operand.expr) { | | |
| 1033 | .string => |s| s, | | |
| 1034 | else => "TODO: non-string @compileError arguments", | | |
| 1035 | }, | | |
| 1036 | }, | | |
| 1037 | }; | 1035 | }; |
| 1038 | }, | 1036 | }, |
| 1039 | .enum_literal => { | 1037 | .enum_literal => { |