Skip to main content

scope_at_offset

Function scope_at_offset 

Source
pub fn scope_at_offset(
    extents: &[(ScopeId, (u32, u32))],
    offset: u32,
) -> ScopeId
Expand description

Find the innermost scope containing the given byte offset. When extents is empty (e.g. partial state), returns root scope ID so the LSP never panics.