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

Function collect_spans_from_parameter

src/selection_range.rs:491–503  ·  view source on GitHub ↗
(
    param: &function_like::parameter::FunctionLikeParameter<'_>,
    offset: u32,
    spans: &mut Vec<(u32, u32)>,
)

Source from the content-addressed store, hash-verified

489// ─── Parameter walker ───────────────────────────────────────────────────────
490
491fn collect_spans_from_parameter(
492 param: &function_like::parameter::FunctionLikeParameter<'_>,
493 offset: u32,
494 spans: &mut Vec<(u32, u32)>,
495) {
496 let param_span = param.span();
497 if push_if_contains(param_span, offset, spans) {
498 let _ = push_if_contains(param.variable.span(), offset, spans);
499 if let Some(ref default) = param.default_value {
500 collect_spans_from_expression(default.value, offset, spans);
501 }
502 }
503}
504
505// ─── If walker ──────────────────────────────────────────────────────────────
506

Calls 2

push_if_containsFunction · 0.85

Tested by

no test coverage detected