@janriemer Neat! Let me know if you run into any issues, I tend to respond to issues/discussions on the repo within a few hours. You might enjoy giving some of the examples a look/run to see what the crate can do, there's quite a lot there :)
Top-level
@janriemer Neat! Let me know if you run into any issues, I tend to respond to issues/discussions on the repo within a few hours. You might enjoy giving some of the examples a look/run to see what the crate can do, there's quite a lot there :) 7 comments
@jsbarretto Thank you so much for your help, Joshua! That's so nice! I really appreciate it! ❤️ What I'm really curious about are those advanced error recovery strategies in chumsky. :awesome: @janriemer chumsky lets you do quite a lot with error recovery, including using fallback patterns defined using parsers to catch common cases, as well as giving pretty fine-grained control over errors. Thankfully it's not something you need to jump into at first, but there's there if you need it :) The result can be neat: recovered ASTs can go on to inform later passes, allowing your compiler to emit errors from many passes at once, like this: @jsbarretto Whoa, this looks and sounds so fancy! :awesome: Don't make me so curious!😜 @janriemer I'm aware of it, yes. chumsky doesn't try to do this sort of thing, it's strictly a top-down parser and everything is geared around that. I would say it's definitely intended more for compilers ingesting mostly-correct code rather than, say, an LSP operating on very broken fragments of code. That said, if used right, its error recovery can be surprisingly resilient. |
@janriemer Oh also, make sure you're using one of the 1.0 alpha releases. 1.0 is basically a whole new crate, with pretty radical improvements on the old API. There's a guide here: https://docs.rs/chumsky/1.0.0-alpha.6/chumsky/guide/