MCPcopy Create free account
hub / github.com/daisy/MathCAT / pop

Method pop

src/speech.rs:1671–1682  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1669 }
1670
1671 fn pop(&mut self) {
1672 const MISSING_VALUE: &str = "-- unset value --"; // can't remove a variable from context, so use this value
1673 let old_values = self.old_values.pop().unwrap();
1674 for variable in old_values.defs {
1675 let qname = QName::new(&variable.name);
1676 let old_value = match variable.value {
1677 None => Value::String(MISSING_VALUE.to_string()),
1678 Some(val) => val,
1679 };
1680 self.base.set_variable(qname, old_value);
1681 }
1682 }
1683}
1684
1685

Callers 8

shift_stackMethod · 0.45
reduce_stack_one_timeMethod · 0.45
replaceMethod · 0.45
find_matchMethod · 0.45
ueb_cleanupFunction · 0.45
evaluateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected