add catch/throw support, make exceptions and arithmetic tests pass.

This commit is contained in:
Mark Thom
2018-05-10 01:43:36 -06:00
parent bae107f8cd
commit 954c29b103
9 changed files with 314 additions and 155 deletions

View File

@@ -393,7 +393,7 @@ impl RelationWorker {
if name.as_str() == "!" || name.as_str() == "blocked_!" {
Ok(QueryTerm::BlockedCut)
} else {
Ok(QueryTerm::Clause(r, ClauseType::Named(name, CodeIndex::default()), vec![]))
Ok(QueryTerm::Clause(r, ClauseType::from(name, 0, None), vec![]))
},
Term::Var(_, ref v) if v.as_str() == "!" =>
Ok(QueryTerm::UnblockedCut(Cell::default())),