]> git.lizzy.rs Git - rust.git/commitdiff
visitor: Add debug log for FmtVisitor::visit_stmt()
authorKamal Marhubi <kamal@marhubi.com>
Wed, 25 May 2016 18:41:26 +0000 (20:41 +0200)
committerKamal Marhubi <kamal@marhubi.com>
Mon, 30 May 2016 22:43:48 +0000 (00:43 +0200)
src/visitor.rs

index 503153463dfb6e68181fd3bcb256e0e23949dfa4..45c72e2fdf8a5fef04d84a9e16ae76c71754749f 100644 (file)
@@ -42,6 +42,10 @@ pub struct FmtVisitor<'a> {
 
 impl<'a> FmtVisitor<'a> {
     fn visit_stmt(&mut self, stmt: &ast::Stmt) {
+        debug!("visit_stmt: {:?} {:?}",
+               self.codemap.lookup_char_pos(stmt.span.lo),
+               self.codemap.lookup_char_pos(stmt.span.hi));
+
         match stmt.node {
             ast::StmtKind::Decl(ref decl, _) => {
                 if let ast::DeclKind::Item(ref item) = decl.node {