reqlanOverviewIdeasFilesCode filesClustersAttributesGraphPrint

Printable idea sheet

reference_resolution_order

reqlan rq/language/syntax.rq:125

Katz 0.053

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.

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

Interactive page: reference_resolution_order