code wiki / (root) / nx_json_test.nx

nx_json_test.nx

buildroot/runtime/nx_json_test.nx

3530 B114 linesdepth 6pulls 10 transitivereach 0 importersview sourcekind gate/prooftopic json
docsdependenciesstructsconstsfunctions

about

nx_json_test.nx -- exercise both the tokenizer (nx_json.nx) and the emitter (nx_json_emit.nx) end-to-end. Strategy: 1. Use the emitter to build an object with strings (incl. escapes), ints, bool, null, nested array/object. 2. Confirm the emitted bytes parse cleanly via the tokenizer. 3. Spot-check a handful of token kinds + escape behaviour.

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_runtime.nx nx_json.nx nx_json_emit.nx json_emit.nx nx_json_test.nx

imports: nx_syscalls.nxnx_runtime.nxnx_json.nxnx_json_emit.nxjson_emit.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap json_writer_init json_begin_object je_sep je_put je_put ↻ json_emit_key je_sep ↻ je_emit_string_raw je_put ↻ je_put ↻ json_emit_string je_sep ↻ je_emit_string_raw ↻ json_emit_int je_sep ↻ je_put ↻ json_emit_bool je_sep ↻ je_emit_literal je_put ↻ json_emit_null je_sep ↻ je_emit_literal ↻ json_begin_array je_sep ↻ je_put ↻ json_end_array je_put ↻ json_end_object je_put ↻ nx_json_new sys_mmap ↻ nx_json_next nx_json_skip_ws nx_lex_is_ws nx_ascii_is_digit sys_mmap ↻ nx_json_lit

structs

none

consts

none

functions

17func main() -> i64