some update.

This commit is contained in:
ykiko
2024-08-09 13:43:54 +08:00
parent ac1a6b47a1
commit 75cb74ca78
12 changed files with 680 additions and 153 deletions

View File

@@ -9,7 +9,6 @@ namespace clice {
class ParsedAST {
private:
using Decl = clang::Decl*;
using TokenBuffer = clang::syntax::TokenBuffer;
using ASTConsumer = std::unique_ptr<clang::ASTConsumer>;
struct FrontendAction : public clang::ASTFrontendAction {
@@ -43,10 +42,12 @@ public:
auto& ASTContext() { return instance.getASTContext(); }
auto& TokensBuffer() { return buffer; }
auto& Preprocessor() { return instance.getPreprocessor(); }
auto& SourceManager() { return instance.getSourceManager(); }
auto& TokenBuffer() { return buffer; }
auto& TranslationUnit() { return *instance.getASTContext().getTranslationUnitDecl(); }
};