diff options
Diffstat (limited to 'src/jq/parse.zig')
| -rw-r--r-- | src/jq/parse.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/jq/parse.zig b/src/jq/parse.zig index 5df1d14..d197c26 100644 --- a/src/jq/parse.zig +++ b/src/jq/parse.zig @@ -352,6 +352,14 @@ fn parsePrimary(allocator: std.mem.Allocator, parse_allocator: std.mem.Allocator number_node.* = .{ .literal = number_value }; return number_node; }, + .string => |s| { + _ = try tokens.next(); + const string_value = try allocator.create(jv.Value); + string_value.* = .{ .string = try allocator.dupe(u8, s) }; + const string_node = try parse_allocator.create(Ast); + string_node.* = .{ .literal = string_value }; + return string_node; + }, .dot => { _ = try tokens.next(); const ast = try parse_allocator.create(Ast); |
