Expand description
Grammar-agnostic analysis helpers for sipha syntax trees.
Provides scope extents (offset → scope) and definition collection for LSP (go-to-def, references, document symbols). Grammar-specific logic is passed via callbacks.
Functions§
- build_
scope_ extents - Build list of (scope_id, extent) where extent is (start_byte, end_byte).
- collect_
definitions - Collect (name, kind) -> (path, start_byte, end_byte) from multiple roots.
- scope_
at_ offset - Find the innermost scope containing the given byte offset.