11 comments
@janriemer I think the funniest thing I saw about this was a response by compiler_errors on a Rust issue by someone complaining about long type signatures in diagnostics with "oh, would have been nice to have known it was chumsky, lol". I'm excited to use chumsky in the future (no sarcasm - I really mean this)! 🙂 See here: Fingers crossed! 🤞 @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 :) @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/ @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. |
@jsbarretto You are just doing so much type trickery that even Rust can't keep up! 😉