Expand description
Goto-definition (ADR-0091 Phase 4).
Given a cursor position, find the identifier under it and walk the AST to locate the defining occurrence (function, struct, enum, const, field, variant, method). Phase 4 covers definitions visible in the merged AST: type names referenced in type-position resolve to their struct/enum/interface/derive declaration; identifiers in expression position resolve when they name a top-level function, constant, or local binding within the enclosing function.
Field accesses across @import boundaries and cross-file imports are
deferred to later phases (they need sema-level symbol resolution).
Functionsยง
- definition_
at - Find the defining span for the identifier under the cursor, if any.