[flang] Add Unparse function.
authorTim Keith <tkeith@nvidia.com>
Mon, 26 Feb 2018 22:28:32 +0000 (14:28 -0800)
committerGitHub <noreply@github.com>
Mon, 26 Feb 2018 22:52:27 +0000 (14:52 -0800)
commit2af29bc1e20127abaeed0cb163ff80c97c505fc5
tree9bcd178497c90dac769b2c337b28c513ba9a0d6a
parent0406170acb40eb2eb029438565e64b895e6e02d6
[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@e80c13ec88811fbf5101cede385aca219f15ead7
Reviewed-on: https://github.com/flang-compiler/f18/pull/15
flang/lib/parser/CMakeLists.txt
flang/lib/parser/unparse.cc [new file with mode: 0644]
flang/lib/parser/unparse.h [new file with mode: 0644]
flang/tools/f18/CMakeLists.txt
flang/tools/f18/f18.cc
flang/tools/f18/test-visitor.cc [deleted file]