clang API Documentation
00001 //===--- ParseAST.h - Define the ParseAST method ----------------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file defines the clang::ParseAST method. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef LLVM_CLANG_PARSE_PARSEAST_H 00015 #define LLVM_CLANG_PARSE_PARSEAST_H 00016 00017 #include "clang/Basic/LangOptions.h" 00018 00019 namespace clang { 00020 class Preprocessor; 00021 class ASTConsumer; 00022 class ASTContext; 00023 class CodeCompleteConsumer; 00024 class Sema; 00025 00026 /// \brief Parse the entire file specified, notifying the ASTConsumer as 00027 /// the file is parsed. 00028 /// 00029 /// This operation inserts the parsed decls into the translation 00030 /// unit held by Ctx. 00031 /// 00032 /// \param TUKind The kind of translation unit being parsed. 00033 /// 00034 /// \param CompletionConsumer If given, an object to consume code completion 00035 /// results. 00036 void ParseAST(Preprocessor &pp, ASTConsumer *C, 00037 ASTContext &Ctx, bool PrintStats = false, 00038 TranslationUnitKind TUKind = TU_Complete, 00039 CodeCompleteConsumer *CompletionConsumer = nullptr, 00040 bool SkipFunctionBodies = false); 00041 00042 /// \brief Parse the main file known to the preprocessor, producing an 00043 /// abstract syntax tree. 00044 void ParseAST(Sema &S, bool PrintStats = false, 00045 bool SkipFunctionBodies = false); 00046 00047 } // end namespace clang 00048 00049 #endif