mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LanguageServers: Tweak FileDB API
- FileDB::get() now returns nullptr if the file is not in the FileDB - Added FileDB::get_or_create_from_filesystem() - Added FileDB::add() version that receives that file's content as a parameter
This commit is contained in:
parent
684cc5f027
commit
6f7ef4ec65
Notes:
sideshowbarker
2024-07-18 21:41:13 +09:00
Author: https://github.com/itamar8910
Commit: 6f7ef4ec65
Pull-request: https://github.com/SerenityOS/serenity/pull/5654
Issue: https://github.com/SerenityOS/serenity/issues/5569
Issue: https://github.com/SerenityOS/serenity/issues/5574
Issue: https://github.com/SerenityOS/serenity/issues/5634
3 changed files with 55 additions and 14 deletions
|
@ -60,7 +60,7 @@ const ParserAutoComplete::DocumentData* ParserAutoComplete::get_document_data(co
|
|||
|
||||
OwnPtr<ParserAutoComplete::DocumentData> ParserAutoComplete::create_document_data_for(const String& file)
|
||||
{
|
||||
auto document = filedb().get(file);
|
||||
auto document = filedb().get_or_create_from_filesystem(file);
|
||||
if (!document)
|
||||
return {};
|
||||
auto content = document->text();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue