1 //===--- ParseAST.h - Define the ParseAST method ----------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // This file defines the clang::ParseAST method. 11 // 12 //===----------------------------------------------------------------------===// 13 14 #ifndef LLVM_CLANG_PARSE_PARSEAST_H 15 #define LLVM_CLANG_PARSE_PARSEAST_H 16 17 namespace clang { 18 class Preprocessor; 19 class ASTConsumer; 20 class ASTContext; 21 class CodeCompleteConsumer; 22 class Sema; 23 24 /// \brief Parse the entire file specified, notifying the ASTConsumer as 25 /// the file is parsed. 26 /// 27 /// This operation inserts the parsed decls into the translation 28 /// unit held by Ctx. 29 /// 30 /// \param CompleteTranslationUnit When true, the parsed file is 31 /// considered to be a complete translation unit, and any 32 /// end-of-translation-unit wrapup will be performed. 33 /// 34 /// \param CompletionConsumer If given, an object to consume code completion 35 /// results. 36 void ParseAST(Preprocessor &pp, ASTConsumer *C, 37 ASTContext &Ctx, bool PrintStats = false, 38 bool CompleteTranslationUnit = true, 39 CodeCompleteConsumer *CompletionConsumer = 0); 40 41 /// \brief Parse the main file known to the preprocessor, producing an 42 /// abstract syntax tree. 43 void ParseAST(Sema &S, bool PrintStats = false); 44 45 } // end namespace clang 46 47 #endif 48