Skip to main content

Module goto

Module goto 

Source

Structs§

CachedBuild
Pre-computed AST index. Built once when an AST enters the cache, then reused on every goto/references/rename/hover request.
CursorContext
Context extracted from the cursor position via tree-sitter.
NodeInfo
TsDeclaration
Information about a declaration found by tree-sitter.

Constants§

CHILD_KEYS
All AST child keys to traverse (Solidity + Yul).

Functions§

bytes_to_pos
cache_ids
cursor_context
Extract cursor context: the identifier under the cursor and its ancestor names.
find_declarations_by_name
Find all declarations of a name in a source file using tree-sitter.
goto_bytes
goto_declaration
goto_declaration_by_name
Name-based AST goto — resolves by searching cached AST nodes for identifiers matching name in the current file, then following referencedDeclaration.
goto_definition_ts
Tree-sitter enhanced goto definition.
pos_to_bytes
src_to_location
Convert a "offset:length:fileId" src string to an LSP Location.
validate_goto_target
Validate that the text at a goto target location matches the expected name.

Type Aliases§

ExternalRefs
Maps "offset:length:fileId" src strings from Yul externalReferences to the Solidity declaration node id they refer to.