//! > Test loops
//! > test_runner_name
test_partial_parser_tree(expect_diagnostics: false)
//! > cairo_code
fn f() {
let x = loop {
break 5;
};
}
//! > top_level_kind
StatementLet
//! > ignored_kinds
//! > expected_diagnostics
//! > expected_tree
└── Top level kind: StatementLet
├── attributes (kind: AttributeList) []
├── let_kw (kind: TokenLet): 'let'
├── pattern (kind: ExprPath)
│ ├── dollar (kind: OptionTerminalDollarEmpty) []
│ └── segments (kind: ExprPathInner)
│ └── item #0 (kind: PathSegmentSimple)
│ └── ident (kind: TokenIdentifier): 'x'
├── type_clause (kind: OptionTypeClauseEmpty) []
├── eq (kind: TokenEq): '='
├── rhs (kind: ExprLoop)
│ ├── loop_kw (kind: TokenLoop): 'loop'
│ └── body (kind: ExprBlock)
│ ├── lbrace (kind: TokenLBrace): '{'
│ ├── statements (kind: StatementList)
│ │ └── child #0 (kind: StatementBreak)
│ │ ├── attributes (kind: AttributeList) []
│ │ ├── break_kw (kind: TokenBreak): 'break'
│ │ ├── expr_clause (kind: ExprClause)
│ │ │ └── expr (kind: TokenLiteralNumber): '5'
│ │ └── semicolon (kind: TokenSemicolon): ';'
│ └── rbrace (kind: TokenRBrace): '}'
├── let_else_clause (kind: OptionLetElseClauseEmpty) []
└── semicolon (kind: TokenSemicolon): ';'