diff options
author | Itamar <itamar8910@gmail.com> | 2021-05-07 14:51:47 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-09 20:58:27 +0200 |
commit | c85775d9f5e2ed8f04082f9462bdae68469a6271 (patch) | |
tree | 8b7966a55ae3cbdab1ec52711819a71c5644fe7c /Userland/DevTools | |
parent | 5c42dc854d98e43e99fa6c4c910c2e819a200a15 (diff) | |
download | serenity-c85775d9f5e2ed8f04082f9462bdae68469a6271.zip |
CppLanguageServer: Call Parser::parse() inside create_document_data()
Diffstat (limited to 'Userland/DevTools')
-rw-r--r-- | Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp b/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp index 8b45ee90d7..2a8b598092 100644 --- a/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp +++ b/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp @@ -46,12 +46,6 @@ OwnPtr<ParserAutoComplete::DocumentData> ParserAutoComplete::create_document_dat return {}; auto content = document->text(); auto document_data = create_document_data(document->text(), file); - auto root = document_data->parser().parse(); - for (auto& path : document_data->preprocessor().included_paths()) { - get_or_create_document_data(document_path_from_include_path(path)); - } - if constexpr (CPP_LANGUAGE_SERVER_DEBUG) - root->dump(0); update_declared_symbols(*document_data); @@ -494,6 +488,12 @@ OwnPtr<ParserAutoComplete::DocumentData> ParserAutoComplete::create_document_dat } document_data->m_parser = make<Parser>(document_data->preprocessor().processed_text(), filename, move(all_definitions)); + + auto root = document_data->parser().parse(); + + if constexpr (CPP_LANGUAGE_SERVER_DEBUG) + root->dump(0); + return document_data; } |