diff options
author | John Hodge (sonata) <tpg@mutabah.net> | 2015-01-11 15:00:32 +0800 |
---|---|---|
committer | John Hodge (sonata) <tpg@mutabah.net> | 2015-01-11 15:00:32 +0800 |
commit | 86938c184b32ce004d5247ad80f924f0ae7a3c86 (patch) | |
tree | 66dfdee288a8f3806dd869a9bccb910b8c854ab6 /src/main.cpp | |
parent | d9cba0738c5fe7928ea345f510f505fe777fd8ea (diff) | |
download | mrust-86938c184b32ce004d5247ad80f924f0ae7a3c86.tar.gz |
Add hacky text output of AST
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 4f92e593..19841c12 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,6 +3,7 @@ #include "parse/lex.hpp"
#include "parse/parseerror.hpp"
#include "ast/ast.hpp"
+#include <serialiser_texttree.hpp>
extern AST::Crate Parse_Crate(::std::string mainfile);
extern void ResolvePaths(AST::Crate& crate);
@@ -15,6 +16,10 @@ int main(int argc, char *argv[]) {
AST::Crate crate = Parse_Crate("samples/1.rs");
+ Serialiser_TextTree s_tt(::std::cout);
+ Serialiser& s = s_tt;
+ s << crate;
+
// Resolve names to be absolute names (include references to the relevant struct/global/function)
ResolvePaths(crate);
|