aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Autodoc.zig12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/Autodoc.zig b/src/Autodoc.zig
index bc1b1beebb..f983bdfdf0 100644
--- a/src/Autodoc.zig
+++ b/src/Autodoc.zig
@@ -632,7 +632,7 @@ const DocData = struct {
sizeOf: usize, // index in `exprs`
bitSizeOf: usize, // index in `exprs`
enumToInt: usize, // index in `exprs`
- compileError: []const u8,
+ compileError: usize, //index in `exprs`
errorSets: usize,
string: []const u8, // direct value
sliceIndex: usize,
@@ -1027,13 +1027,11 @@ fn walkInstruction(
false,
);
+ const operand_index = self.exprs.items.len;
+ try self.exprs.append(self.arena, operand.expr);
+
return DocData.WalkResult{
- .expr = .{
- .compileError = switch (operand.expr) {
- .string => |s| s,
- else => "TODO: non-string @compileError arguments",
- },
- },
+ .expr = .{ .compileError = operand_index },
};
},
.enum_literal => {