remove commented out print_term
This commit is contained in:
@@ -368,51 +368,6 @@ impl Machine {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
fn print_term(&self, addr: &Addr) -> String
|
||||
{
|
||||
let mut viewer = HeapCellViewer::new(&self.ms.heap,
|
||||
&self.ms.and_stack,
|
||||
addr);
|
||||
|
||||
let mut result = String::new();
|
||||
|
||||
while let Some(view) = viewer.next() {
|
||||
match view {
|
||||
CellView::Con(ref r) =>
|
||||
result += format!("{}", r).as_str(),
|
||||
CellView::HeapVar(cell_num) => {
|
||||
result += "_";
|
||||
result += cell_num.to_string().as_str();
|
||||
},
|
||||
CellView::StackVar(_, cell_num) => {
|
||||
result += "s_";
|
||||
result += cell_num.to_string().as_str();
|
||||
},
|
||||
CellView::Str(_, ref name) =>
|
||||
result += name.as_str(),
|
||||
CellView::TToken(TToken::Bar) => {
|
||||
match viewer.peek() {
|
||||
Some(CellView::Con(&Constant::EmptyList)) => {
|
||||
viewer.next();
|
||||
},
|
||||
Some(CellView::TToken(TToken::LSBracket(loc))) => {
|
||||
result += ", ";
|
||||
|
||||
viewer.next();
|
||||
viewer.remove_token(loc);
|
||||
},
|
||||
_ => result += " | "
|
||||
};
|
||||
},
|
||||
CellView::TToken(token) =>
|
||||
result += token.as_str()
|
||||
};
|
||||
}
|
||||
|
||||
result
|
||||
}
|
||||
*/
|
||||
pub fn heap_view(&self, var_dir: &HeapVarDict) -> String {
|
||||
let mut result = String::new();
|
||||
|
||||
@@ -448,4 +403,3 @@ impl Machine {
|
||||
&self.op_dir
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user