From be51cd50477cb3e65cb7720c91ed8ab5955d8872 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Tue, 11 Oct 2016 22:35:34 +0800 Subject: AST Dump - Include binding types --- src/dump_as_rust.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/dump_as_rust.cpp') diff --git a/src/dump_as_rust.cpp b/src/dump_as_rust.cpp index b8443845..c26698f5 100644 --- a/src/dump_as_rust.cpp +++ b/src/dump_as_rust.cpp @@ -821,6 +821,17 @@ void RustPrinter::print_pattern(const AST::Pattern& p, bool is_refutable) if( p.binding().is_valid() ) { if( p.binding().m_mutable ) m_os << "mut "; + switch(p.binding().m_type) + { + case ::AST::PatternBinding::Type::MOVE: + break; + case ::AST::PatternBinding::Type::REF: + m_os << "ref "; + break; + case ::AST::PatternBinding::Type::MUTREF: + m_os << "ref mut "; + break; + } m_os << p.binding().m_name << "/*"<