zld: parse []TbdV3 before TbdV3

This commit is contained in:
Jakub Konka
2021-11-21 23:30:17 +01:00
parent 40e49fe2f0
commit e17c4a497f

View File

@@ -127,6 +127,16 @@ pub const LibStub = struct {
break :blk out;
}
err: {
log.debug("trying to parse as []TbdV3", .{});
const inner = lib_stub.yaml.parse([]TbdV3) catch break :err;
var out = try lib_stub.yaml.arena.allocator.alloc(Tbd, inner.len);
for (inner) |doc, i| {
out[i] = .{ .v3 = doc };
}
break :blk out;
}
err: {
log.debug("trying to parse as TbdV3", .{});
const inner = lib_stub.yaml.parse(TbdV3) catch break :err;