Output, tools and portability
nanoc c file.nc -o file.c writes deterministic readable C; --emit mini compacts non-raw C. --line-directives emits C #line markers where available. C diagnostics can refer to NanoC source, but this is not a guarantee of debugger compatibility. --check validates expansion only; compile and execute tests separately.
--std c89|c99|c11|c17 selects output restrictions. C89 lowers for initializers into an enclosing scope; inferred long long and unsupported literal forms are rejected. General C source still must obey the selected standard, including mixed-declaration restrictions. Raw C is never silently rewritten to downlevel it. GCC and Clang integration tests cover representative portable programs; universal C implementation support is not claimed.
expand file.nc --json exports compiler operation events, parent IDs, pass numbers, source ranges, captures, generated identifiers and TT results. emit file.nc --map file.map.json adds actual final C byte ranges. explain file.nc --line N, --symbol NAME or --generated-offset BYTE filters records. Source coordinates and offsets count UTF-8 bytes. Synthetic expansion positions refer to generated fragments; follow parent relationships to original source. This is operation provenance, not character-perfect macro reconstruction.
fmt file.nc, --write and --check perform lexical canonical indentation without executing TT. tokens file.nc --json reports lexical tokens; --encoding requires optional pinned tiktoken tooling and reports actual text token counts. convert file.c --to nanoc --conservative produces an opaque raw C island without dependencies. --compact optionally uses Clang ASTs and preserves unsupported or configuration-sensitive constructs as raw C. It does not restore original formatting or recover former macro abstractions.