diff --git a/parser/src/parser.rs b/parser/src/parser.rs
index 8d1f1e442..124058fc9 100644
--- a/parser/src/parser.rs
+++ b/parser/src/parser.rs
@@ -31,7 +31,7 @@ macro_rules! peek_expect {
expected: &[
$($x,)*
],
- got: token.token_type.unwrap(),
+ got: tt,
})
}
}
@@ -223,10 +223,11 @@ impl<'a> Parser<'a> {
}
Some(token) => {
if !found_semi {
+ let tt = token.token_type.unwrap();
return Err(Error::ParseUnexpectedToken {
parsed_offset: (self.offset(), 1).into(),
expected: &[TK_SEMI],
- got: token.token_type.unwrap(),
+ got: tt,
});
}
@@ -253,7 +254,7 @@ impl<'a> Parser<'a> {
}
}
- fn next_token(&mut self) -> Result