throw type_error(number, E) in arith_eval_by_metacall (#392)

This commit is contained in:
Mark Thom
2020-05-23 12:39:29 -06:00
parent 53cb2af202
commit e0378acfc2
3 changed files with 27 additions and 9 deletions

View File

@@ -121,6 +121,9 @@ macro_rules! functor_term {
(atom($e:expr), $arity:expr, $aux_lens:expr, $addendum: ident) => (
HeapCellValue::Atom(clause_name!($e), None)
);
(value($e:expr), $arity:expr, $aux_lens:expr, $addendum: ident) => (
$e
);
(string($h:expr, $e:expr), $arity:expr, $aux_lens:expr, $addendum: ident) => ({
let len: usize = $aux_lens.iter().sum();
let h = len + $arity + 1 + $addendum.h() + $h;