|
| 1 | +//===- ParserActions.h -------------------------------------------*- 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 | +// Coding style: https://mlir.llvm.org/getting_started/DeveloperGuide/ |
| 10 | +// |
| 11 | +//===----------------------------------------------------------------------===// |
| 12 | + |
| 13 | +#ifndef FORTRAN_PARSER_ACTIONS_H_ |
| 14 | +#define FORTRAN_PARSER_ACTIONS_H_ |
| 15 | + |
| 16 | +#include <string> |
| 17 | + |
| 18 | +namespace llvm { |
| 19 | +class raw_string_ostream; |
| 20 | +class raw_ostream; |
| 21 | +class StringRef; |
| 22 | +} // namespace llvm |
| 23 | + |
| 24 | +namespace Fortran::lower { |
| 25 | +class LoweringBridge; |
| 26 | +} // namespace Fortran::lower |
| 27 | + |
| 28 | +namespace Fortran::parser { |
| 29 | +class Parsing; |
| 30 | +class AllCookedSources; |
| 31 | +} // namespace Fortran::parser |
| 32 | + |
| 33 | +namespace lower::pft { |
| 34 | +class Program; |
| 35 | +} // namespace lower::pft |
| 36 | + |
| 37 | +//=== Frontend Parser helpers === |
| 38 | + |
| 39 | +namespace Fortran::frontend { |
| 40 | +class CompilerInstance; |
| 41 | + |
| 42 | +parser::AllCookedSources &getAllCooked(CompilerInstance &ci); |
| 43 | + |
| 44 | +void parseAndLowerTree(CompilerInstance &ci, lower::LoweringBridge &lb); |
| 45 | + |
| 46 | +void dumpTree(CompilerInstance &ci); |
| 47 | + |
| 48 | +void dumpProvenance(CompilerInstance &ci); |
| 49 | + |
| 50 | +void dumpPreFIRTree(CompilerInstance &ci); |
| 51 | + |
| 52 | +void formatOrDumpPrescanner(std::string &buf, |
| 53 | + llvm::raw_string_ostream &outForPP, |
| 54 | + CompilerInstance &ci); |
| 55 | + |
| 56 | +void debugMeasureParseTree(CompilerInstance &ci, llvm::StringRef filename); |
| 57 | + |
| 58 | +void debugUnparseNoSema(CompilerInstance &ci, llvm::raw_ostream &out); |
| 59 | + |
| 60 | +void debugUnparseWithSymbols(CompilerInstance &ci); |
| 61 | + |
| 62 | +void debugUnparseWithModules(CompilerInstance &ci); |
| 63 | + |
| 64 | +void debugDumpParsingLog(CompilerInstance &ci); |
| 65 | +} // namespace Fortran::frontend |
| 66 | + |
| 67 | +#endif // FORTRAN_PARSER_ACTIONS_H_ |
0 commit comments