summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJohn Hodge (sonata) <tpg@mutabah.net>2015-01-11 15:00:32 +0800
committerJohn Hodge (sonata) <tpg@mutabah.net>2015-01-11 15:00:32 +0800
commit86938c184b32ce004d5247ad80f924f0ae7a3c86 (patch)
tree66dfdee288a8f3806dd869a9bccb910b8c854ab6 /src/main.cpp
parentd9cba0738c5fe7928ea345f510f505fe777fd8ea (diff)
downloadmrust-86938c184b32ce004d5247ad80f924f0ae7a3c86.tar.gz
Add hacky text output of AST
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp5
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);