3 ms·
> How are you supposed to read code like this example with all these parentheses. Once you get to the end, the examples are quite readable. The initial impleme
by intertextuality 7y ago
> How are you supposed to read code like this example with all these parentheses.
Once you get to the end, the examples are quite readable. The initial implementation was left in to demonstrate an iterative approach.
If you look Pom, which is an actual crate that uses these sort of parser combinators, the code is quite readable also.
[0]: https://github.com/J-F-Liu/pom/blob/master/src/parser.rs https://github.com/J-F-Liu/pom/blob/master/src/parser.rs
[1]: https://github.com/J-F-Liu/pom/blob/master/examples/json.rs https://github.com/J-F-Liu/pom/blob/master/examples/json.rs