1
Fork 0

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:
Sasha 2020-08-31 11:45:50 +02:00
parent 8ed5cb56b5
commit 3524c3ef43
13 changed files with 88 additions and 53 deletions

View file

@ -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(