diff options
Diffstat (limited to 'query.zig')
| -rw-r--r-- | query.zig | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -146,7 +146,7 @@ pub fn ParsedQuery(comptime tmp_query: []const u8) type { | |||
| 146 | const typ = if (type_info_string[0] == '?') blk: { | 146 | const typ = if (type_info_string[0] == '?') blk: { |
| 147 | const child_type = ParseType(type_info_string[1..]); | 147 | const child_type = ParseType(type_info_string[1..]); |
| 148 | break :blk @Type(std.builtin.Type{ | 148 | break :blk @Type(std.builtin.Type{ |
| 149 | .Optional = .{ | 149 | .optional = .{ |
| 150 | .child = child_type, | 150 | .child = child_type, |
| 151 | }, | 151 | }, |
| 152 | }); | 152 | }); |
| @@ -205,7 +205,7 @@ fn ParseType(comptime type_info: []const u8) type { | |||
| 205 | 205 | ||
| 206 | if (type_info[0] == 'u' or type_info[0] == 'i') { | 206 | if (type_info[0] == 'u' or type_info[0] == 'i') { |
| 207 | return @Type(std.builtin.Type{ | 207 | return @Type(std.builtin.Type{ |
| 208 | .Int = std.builtin.Type.Int{ | 208 | .int = std.builtin.Type.Int{ |
| 209 | .signedness = if (type_info[0] == 'i') .signed else .unsigned, | 209 | .signedness = if (type_info[0] == 'i') .signed else .unsigned, |
| 210 | .bits = std.fmt.parseInt(usize, type_info[1..type_info.len], 10) catch { | 210 | .bits = std.fmt.parseInt(usize, type_info[1..type_info.len], 10) catch { |
| 211 | @compileError("invalid type info " ++ type_info); | 211 | @compileError("invalid type info " ++ type_info); |