Replies: 3 comments 3 replies
-
Hey, thanks for the feedback! I'm glad to hear you're enjoying using the crate.
Yup, it should be in a decent state now (enough to learn from, anyway).
This is a good idea, I should be more explicit about this in documentation.
As you mention, it's difficult to coerce the compiler into generating sensible errors. One thing I'm planning to do is to also add constraints to the methods on the In general, the thing to do is to look only at the very first error message: this is the one that's the most likely to be correct. |
Beta Was this translation helpful? Give feedback.
-
I continue here, not sure where I'd write this otherwise, there's no Matrix room or open communication channel, does it? In the tutorial, at https://github.com/zesterer/chumsky/blob/master/tutorial.md#cleaning-up-and-taking-shortcuts let int = text::int(10)
.map(|s: String| Expr::Num(s.parse().unwrap()))
.padded(); I've wondered, why you put the The doc of |
Beta Was this translation helpful? Give feedback.
-
Regarding output types: I've just updated the crate docs with more examples and the output type of every parser.
Many of the parsers in the I've improved the docs for |
Beta Was this translation helpful? Give feedback.
-
Hey @zesterer, I just started using chumsky yesterday for the adventofcode challenges (while learning Rust 😃 ), and I loooove it, it's really a joy to use once you grok it ❤️ ❤️ ❤️
I've seen that you're actively writing a tutorial @ https://github.com/zesterer/chumsky/blob/master/tutorial.md
You might be interested in this:
My main pain point when starting to use the lib was to understand what the output of a parser was.
For example at the beginning I tried to chain
separated_by
with arepeated
which does not make sense for me, I didn't understand thatseparated_by
's output was already a collection like a Vec..I think it would help to explicitly mention what the output is whenever you write/document a parser.
👉 in the tutorial
👉 and maybe also in the documentation of each builtin parsers?
Another pain point are the errors that are near-impossible to read, like:
But I don't think you can do anything about this... (note: I've found my issue for that one)
Unless there's a way to write a kind of compiler plugin that could help decipher these looong types / make them prettier / easier to read ?
Beta Was this translation helpful? Give feedback.
All reactions