Closed
Description
[Per discussion with @huonw on #rust
.]
I've written a function apply
like so:
type ParseState<'a> = Enumerate< Chars<'a> >;
struct ParseResult<'a> {
value: Option< uint >, // something more complicated in actual code
parse_state: ParseState<'a>
}
fn apply<'a>( &self, parse_state: ParseState<'a> ) -> Option< ParseResult<'a> >
The idea is to parse the input and also return an iterator that's correctly advanced. I'm writing a test for this and Iterators not implementing Eq is making this more difficult than it needs to be.
Metadata
Metadata
Assignees
Labels
No labels