Closed JSAbrahams closed 5 years ago
We often use macros in the parse stage , and pass the iterator, which is ugly. TPIterator is not much more than an alias at the moment
Instead, add two (or more perhaps) functions to TP:
eat
get_or_err!
get_or_err_direct!
Design wise this also makes more sense since the iterator is stateful.
Current issue
We often use macros in the parse stage , and pass the iterator, which is ugly. TPIterator is not much more than an alias at the moment
possible solution
Instead, add two (or more perhaps) functions to TP:
eat
to replace `check_next_is!'get_or_err!
andget_or_err_direct!
. This should take a function name (if possible) and error message as argument.Design wise this also makes more sense since the iterator is stateful.