-
|
I know in theory it's just fine to lex all tokens into a The cool part of this approach is that my |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
There have been a few proposals (such as #399) for turning an The reason it's not progressed so far is that it's not entirely clear how to properly represent errors. Having the iterator produce items of type I'd be interested in your thoughts on this! |
Beta Was this translation helpful? Give feedback.
There have been a few proposals (such as #399) for turning an
impl IterParserinto animpl Iterator. In fact, an experiment implementation exists within the source code and a function to invoke it.The reason it's not progressed so far is that it's not entirely clear how to properly represent errors. Having the iterator produce items of type
Result<T, E>feels too ungainly to be useful, but representing errors 'out-of-band' means that they're highly likely to be accidentally forgotten about, resulting in unintentional behaviour.I'd be interested in your thoughts on this!