mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:37:36 +00:00
CppLanguageServer: Rename all_definitions=>preprocessor_definitions
This commit is contained in:
parent
1f96d9b03a
commit
1c3c043cd3
1 changed files with 4 additions and 4 deletions
|
@ -542,19 +542,19 @@ OwnPtr<CppComprehensionEngine::DocumentData> CppComprehensionEngine::create_docu
|
||||||
document_data->preprocessor().set_ignore_unsupported_keywords(true);
|
document_data->preprocessor().set_ignore_unsupported_keywords(true);
|
||||||
document_data->preprocessor().process();
|
document_data->preprocessor().process();
|
||||||
|
|
||||||
Preprocessor::Definitions all_definitions;
|
Preprocessor::Definitions preprocessor_definitions;
|
||||||
for (auto item : document_data->preprocessor().definitions())
|
for (auto item : document_data->preprocessor().definitions())
|
||||||
all_definitions.set(move(item.key), move(item.value));
|
preprocessor_definitions.set(move(item.key), move(item.value));
|
||||||
|
|
||||||
for (auto include : document_data->preprocessor().included_paths()) {
|
for (auto include : document_data->preprocessor().included_paths()) {
|
||||||
auto included_document = get_or_create_document_data(document_path_from_include_path(include));
|
auto included_document = get_or_create_document_data(document_path_from_include_path(include));
|
||||||
if (!included_document)
|
if (!included_document)
|
||||||
continue;
|
continue;
|
||||||
for (auto item : included_document->parser().preprocessor_definitions())
|
for (auto item : included_document->parser().preprocessor_definitions())
|
||||||
all_definitions.set(move(item.key), move(item.value));
|
preprocessor_definitions.set(move(item.key), move(item.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
document_data->m_parser = make<Parser>(document_data->preprocessor().processed_text(), filename, move(all_definitions));
|
document_data->m_parser = make<Parser>(document_data->preprocessor().processed_text(), filename, move(preprocessor_definitions));
|
||||||
|
|
||||||
auto root = document_data->parser().parse();
|
auto root = document_data->parser().parse();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue