Parse inline const expressions

This commit is contained in:
Santiago Pastorino 2020-09-21 17:55:58 -03:00
parent 3c4ad55082
commit c3e8d7965c
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
10 changed files with 60 additions and 3 deletions

View file

@ -1060,6 +1060,8 @@ impl<'a> Parser<'a> {
})
} else if self.eat_keyword(kw::Unsafe) {
self.parse_block_expr(None, lo, BlockCheckMode::Unsafe(ast::UserProvided), attrs)
} else if self.check_inline_const() {
self.parse_const_expr(lo.to(self.token.span))
} else if self.is_do_catch_block() {
self.recover_do_catch(attrs)
} else if self.is_try_block() {