mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 07:35:08 +00:00
Add role to lsLocationEx
This commit is contained in:
parent
1469723c3c
commit
8a427dfa9e
@ -169,8 +169,10 @@ MAKE_REFLECT_STRUCT(lsLocation, uri, range);
|
||||
// cquery extension
|
||||
struct lsLocationEx : lsLocation {
|
||||
optional<std::string_view> containerName;
|
||||
// Avoid circular dependency on symbol.h
|
||||
optional<uint16_t> role;
|
||||
};
|
||||
MAKE_REFLECT_STRUCT(lsLocationEx, uri, range, containerName);
|
||||
MAKE_REFLECT_STRUCT(lsLocationEx, uri, range, containerName, role);
|
||||
|
||||
template <typename T>
|
||||
struct lsCommand {
|
||||
|
@ -275,6 +275,7 @@ optional<lsLocationEx> GetLsLocationEx(QueryDatabase* db,
|
||||
lsLocationEx ret;
|
||||
ret.lsLocation::operator=(*ls_loc);
|
||||
if (container) {
|
||||
ret.role = uint16_t(use.role);
|
||||
EachEntityDef(db, use, [&](const auto& def) {
|
||||
ret.containerName = std::string_view(def.detailed_name);
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user