1156321Sdamien//===--- ParseAST.h - Define the ParseAST method ----------------*- C++ -*-===//
2156321Sdamien//
3156321Sdamien//                     The LLVM Compiler Infrastructure
4156321Sdamien//
5156321Sdamien// This file is distributed under the University of Illinois Open Source
6156321Sdamien// License. See LICENSE.TXT for details.
7156321Sdamien//
8156321Sdamien//===----------------------------------------------------------------------===//
9156321Sdamien//
10156321Sdamien//  This file defines the clang::ParseAST method.
11156321Sdamien//
12156321Sdamien//===----------------------------------------------------------------------===//
13156321Sdamien
14156321Sdamien#ifndef LLVM_CLANG_PARSE_PARSEAST_H
15156321Sdamien#define LLVM_CLANG_PARSE_PARSEAST_H
16156321Sdamien
17156321Sdamien#include "clang/Basic/LangOptions.h"
18156321Sdamien
19156321Sdamiennamespace clang {
20156321Sdamien  class Preprocessor;
21156321Sdamien  class ASTConsumer;
22156321Sdamien  class ASTContext;
23156321Sdamien  class CodeCompleteConsumer;
24156321Sdamien  class Sema;
25156321Sdamien
26156321Sdamien  /// \brief Parse the entire file specified, notifying the ASTConsumer as
27156321Sdamien  /// the file is parsed.
28156321Sdamien  ///
29156321Sdamien  /// This operation inserts the parsed decls into the translation
30156321Sdamien  /// unit held by Ctx.
31156321Sdamien  ///
32156321Sdamien  /// \param TUKind The kind of translation unit being parsed.
33156321Sdamien  ///
34156321Sdamien  /// \param CompletionConsumer If given, an object to consume code completion
35156321Sdamien  /// results.
36156321Sdamien  void ParseAST(Preprocessor &pp, ASTConsumer *C,
37156321Sdamien                ASTContext &Ctx, bool PrintStats = false,
38156321Sdamien                TranslationUnitKind TUKind = TU_Complete,
39156321Sdamien                CodeCompleteConsumer *CompletionConsumer = 0,
40156321Sdamien                bool SkipFunctionBodies = false);
41156321Sdamien
42156321Sdamien  /// \brief Parse the main file known to the preprocessor, producing an
43156321Sdamien  /// abstract syntax tree.
44156321Sdamien  void ParseAST(Sema &S, bool PrintStats = false,
45156321Sdamien                bool SkipFunctionBodies = false);
46156321Sdamien
47156321Sdamien}  // end namespace clang
48156321Sdamien
49156321Sdamien#endif
50156321Sdamien