If the statement is a `Block`, emit it and recurse; otherwise just recurse.
(
stmt: &Statement<'_>,
content: &str,
ranges: &mut Vec<FoldingRange>,
)
| 335 | |
| 336 | /// If the statement is a `Block`, emit it and recurse; otherwise just recurse. |
| 337 | fn collect_from_block_statement( |
| 338 | stmt: &Statement<'_>, |
| 339 | content: &str, |
| 340 | ranges: &mut Vec<FoldingRange>, |
| 341 | ) { |
| 342 | if let Statement::Block(block) = stmt { |
| 343 | emit_block(block, content, ranges); |
| 344 | for inner in block.statements.iter() { |
| 345 | collect_from_statement(inner, content, ranges); |
| 346 | } |
| 347 | } else { |
| 348 | collect_from_statement(stmt, content, ranges); |
| 349 | } |
| 350 | } |
| 351 | |
| 352 | // ─── If statement ─────────────────────────────────────────────────────────── |
| 353 |
no test coverage detected