]> git.lizzy.rs Git - rust.git/commitdiff
add display_sctable fn to ast_util
authorJohn Clements <clements@racket-lang.org>
Fri, 26 Jul 2013 17:27:38 +0000 (13:27 -0400)
committerJohn Clements <clements@racket-lang.org>
Fri, 6 Sep 2013 20:35:13 +0000 (13:35 -0700)
src/libsyntax/ast_util.rs

index 253bed4e3b86e7d65135d4df7d3abda2d7ea9144..ee898c182e08a6f779d6a873a32997f03da81619 100644 (file)
@@ -907,6 +907,15 @@ pub fn get_sctable() -> @mut SCTable {
     }
 }
 
+/// print out an SCTable for debugging
+pub fn display_sctable(table : &SCTable) {
+    error!("SC table:");
+    for (idx,val) in table.table.iter().enumerate() {
+        error!("%4u : %?",idx,val);
+    }
+}
+
+
 /// Add a value to the end of a vec, return its index
 fn idx_push<T>(vec: &mut ~[T], val: T) -> uint {
     vec.push(val);