Expand description
§Fase 39.f — axon parse subcommand (Rust binary parity).
Multi-file diagnostic aggregator. Walks the given file paths /
directories / globs, runs each .axon file through
Parser::parse_with_recovery, and aggregates every parse error +
type-check error into a single report. Mirrors the Python
axon.cli.parse_cmd:cmd_parse from Fase 28.f.
§Flags
--max-errors N— cap total errors across all files (D6, default unlimited)--ignore PATTERN— fnmatch-style ignore pattern (may repeat);.axonignorefiles in walked dirs are honoured automatically--jobs N— worker thread count (default: auto). The Rust implementation currently runs single-threaded; the flag is accepted for Python-parity but the threading is deferred to a future fase (honest scope)--json— emit machine-readable diagnostics (D5)--format array|ndjson— JSON framing when –json is set--strict— opt into legacy fail-on-first behavior (D8); also activated byAXON_PARSER_STRICTenv var--no-color— disable ANSI colour codes
§Exit codes (bitwise OR of cause classes)
0— success (no errors)1— parse / type errors observed2— I/O errors (file not found, read failed, glob expansion failed)3— both classes (1 | 2)
Structs§
- Aggregated
Diagnostic - Per-file diagnostic emitted by the aggregator. Wire-stable JSON
shape for
--jsonmode (rustc-compatible field naming per Fase 28.g D5). - Parse
Config - Configuration for
axon parse(mirrors the Python CLI args).
Functions§
- exit_
code - Compute the exit code from the diagnostics + io_errors observed. Mirrors the Python CLI’s bitwise OR convention (D6).
- render_
human - Format diagnostics as a human-readable report for stdout.
- render_
json - Format diagnostics as JSON (array or ndjson framing). Rustc- compatible field shape per Fase 28.g D5.
- run_
parse - Run
axon parseagainst a configured corpus. Returns a tuple(diagnostics, io_errors, truncated):