add top level exception reporting, exceptions for call/N.

This commit is contained in:
Mark Thom
2017-08-17 18:20:58 -06:00
parent 1a7edc2d13
commit 02c0f1cf56
5 changed files with 165 additions and 95 deletions

View File

@@ -22,6 +22,22 @@ macro_rules! query {
)
}
macro_rules! functor {
($name:expr, $len:expr, [$($args:expr),*]) => {{
if $len > 0 {
vec![ HeapCellValue::NamedStr($len, String::from($name)), $($args),* ]
} else {
vec![ atom!($name) ]
}
}}
}
macro_rules! atom {
($name:expr) => (
HeapCellValue::Con(Constant::Atom(String::from($name)))
)
}
macro_rules! fact {
[$($x:expr),+] => (
Line::Fact(vec![$($x),+])