diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-07-29 08:05:46 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-07-29 08:05:46 -0700 |
commit | d0923800e0b2b2476ff39d8144549172b5c668cb (patch) | |
tree | 5f660647eee1ad1e469c168f07ec5353673dcf9c /linenoise/linenoise.c | |
parent | 53872969cc7c6a52ff2d92b9da1bba8000c45522 (diff) | |
download | txr-d0923800e0b2b2476ff39d8144549172b5c668cb.tar.gz txr-d0923800e0b2b2476ff39d8144549172b5c668cb.tar.bz2 txr-d0923800e0b2b2476ff39d8144549172b5c668cb.zip |
parser: allow trailing commas in json, via opt-in flag.
* parser.c (read_bad_json_s): New symbol variable.
(parser_common_init): Propagate value of *read-bad-json* into
read_bad_json flag in parser structure.
(parser_init): Initialize read_bad_json_s and register the
*read-bad-json* dynamic variable.
* parser.h (struct parser): New member, read_bad_json.
(read_bad_json_s): Declared.
* parser.y (json_val): Support an opt_comma symbol just before
the closing bracket or brace.
(opt_comma): New nonterminal symbol. Recognizes ',' or nothing.
Error is flagged if ',' is recognized, and *read-bad-json*
is nil.
* y.tab.c.shipped: Updated.
* tests/010/json.tl: New tests.
* txr.1: Documented.
Diffstat (limited to 'linenoise/linenoise.c')
0 files changed, 0 insertions, 0 deletions