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

Function push_block

src/selection_range.rs:135–140  ·  view source on GitHub ↗

Push a block's span if it contains the cursor, and recurse into its statements.

(block: &Block<'_>, offset: u32, spans: &mut Vec<(u32, u32)>)

Source from the content-addressed store, hash-verified

133
134/// Push a block's span if it contains the cursor, and recurse into its statements.
135fn push_block(block: &Block<'_>, offset: u32, spans: &mut Vec<(u32, u32)>) {
136 push_brace_pair(block.left_brace, block.right_brace, offset, spans);
137 for stmt in block.statements.iter() {
138 collect_spans_from_statement(stmt, offset, spans);
139 }
140}
141
142// ─── Statement walker ───────────────────────────────────────────────────────
143

Calls 3

push_brace_pairFunction · 0.85
iterMethod · 0.80

Tested by

no test coverage detected