1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:27:45 +00:00

LanguageServers/Cpp: Support jumping to declaration of preprocessor

.. definitions.
This commit is contained in:
Itamar 2021-03-13 10:37:23 +02:00 committed by Andreas Kling
parent 7bf6eca9d8
commit 8688259ed9
8 changed files with 43 additions and 10 deletions

View file

@ -56,6 +56,12 @@ public:
Vector<String> errors() const { return m_errors; }
const Preprocessor::Definitions& definitions() const { return m_definitions; }
struct TokenAndPreprocessorDefinition {
Token token;
Preprocessor::DefinedValue preprocessor_value;
};
const Vector<TokenAndPreprocessorDefinition>& replaced_preprocessor_tokens() const { return m_replaced_preprocessor_tokens; }
private:
enum class DeclarationType {
Function,
@ -171,6 +177,8 @@ private:
RefPtr<TranslationUnit> m_root_node;
NonnullRefPtrVector<ASTNode> m_nodes;
Vector<String> m_errors;
Vector<TokenAndPreprocessorDefinition> m_replaced_preprocessor_tokens;
};
}