diff options
author | 2022-02-05 21:26:47 -0800 | |
---|---|---|
committer | 2022-02-05 21:26:47 -0800 | |
commit | ca6cdb4e9818e2a8618c8412fe83a51346368fe4 (patch) | |
tree | a38aa6fac3921903ddad8743fc6ed875acd897ce | |
parent | e431dbe5bdba4624dbf3f87480fd61d5a5ddfba7 (diff) | |
download | bun-ca6cdb4e9818e2a8618c8412fe83a51346368fe4.tar.gz bun-ca6cdb4e9818e2a8618c8412fe83a51346368fe4.tar.zst bun-ca6cdb4e9818e2a8618c8412fe83a51346368fe4.zip |
[TOML] Fix bug with [[arrays]]
-rw-r--r-- | src/toml/toml_parser.zig | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/toml/toml_parser.zig b/src/toml/toml_parser.zig index 8f7130a1a..b91e83325 100644 --- a/src/toml/toml_parser.zig +++ b/src/toml/toml_parser.zig @@ -218,9 +218,10 @@ pub const TOML = struct { // child table array .t_open_bracket_double => { try p.lexer.next(); + var key = try p.parseKey(key_allocator); - try p.lexer.expect(.t_close_bracket); + try p.lexer.expect(.t_close_bracket_double); if (!p.lexer.has_newline_before) { try p.lexer.expectedString("line break"); } @@ -274,9 +275,12 @@ pub const TOML = struct { pub fn parseValue(p: *TOML) anyerror!Expr { const loc = p.lexer.loc(); + p.lexer.allow_double_bracket = true; + switch (p.lexer.token) { .t_false => { try p.lexer.next(); + return p.e(E.Boolean{ .value = false, }, loc); @@ -339,7 +343,6 @@ pub const TOML = struct { is_single_line = false; } } - try p.parseAssignment(obj, key_allocator); p.lexer.allow_double_bracket = false; stack.fixed_buffer_allocator.reset(); |