add support for quoted atoms to writeq

This commit is contained in:
Mark Thom
2018-07-15 17:54:37 -06:00
parent 7527bc76f8
commit f5e254dd64
6 changed files with 40 additions and 26 deletions

View File

@@ -795,7 +795,7 @@ pub enum BuiltInClauseType {
Compare,
CompareTerm(CompareTermQT),
CyclicTerm,
Display,
Writeq,
DuplicateTerm,
Eq,
Functor,
@@ -898,7 +898,7 @@ impl BuiltInClauseType {
&BuiltInClauseType::Compare => clause_name!("compare"),
&BuiltInClauseType::CompareTerm(qt) => clause_name!(qt.name()),
&BuiltInClauseType::CyclicTerm => clause_name!("cyclic_term"),
&BuiltInClauseType::Display => clause_name!("display"),
&BuiltInClauseType::Writeq => clause_name!("writeq"),
&BuiltInClauseType::DuplicateTerm => clause_name!("duplicate_term"),
&BuiltInClauseType::Eq => clause_name!("=="),
&BuiltInClauseType::Functor => clause_name!("functor"),
@@ -917,7 +917,7 @@ impl BuiltInClauseType {
&BuiltInClauseType::Compare => 2,
&BuiltInClauseType::CompareTerm(_) => 2,
&BuiltInClauseType::CyclicTerm => 1,
&BuiltInClauseType::Display => 1,
&BuiltInClauseType::Writeq => 1,
&BuiltInClauseType::DuplicateTerm => 2,
&BuiltInClauseType::Eq => 2,
&BuiltInClauseType::Functor => 3,
@@ -941,7 +941,7 @@ impl BuiltInClauseType {
("@=<", 2) => Some(BuiltInClauseType::CompareTerm(CompareTermQT::LessThanOrEqual)),
("\\=@=", 2) => Some(BuiltInClauseType::CompareTerm(CompareTermQT::NotEqual)),
("=@=", 2) => Some(BuiltInClauseType::CompareTerm(CompareTermQT::Equal)),
("display", 1) => Some(BuiltInClauseType::Display),
("writeq", 1) => Some(BuiltInClauseType::Writeq),
("duplicate_term", 2) => Some(BuiltInClauseType::DuplicateTerm),
("==", 2) => Some(BuiltInClauseType::Eq),
("functor", 3) => Some(BuiltInClauseType::Functor),