llvm/flang/lib/parser/unparse.h
Tim Keith 2af29bc1e2 [flang] Add Unparse function.
Unparse takes a parse tree and converts it back to Fortran.
class UnparseVisitor implements a parse tree visitor that emits
the appropriate Fortran source for each node that it visits.
It is only partially implemented so far.

Change f18 to dump the parse tree using Unparse.

Original-commit: flang-compiler/f18@e80c13ec88
Reviewed-on: https://github.com/flang-compiler/f18/pull/15
2018-02-26 14:52:27 -08:00

17 lines
303 B
C++

#ifndef FORTRAN_PARSER_UNPARSE_H_
#define FORTRAN_PARSER_UNPARSE_H_
#include <iosfwd>
namespace Fortran {
namespace parser {
class Program;
/// Convert parsed program to out as Fortran.
void Unparse(std::ostream &out, const Program &program);
} // namespace parser
} // namespace Fortran
#endif