* removed trial target * updated deploy scripts to exclude trial * cleanup CMakeLists * removed Eigen dependencies * split parser lib into lib_cxx and lib_java * added ProjectFactory and ProjectFactoryModules * removed old installer projects * updated wix installer * updated readme for wix setup * updated to use obfuscated exe * added qt.conf * added indexing dialog images * added jars * added coatidb files of sample projects * added source code of javaparser sample * removed auto-refresh image * intermediate files of windows installer are created in build folder * preselected desktop shortcut * build bat is executed from deploy_windows script
32 lines
1009 B
C++
32 lines
1009 B
C++
#include "data/parser/cxx/ASTAction.h"
|
|
|
|
#include "clang/Lex/Preprocessor.h"
|
|
|
|
#include "data/parser/cxx/CommentHandler.h"
|
|
#include "data/parser/cxx/PreprocessorCallbacks.h"
|
|
|
|
ASTAction::ASTAction(ParserClient* client, FileRegister* fileRegister)
|
|
: m_client(client)
|
|
, m_fileRegister(fileRegister)
|
|
, m_commentHandler(client, fileRegister)
|
|
{
|
|
}
|
|
|
|
ASTAction::~ASTAction()
|
|
{
|
|
}
|
|
|
|
std::unique_ptr<clang::ASTConsumer> ASTAction::CreateASTConsumer(clang::CompilerInstance& compiler, llvm::StringRef inFile)
|
|
{
|
|
return std::unique_ptr<clang::ASTConsumer>(new ASTConsumer(&compiler.getASTContext(), &compiler.getPreprocessor(), m_client, m_fileRegister));
|
|
}
|
|
|
|
bool ASTAction::BeginSourceFileAction(clang::CompilerInstance& compiler, llvm::StringRef filePath)
|
|
{
|
|
clang::Preprocessor& preprocessor = compiler.getPreprocessor();
|
|
preprocessor.addPPCallbacks(
|
|
llvm::make_unique<PreprocessorCallbacks>(compiler.getSourceManager(), m_client, m_fileRegister));
|
|
preprocessor.addCommentHandler(&m_commentHandler);
|
|
return true;
|
|
}
|