add display_sctable fn to ast_util

This commit is contained in:
John Clements 2013-07-26 13:27:38 -04:00
parent 8330411688
commit fe1d21caec

View 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);