MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / collect_from_block_statement

Function collect_from_block_statement

src/folding.rs:337–350  ·  view source on GitHub ↗

If the statement is a `Block`, emit it and recurse; otherwise just recurse.

(
    stmt: &Statement<'_>,
    content: &str,
    ranges: &mut Vec<FoldingRange>,
)

Source from the content-addressed store, hash-verified

335
336/// If the statement is a `Block`, emit it and recurse; otherwise just recurse.
337fn 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

Callers 2

collect_from_statementFunction · 0.85
collect_from_ifFunction · 0.85

Calls 3

emit_blockFunction · 0.85
iterMethod · 0.80
collect_from_statementFunction · 0.70

Tested by

no test coverage detected