Add EnumFlags.from
This commit is contained in:
parent
5ff7a358f9
commit
39fcd51a7c
5 changed files with 15 additions and 9 deletions
|
|
@ -1200,7 +1200,7 @@ pub const InnerClasses = struct {
|
|||
.inner_class_info_index = try input.takeInt(u16, .big),
|
||||
.outer_class_info_index = try input.takeInt(u16, .big),
|
||||
.inner_name_index = try input.takeInt(u16, .big),
|
||||
.inner_class_access_flags = .{ .mask = try input.takeInt(u16, .big) },
|
||||
.inner_class_access_flags = .from(try input.takeInt(u16, .big)),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -2491,7 +2491,7 @@ pub const MethodParameters = struct {
|
|||
for (parameters) |*parameter| {
|
||||
parameter.* = .{
|
||||
.name_index = try input.takeInt(u16, .big),
|
||||
.access_flags = .{ .mask = try input.takeInt(u16, .big) },
|
||||
.access_flags = .from(try input.takeInt(u16, .big)),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -2695,7 +2695,7 @@ pub const Module = struct {
|
|||
|
||||
pub fn parse(input: *std.Io.Reader, allocator: std.mem.Allocator) ParseError!Self {
|
||||
const module_name_index = try input.takeInt(u16, .big);
|
||||
const module_flags: ModuleFlags = .{ .mask = try input.takeInt(u16, .big) };
|
||||
const module_flags: ModuleFlags = .from(try input.takeInt(u16, .big));
|
||||
const module_version_index = try input.takeInt(u16, .big);
|
||||
|
||||
const requires_count = try input.takeInt(u16, .big);
|
||||
|
|
@ -2703,7 +2703,7 @@ pub const Module = struct {
|
|||
errdefer allocator.free(requires);
|
||||
for (requires) |*r| {
|
||||
const requires_index = try input.takeInt(u16, .big);
|
||||
const requires_flags: Requires.RequiresFlags = .{ .mask = try input.takeInt(u16, .big) };
|
||||
const requires_flags: Requires.RequiresFlags = .from(try input.takeInt(u16, .big));
|
||||
const requires_version_index = try input.takeInt(u16, .big);
|
||||
r.* = .{
|
||||
.requires_index = requires_index,
|
||||
|
|
@ -2717,7 +2717,7 @@ pub const Module = struct {
|
|||
errdefer allocator.free(exports);
|
||||
for (exports) |*e| {
|
||||
const exports_index = try input.takeInt(u16, .big);
|
||||
const exports_flags: Exports.ExportsFlags = .{ .mask = try input.takeInt(u16, .big) };
|
||||
const exports_flags: Exports.ExportsFlags = .from(try input.takeInt(u16, .big));
|
||||
const exports_to_count = try input.takeInt(u16, .big);
|
||||
const exports_to_indeces = try allocator.alloc(u16, exports_to_count);
|
||||
errdefer allocator.free(exports_to_indeces);
|
||||
|
|
@ -2736,7 +2736,7 @@ pub const Module = struct {
|
|||
errdefer allocator.free(opens);
|
||||
for (opens) |*o| {
|
||||
const opens_index = try input.takeInt(u16, .big);
|
||||
const opens_flags: Opens.OpensFlags = .{ .mask = try input.takeInt(u16, .big) };
|
||||
const opens_flags: Opens.OpensFlags = .from(try input.takeInt(u16, .big));
|
||||
const opens_to_count = try input.takeInt(u16, .big);
|
||||
const opens_to_indeces = try allocator.alloc(u16, opens_to_count);
|
||||
errdefer allocator.free(opens_to_indeces);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue