Report class and base facts from the stock observer

For each call whose result is a class type, the observer records the
class name span and its direct bases (bounded, deduplicated by uid).
The corpus verifier validates the new types array, and the occurrence
decoder binds each reference to its captured snapshot through the
negotiated encoding, rejecting uncaptured or malformed entries. A
registered decoder case covers the new field. LSP type-hierarchy
handlers remain open.
This commit is contained in:
faumaray committed 2026-12-05 22:56:00 +03:00
1 parent 3344a9f170
commit b1c8a4a625
6 files changed
+240 -4

No files matched your search

+10
View File
@@ -26,8 +26,18 @@ struct Occurrence {
[[nodiscard]] bool has_definition() const noexcept { return definition_file != nullptr; }
};
struct TypeRef {
std::string name, path;
Documents::Range range;
};
// A class observed as a call's result type and its direct bases.
struct ReflectedType {
TypeRef self;
std::vector<TypeRef> bases;
};
struct OccurrenceReport {
std::vector<Occurrence> occurrences;
std::vector<ReflectedType> types;
bool complete{};
bool partial{};
std::string reason;