Closed JoshMcguigan closed 5 years ago
Thanks, this is a very good example. I find no better alternative to flatten tuples.
Thanks for the merge.
On the topic of flattening the tuples, this combine example demonstrates what I think is a nice approach to combining parsers which avoids the need to flatten tuples all together. It also handles the +
, -
, and *
use cases without having to remember which one is which.
If you have any interest / could provide guidance on bringing something like this to pom, I'd be happy to work on it.
Inspired by this comparison of Nom, Combine, and Pest, I wrote an example parser for the ISO 8601 duration format using
pom
.I'd welcome any feedback you have to improve this parser. In particular, I don't like the map statement required to flatten the tuples after chaining multiple parsers with
+
in thedate_part
andtime_part
functions.Generally, I really enjoy working with
pom
. Thanks for your work on it!