| ... | ... | @@ -361,21 +361,7 @@ const DocData = struct { |
| 361 | 361 | /// `ComptimeExpr` represents the result of a piece of comptime logic |
| 362 | 362 | /// that we weren't able to analyze fully. Examples of that are comptime |
| 363 | 363 | /// function calls and comptime if / switch / ... expressions. |
| 364 | | const DocTypeKinds = blk: { |
| 365 | | var info = @typeInfo(std.builtin.TypeId); |
| 366 | | const original_len = info.Enum.fields.len; |
| 367 | | info.Enum.fields = info.Enum.fields ++ [2]std.builtin.TypeInfo.EnumField{ |
| 368 | | .{ |
| 369 | | .name = "ComptimeExpr", |
| 370 | | .value = original_len, |
| 371 | | }, |
| 372 | | .{ |
| 373 | | .name = "Unanalyzed", |
| 374 | | .value = original_len + 1, |
| 375 | | }, |
| 376 | | }; |
| 377 | | break :blk @Type(info); |
| 378 | | }; |
| 364 | const DocTypeKinds = @typeInfo(Type).Union.tag_type.?; |
| 379 | 365 | |
| 380 | 366 | const ComptimeExpr = struct { |
| 381 | 367 | code: []const u8, |
| ... | ... | @@ -433,7 +419,7 @@ const DocData = struct { |
| 433 | 419 | @"comptime": bool = false, |
| 434 | 420 | }; |
| 435 | 421 | |
| 436 | | const Type = union(DocTypeKinds) { |
| 422 | const Type = union(enum) { |
| 437 | 423 | Unanalyzed: struct {}, |
| 438 | 424 | Type: struct { name: []const u8 }, |
| 439 | 425 | Void: struct { name: []const u8 }, |