about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJohn Clements <clements@racket-lang.org>2013-07-26 13:27:38 -0400
committerJohn Clements <clements@racket-lang.org>2013-09-06 13:35:13 -0700
commitfe1d21caec3a7d11f847a07769062804442338de (patch)
tree0d1e4516706d338501e2b12560d271379506ccdd /src
parent8330411688b038b95695f9823d3937ad2ebf6152 (diff)
downloadrust-fe1d21caec3a7d11f847a07769062804442338de.tar.gz
rust-fe1d21caec3a7d11f847a07769062804442338de.zip
add display_sctable fn to ast_util
Diffstat (limited to 'src')
-rw-r--r--src/libsyntax/ast_util.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs
index 253bed4e3b8..ee898c182e0 100644
--- a/src/libsyntax/ast_util.rs
+++ b/src/libsyntax/ast_util.rs
@@ -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);