diff options
Diffstat (limited to 'query.zig')
| -rw-r--r-- | query.zig | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -106,7 +106,7 @@ pub fn ParsedQuery(comptime query: []const u8) ParsedQueryState(query.len) { | |||
| 106 | // Handles optional types | 106 | // Handles optional types |
| 107 | const typ = if (type_info_string[0] == '?') blk: { | 107 | const typ = if (type_info_string[0] == '?') blk: { |
| 108 | const child_type = ParseType(type_info_string[1..]); | 108 | const child_type = ParseType(type_info_string[1..]); |
| 109 | break :blk @Type(std.builtin.TypeInfo{ | 109 | break :blk @Type(std.builtin.Type{ |
| 110 | .Optional = .{ | 110 | .Optional = .{ |
| 111 | .child = child_type, | 111 | .child = child_type, |
| 112 | }, | 112 | }, |
| @@ -176,8 +176,8 @@ fn ParseType(type_info: []const u8) type { | |||
| 176 | if (mem.eql(u8, "isize", type_info)) return isize; | 176 | if (mem.eql(u8, "isize", type_info)) return isize; |
| 177 | 177 | ||
| 178 | if (type_info[0] == 'u' or type_info[0] == 'i') { | 178 | if (type_info[0] == 'u' or type_info[0] == 'i') { |
| 179 | return @Type(std.builtin.TypeInfo{ | 179 | return @Type(std.builtin.Type{ |
| 180 | .Int = std.builtin.TypeInfo.Int{ | 180 | .Int = std.builtin.Type.Int{ |
| 181 | .signedness = if (type_info[0] == 'i') .signed else .unsigned, | 181 | .signedness = if (type_info[0] == 'i') .signed else .unsigned, |
| 182 | .bits = std.fmt.parseInt(usize, type_info[1..type_info.len], 10) catch { | 182 | .bits = std.fmt.parseInt(usize, type_info[1..type_info.len], 10) catch { |
| 183 | @compileError("invalid type info " ++ type_info); | 183 | @compileError("invalid type info " ++ type_info); |