adjust for nested throws.

This commit is contained in:
Mark Thom
2017-08-14 22:49:41 -06:00
parent aa3bee5db9
commit 1d2c02e9af
9 changed files with 362 additions and 174 deletions

View File

@@ -22,6 +22,12 @@ macro_rules! query {
)
}
macro_rules! fact {
[$($x:expr),+] => (
Line::Fact(vec![$($x),+])
)
}
macro_rules! temp_v {
($x:expr) => (
RegType::Temp($x)
@@ -40,6 +46,12 @@ macro_rules! get_var_in_query {
)
}
macro_rules! get_var_in_fact {
($r:expr, $arg:expr) => (
FactInstruction::GetVariable($r, $arg)
)
}
macro_rules! put_var {
($r:expr, $arg:expr) => (
QueryInstruction::PutVariable($r, $arg)
@@ -150,6 +162,12 @@ macro_rules! get_ball {
)
}
macro_rules! erase_ball {
() => (
Line::BuiltIn(BuiltInInstruction::EraseBall)
)
}
macro_rules! unify {
() => (
Line::BuiltIn(BuiltInInstruction::Unify)
@@ -180,9 +198,9 @@ macro_rules! fail {
)
}
macro_rules! copy_term {
macro_rules! duplicate_term {
() => (
Line::BuiltIn(BuiltInInstruction::CopyTerm)
Line::BuiltIn(BuiltInInstruction::DuplicateTerm)
)
}