@@ -138,22 +138,22 @@ pub const Tag = struct {
138138
139139 pub fn fromZig (comptime T : type ) Tag {
140140 switch (@typeInfo (T )) {
141- .Struct , .Enum , .Union = > {
141+ .@"struct" , .@"enum" , .@"union" = > {
142142 if (@hasDecl (T , "asn1_tag" )) return T .asn1_tag ;
143143 },
144144 else = > {},
145145 }
146146
147147 switch (@typeInfo (T )) {
148- .Struct , .Union = > return universal (.sequence , true ),
149- .Bool = > return universal (.boolean , false ),
150- .Int = > return universal (.integer , false ),
151- .Enum = > | e | {
148+ .@"struct" , .@"union" = > return universal (.sequence , true ),
149+ .bool = > return universal (.boolean , false ),
150+ .int = > return universal (.integer , false ),
151+ .@"enum" = > | e | {
152152 if (@hasDecl (T , "oids" )) return Oid .asn1_tag ;
153153 return universal (if (e .is_exhaustive ) .enumerated else .integer , false );
154154 },
155- .Optional = > | o | return fromZig (o .child ),
156- .Null = > return universal (.null , false ),
155+ .optional = > | o | return fromZig (o .child ),
156+ .null = > return universal (.null , false ),
157157 else = > @compileError ("cannot map Zig type to asn1_tag " ++ @typeName (T )),
158158 }
159159 }
@@ -266,12 +266,12 @@ pub const FieldTag = struct {
266266 class : Tag.Class ,
267267 explicit : bool = true ,
268268
269- pub fn explicit (number : std .meta .Tag (Tag.Number ), class : Tag .Class ) FieldTag {
270- return FieldTag { .number = number , .class = class , .explicit = true };
269+ pub fn initExplicit (number : std .meta .Tag (Tag.Number ), class : Tag .Class ) FieldTag {
270+ return . { .number = number , .class = class , .explicit = true };
271271 }
272272
273- pub fn implicit (number : std .meta .Tag (Tag.Number ), class : Tag .Class ) FieldTag {
274- return FieldTag { .number = number , .class = class , .explicit = false };
273+ pub fn initImplicit (number : std .meta .Tag (Tag.Number ), class : Tag .Class ) FieldTag {
274+ return . { .number = number , .class = class , .explicit = false };
275275 }
276276
277277 pub fn fromContainer (comptime Container : type , comptime field_name : []const u8 ) ? FieldTag {
0 commit comments