pub fn extraData(p: Parser, comptime T: type, index: ExtraIndex) ExtraData(T)
pub fn extraData(p: Parser, comptime T: type, index: ExtraIndex) ExtraData(T) { const info = @typeInfo(T).@"struct"; var i: usize = @backingInt(index); var result: T = undefined; inline for (info.field_names, info.field_types) |field_name, field_type| { @field(result, field_name) = switch (field_type) { u32 => p.extra.items[i], else => @compileError("bad field type"), }; i += 1; } return .{ .data = result, .end = i }; }