Skip to main content

Module references

Module references 

Source

Functions§

all_references
byte_to_decl_via_external_refs
Check if cursor byte position falls on a Yul external reference in the given file. Returns the Solidity declaration id if so.
byte_to_id
goto_references
goto_references_for_target
Find all references to a definition in a single AST build, identified by the definition’s file path + byte offset (stable across builds). Uses byte_to_id to find this build’s node ID for the same definition, then scans for referenced_declaration matches.
goto_references_with_index
id_to_location
id_to_location_with_index
resolve_target_location
Resolve cursor position to the target definition’s location (abs_path + byte offset). Node IDs are not stable across builds, but byte offsets within a file are. Returns (abs_path, byte_offset) of the definition node, usable with byte_to_id in any other build that includes that file.