correctly infer labelled breaks

This commit is contained in:
robojumper 2020-05-31 10:59:40 +02:00
parent fb469c3b31
commit 1cd78a3355
9 changed files with 117 additions and 46 deletions

View file

@ -1081,6 +1081,7 @@ pub struct BlockExpr {
impl ast::AttrsOwner for BlockExpr {}
impl ast::ModuleItemOwner for BlockExpr {}
impl BlockExpr {
pub fn label(&self) -> Option<Label> { support::child(&self.syntax) }
pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) }
pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }