Commit 24654f06
24654f0664beMerged
Yukihiro "Matz" Matsumoto <[email protected]> · 5 months ago · 7 files · +4 added · ~3 modified
Description
Merge pull request #1260 from fc-anjos/feature/json-generate-records
Implement JSON.generate/JSON.dump for Struct records, with a per-class C helper. Also fixes spinel_parse.c's out_add() truncating text-AST records longer than 4096 bytes (it now sizes the buffer via vsnprintf), which the larger codegen had begun to trip during bootstrap.
Details
- Commit
- 24654f0664be
- Parent
- f98130e117bb
- Merge parent
- e164c29c06bc
docs/AST.mdmodifiedView file
@@ -29,6 +29,11 @@
2929
Plain UTF-8 text, line-oriented (`\n`-terminated). Every line is one3030
record. Fields are space-separated.3131
32+
Records are not length-limited by the format. Large source constructs33+
can produce `A` records longer than 4096 bytes, so parser emitters must34+
size output records dynamically instead of formatting through a fixed35+
line buffer.36+
3237
The first record is always:3338
3439
```spinel_codegen.rbmodifiedView file
Loading diff…
spinel_parse.cmodifiedView file
Loading diff…
test/json_generate_struct_record.rbaddedView file
Loading diff…
test/json_generate_struct_record.rb.expectedaddedView file
Loading diff…
test/parser_long_ast_record.rbaddedView file
Loading diff…
test/parser_long_ast_record.rb.expectedaddedView file
Loading diff…