chumsky icon indicating copy to clipboard operation
chumsky copied to clipboard

Implement Parser for ! (never)

Open zesterer opened this issue 1 year ago • 2 comments

This will allow the use of todo!() in places that expect a parser.

zesterer avatar Aug 10 '22 00:08 zesterer

I don't see how this would replace your existing parser? todo!() panics as soon as it's being called, i.e. when constructing the parser, while your todo parser (if I understood it correctly) only panics when it's used to parse something, not when it's being constructed.

msrd0 avatar Aug 13 '22 14:08 msrd0

This is true, it wouldn't be a substitute. It would be nice to have it just compile though. Thanks for pointing this out!

zesterer avatar Aug 13 '22 17:08 zesterer

Hi! I really enjoyed using chumsky. I found the documentation really helpful, especially the tutorial on creating a little programming language. Thus, I'd like to contribute to this project. May I take this issue on? Is it still relevant?

I've read that the zero-copy branch resulted in a rewrite of most of the core functionality. Might it be more sensible to postpone further contributions until the zero-copy branch is merged with the release of Rust 1.65?

dvdvgt avatar Sep 30 '22 10:09 dvdvgt

Yes, this would be a good thing to implement in zero-copy rather than master. One problem is that in zero-copy, the output type is an associated type which might preclude implementing this.

zesterer avatar Sep 30 '22 11:09 zesterer