Serve references from reflection provenance chains

reflection::references_at joins the selected entity's links with every
origin elsewhere naming the same entity, deduplicated and bounded,
with a registered test. The server serves textDocument/references over
a recorded reflection snapshot and advertises referencesProvider when
one is loaded. A real stdio session returned the splice and the
reflected declaration ranges.
This commit is contained in:
faumaray committed 2026-12-06 03:13:51 +03:00
1 parent 5f41870a75
commit 98ddf08eaf
6 files changed
+122 -3

No files matched your search

+5
View File
@@ -255,4 +255,9 @@ struct Position {
// reflected-declaration link, else the first source link of its chain.
[[nodiscard]] std::optional<Range> definition_at(const Snapshot &, std::string_view path, Position,
const Limits & = Limits{});
// Every source link of the entity covering POSITION (its own chain plus any
// origin elsewhere that names the same entity), deduplicated and bounded.
[[nodiscard]] std::vector<Range> references_at(const Snapshot &, std::string_view path, Position,
std::size_t limit = 256);
} // namespace vls::reflection