| author | |
| committer | |
| log | 94e0afff42bb49163e9af6cfc3e796bdb5a9aa99 |
| tree | 833b0eea6972d2b1050f7be8c2d28a637c9230f5 |
| parent | 06466b3e51778e19b37dbe4f9e1cb1fc6d5ef2af |
1 files changed, 6 insertions(+), 0 deletions(-)
scripts/_common.zig+6| ... | ... | @@ -67,3 +67,9 @@ pub fn Main(comptime T: type) type { |
| 67 | 67 | } |
| 68 | 68 | }; |
| 69 | 69 | } |
| 70 | ||
| 71 | pub fn stringToEnum(comptime T: type, str: []const u8) !void { | |
| 72 | if (std.meta.stringToEnum(T, str)) |_| {} else { | |
| 73 | std.log.warn("{s} is not part of the type {s}", .{ str, @typeName(T) }); | |
| 74 | } | |
| 75 | } |