1 //===--- ParseAST.h - Define the ParseAST method ----------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines the clang::ParseAST method.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_PARSE_PARSEAST_H
15 #define LLVM_CLANG_PARSE_PARSEAST_H
17 #include "clang/Basic/LangOptions.h"
23 class CodeCompleteConsumer;
26 /// \brief Parse the entire file specified, notifying the ASTConsumer as
27 /// the file is parsed.
29 /// This operation inserts the parsed decls into the translation
32 /// \param PrintStats Whether to print LLVM statistics related to parsing.
33 /// \param TUKind The kind of translation unit being parsed.
34 /// \param CompletionConsumer If given, an object to consume code completion
36 /// \param SkipFunctionBodies Whether to skip parsing of function bodies.
37 /// This option can be used, for example, to speed up searches for
38 /// declarations/definitions when indexing.
39 void ParseAST(Preprocessor &pp, ASTConsumer *C,
40 ASTContext &Ctx, bool PrintStats = false,
41 TranslationUnitKind TUKind = TU_Complete,
42 CodeCompleteConsumer *CompletionConsumer = nullptr,
43 bool SkipFunctionBodies = false);
45 /// \brief Parse the main file known to the preprocessor, producing an
46 /// abstract syntax tree.
47 void ParseAST(Sema &S, bool PrintStats = false,
48 bool SkipFunctionBodies = false);
50 } // end namespace clang