From fef80b05ec09ac066ff0b474b80a8f55b8b4d217 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 1 Oct 2016 16:04:41 +0800 Subject: AST Dump - Include binding index in patterns --- src/dump_as_rust.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/dump_as_rust.cpp b/src/dump_as_rust.cpp index 118cf234..db44ccbc 100644 --- a/src/dump_as_rust.cpp +++ b/src/dump_as_rust.cpp @@ -816,7 +816,9 @@ void RustPrinter::print_pattern_tuple(const AST::Pattern::TuplePat& v, bool is_r void RustPrinter::print_pattern(const AST::Pattern& p, bool is_refutable) { if( p.binding().is_valid() ) { - m_os << p.binding().m_name; + if( p.binding().m_mutable ) + m_os << "mut "; + m_os << p.binding().m_name << "/*"<