diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-01-25 18:42:24 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-01-25 18:42:24 +0900 |
| commit | afb238972816b560b082229ac20cdab64bca8aca (patch) | |
| tree | 1a61e9c0e2f013baa2001008a631780087ef3914 /src/root.zig | |
| parent | 11ff1132c8116aef2296cc6ebd3c40b5e7e7b43f (diff) | |
| download | zgjq-afb238972816b560b082229ac20cdab64bca8aca.tar.gz zgjq-afb238972816b560b082229ac20cdab64bca8aca.tar.zst zgjq-afb238972816b560b082229ac20cdab64bca8aca.zip | |
implement empty array/object literals
Diffstat (limited to 'src/root.zig')
| -rw-r--r-- | src/root.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/root.zig b/src/root.zig index 650acdf..f2cc29a 100644 --- a/src/root.zig +++ b/src/root.zig @@ -47,6 +47,10 @@ test "literals" { try testRun("\"\"", "null", "\"\""); try testRun("\"hello\\nworld\"", "null", "\"hello\\nworld\""); try testRun("\"hello\"", "{\"a\":1}", "\"hello\""); + try testRun("[]", "null", "[]"); + try testRun("{}", "null", "{}"); + try testRun("[]", "{\"a\":1}", "[]"); + try testRun("{}", "[1,2,3]", "{}"); } test "identity filter" { |
