Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
14 | pmbaty | 1 | //===--- ParseAST.h - Define the ParseAST method ----------------*- C++ -*-===// |
2 | // |
||
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
||
4 | // See https://llvm.org/LICENSE.txt for license information. |
||
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
||
6 | // |
||
7 | //===----------------------------------------------------------------------===// |
||
8 | // |
||
9 | // This file defines the clang::ParseAST method. |
||
10 | // |
||
11 | //===----------------------------------------------------------------------===// |
||
12 | |||
13 | #ifndef LLVM_CLANG_PARSE_PARSEAST_H |
||
14 | #define LLVM_CLANG_PARSE_PARSEAST_H |
||
15 | |||
16 | #include "clang/Basic/LangOptions.h" |
||
17 | |||
18 | namespace clang { |
||
19 | class Preprocessor; |
||
20 | class ASTConsumer; |
||
21 | class ASTContext; |
||
22 | class CodeCompleteConsumer; |
||
23 | class Sema; |
||
24 | |||
25 | /// Parse the entire file specified, notifying the ASTConsumer as |
||
26 | /// the file is parsed. |
||
27 | /// |
||
28 | /// This operation inserts the parsed decls into the translation |
||
29 | /// unit held by Ctx. |
||
30 | /// |
||
31 | /// \param PrintStats Whether to print LLVM statistics related to parsing. |
||
32 | /// \param TUKind The kind of translation unit being parsed. |
||
33 | /// \param CompletionConsumer If given, an object to consume code completion |
||
34 | /// results. |
||
35 | /// \param SkipFunctionBodies Whether to skip parsing of function bodies. |
||
36 | /// This option can be used, for example, to speed up searches for |
||
37 | /// declarations/definitions when indexing. |
||
38 | void ParseAST(Preprocessor &pp, ASTConsumer *C, |
||
39 | ASTContext &Ctx, bool PrintStats = false, |
||
40 | TranslationUnitKind TUKind = TU_Complete, |
||
41 | CodeCompleteConsumer *CompletionConsumer = nullptr, |
||
42 | bool SkipFunctionBodies = false); |
||
43 | |||
44 | /// Parse the main file known to the preprocessor, producing an |
||
45 | /// abstract syntax tree. |
||
46 | void ParseAST(Sema &S, bool PrintStats = false, |
||
47 | bool SkipFunctionBodies = false); |
||
48 | |||
49 | } // end namespace clang |
||
50 | |||
51 | #endif |