quote solo characters wherever they lead atoms

This commit is contained in:
Mark Thom
2019-05-05 22:48:19 -04:00
parent bf8a2ab6a6
commit 3547ae2db4
7 changed files with 14 additions and 9 deletions

View File

@@ -1,3 +1,5 @@
use indexmap::IndexMap;
use prolog_parser::ast::*;
use prolog_parser::tabled_rc::*;
@@ -412,8 +414,8 @@ impl AddAssign<usize> for CodePtr {
}
}
pub type HeapVarDict = HashMap<Rc<Var>, Addr>;
pub type AllocVarDict = HashMap<Rc<Var>, VarData>;
pub type HeapVarDict = IndexMap<Rc<Var>, Addr>;
pub type AllocVarDict = IndexMap<Rc<Var>, VarData>;
#[derive(Clone)]
pub struct DynamicPredicateInfo {

View File

@@ -1558,7 +1558,7 @@ impl MachineState {
let mut list_of_var_eqs = vec![];
for (var, binding) in term_write_result.var_dict {
for (var, binding) in term_write_result.var_dict.into_iter().rev() {
let var_atom = clause_name!(var.to_string(), indices.atom_tbl);
let var_atom = Constant::Atom(var_atom, None);