1
Fork 0

Account for maybe_whole_expr in range patterns.

This commit is contained in:
Mazdak Farrokhzad 2019-07-30 04:22:09 +02:00
parent 04b88a9eba
commit f3a3290ba3
5 changed files with 140 additions and 1 deletions

View file

@ -3741,6 +3741,7 @@ impl<'a> Parser<'a> {
self.token.is_path_start() // e.g. `MY_CONST`;
|| self.token == token::Dot // e.g. `.5` for recovery;
|| self.token.can_begin_literal_or_bool() // e.g. `42`.
|| self.token.is_whole_expr()
}
// Helper function to decide whether to parse as ident binding