1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 12:17:35 +00:00

HackStudio+LanguageServers/Cpp: Show scope of symbols in Locator

This commit is contained in:
Itamar 2021-03-23 12:32:45 +02:00 committed by Andreas Kling
parent 6054a418e5
commit 84e34d76d8
10 changed files with 52 additions and 13 deletions

View file

@ -98,6 +98,7 @@ inline bool encode(Encoder& encoder, const GUI::AutocompleteProvider::Declaratio
if (!encode(encoder, declaration.position))
return false;
encoder << (u32)declaration.type;
encoder << declaration.scope;
return true;
}
@ -109,10 +110,14 @@ inline bool decode(Decoder& decoder, GUI::AutocompleteProvider::Declaration& dec
if (!decode(decoder, declaration.position))
return false;
u32 type;
if (!decoder.decode(type))
return false;
if (!decoder.decode(declaration.scope))
return false;
declaration.type = static_cast<GUI::AutocompleteProvider::DeclarationType>(type);
return true;
}