mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03:00
CppLanguageServer: Call Parser::parse() inside create_document_data()
This commit is contained in:
parent
5c42dc854d
commit
c85775d9f5
Notes:
sideshowbarker
2024-07-18 18:24:59 +09:00
Author: https://github.com/itamar8910 Commit: https://github.com/SerenityOS/serenity/commit/c85775d9f5e Pull-request: https://github.com/SerenityOS/serenity/pull/6916 Reviewed-by: https://github.com/awesomekling
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user