Idea detail
reference_resolution_order
reqlan rq/language/syntax.rq:125
block
done
Summary
For each `.rq` file, identify the names in local scope, then resolve references.
Sequence:
1. Collect all idea, one-liner, and ideaset declarations in the file. Declaration order does not change which names are in scope.
2. Collect reference candidates in the file.
3. Resolve each candidate against those local declarations.
4. Resolve imports only for candidates that have no local match. Stop import lookup for a candidate when a local match exists.
The language server and the indexer must use this sequence.
Open-file editor underlines follow open_file_reference_sequencing.
Related: same_file_reference, ideaset, import_tokenisation,
local_symbolic_analysis.
Navigation
Attributes
| Key | Value |
|---|---|
| implementation | reqlan-scope.ts, reqlan.langium, extract.rs |
| status | done |
| tests | linking.test.ts:resolve forward reference to later idea in the same file, linking.test.ts:resolve forward reference to later ideaset in the same file, linking.test.ts:resolve local ideaset before imports, extract_parity.rs:same_file_forward_ideaset_reference_is_resolved |
Ancestor context
No ancestor chain recorded.
Outbound references
Inbound references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | same_file_reference | reqlan rq/language/syntax.rq | reference_resolution_order |
Unresolved references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| None | |||
Local graph
Initialising graph…