2 ms·
Note that depending on what parsing lib you use, it may produce nodes of your own custom AST type Personally I love the (Rust) combo of logos for lexing, chums
by nextaccountic 11mo ago
Note that depending on what parsing lib you use, it may produce nodes of your own custom AST type
Personally I love the (Rust) combo of logos for lexing, chumsky for parsing, and ariadne for error reporting. Chumsky has options for error recovery and good performance, ariadne is gorgeous (there is another alternative for Rust, miette, both are good).
The only thing chumsky is lacking is incremental parsing. There is a chumsky-inspired library for incremental parsing called incpa though
- estebank 11mo agoIf you want something more conservative for error reporting, annotate-snippets is finally at parity with rustc's current custom renderer and will soon become the default for both rustc and cargo.
- nextaccountic 11mo agoWill migrating to annotate-snippets change rustc/cargo formatting of errors in any way? Also, in what sense it is more conservative?
- estebank 11mo agoThe output will cause no user visible change. It uses ASCII for all output, replaces ZWJs to have consistent terminal output in the face of multi codepoint emoji for two out of the top of my head.