[parser] Flatten the matches
This commit is contained in:
parent
2f9c16ff38
commit
d9abd033e7
1 changed files with 5 additions and 8 deletions
|
@ -44,15 +44,12 @@ impl<T> Iterator for Parser<T> where T: Iterator<Item=LexerResult> {
|
|||
type Item = Result;
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
let mut lex = self.input.next();
|
||||
let mut result: Option<NodeParseResult> = None;
|
||||
loop {
|
||||
match lex {
|
||||
Some(ref lex) => {
|
||||
match lex {
|
||||
Ok(ref lex) => {
|
||||
}
|
||||
Err(error) => {}
|
||||
}
|
||||
match self.input.next() {
|
||||
Some(Ok(ref lex)) => {
|
||||
},
|
||||
Some(Err(ref error)) => {
|
||||
},
|
||||
None => break
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue