compactp
a parser frontend for the compact language
FACTSv0.1.0-β1
COMPACT≥ 0.23
TESTED0.31.0
MSRV1.90
- 001LOSSLESS CONCRETE SYNTAX TREEROWAN
- 002TYPED ABSTRACT SYNTAX TREEZERO-ALLOC
- 003RESILIENT PARSING + RECOVERYERROR NODES
- 004RUSTC-STYLE HUMAN DIAGNOSTICSANSI
- 005STRUCTURED JSON ENVELOPESCHEMA v1
- 006LIBRARY API FOR RUST EMBEDDINGLIB
- 007WATCH MODEFSNOTIFY
INSTALL
$ cargo install compactp
USAGE
$ compactp parse program.compact $ compactp --format json --pretty diag program.compact $ compactp watch parse src/
read full reference → GITHUB ↗
COMMANDS
| COMMAND | DESCRIPTION |
|---|---|
lex | Tokenize Compact source and print tokens with byte offsets |
parse | Parse input and report diagnostics |
cst | Dump the full lossless concrete syntax tree |
ast | Dump the typed abstract syntax tree |
diag | Emit diagnostics only |
stats | Report file size, token / node / error counts, parse time |
watch | Re-run any of the above when files change |