Skip to content

Commit 458b123

Browse files
committed
add display_sctable fn to ast_util
1 parent c11bfde commit 458b123

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/libsyntax/ast_util.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,15 @@ pub fn get_sctable() -> @mut SCTable {
907907
}
908908
}
909909
910+
/// print out an SCTable for debugging
911+
pub fn display_sctable(table : &SCTable) {
912+
error!("SC table:");
913+
for (idx,val) in table.table.iter().enumerate() {
914+
error!("%4u : %?",idx,val);
915+
}
916+
}
917+
918+
910919
/// Add a value to the end of a vec, return its index
911920
fn idx_push<T>(vec: &mut ~[T], val: T) -> uint {
912921
vec.push(val);

0 commit comments

Comments
 (0)