Improve recovery on malformed format call
If a comma in a format call is replaced with a similar token, then we emit an error and continue parsing, instead of stopping at this point.
This commit is contained in:
@@ -1233,6 +1233,10 @@ impl<'a> Parser<'a> {
|
||||
*t == token::OpenDelim(token::Brace) || *t == token::BinOp(token::Star)
|
||||
})
|
||||
}
|
||||
|
||||
pub fn clear_expected_tokens(&mut self) {
|
||||
self.expected_tokens.clear();
|
||||
}
|
||||
}
|
||||
|
||||
crate fn make_unclosed_delims_error(
|
||||
|
||||
Reference in New Issue
Block a user