Skip to content

Commit

Permalink
fix: use push_stack_frame in public macroses
Browse files Browse the repository at this point in the history
Signed-off-by: Yaroslav Bolyukin <[email protected]>
  • Loading branch information
CertainLach committed Jan 25, 2021
1 parent 21e57ff commit c93dcb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/jrsonnet-evaluator/src/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ macro_rules! parse_args {
($ctx: expr, $fn_name: expr, $args: expr, $total_args: expr, [
$($id: expr, $name: ident: $ty: expr $(=>$match: path)?);+ $(;)?
], $handler:block) => {{
use $crate::{error::Error::*, throw, evaluate, push, typed::CheckType};
use $crate::{error::Error::*, throw, evaluate, push_stack_frame, typed::CheckType};

let args = $args;
if args.len() > $total_args {
Expand All @@ -162,7 +162,7 @@ macro_rules! parse_args {
throw!(IntrinsicArgumentReorderingIsNotSupportedYet);
}
}
let $name = push(None, || format!("evaluating argument"), || {
let $name = push_stack_frame(None, || format!("evaluating argument"), || {
let value = evaluate($ctx.clone(), &$name.1)?;
$ty.check(&value)?;
Ok(value)
Expand Down
4 changes: 2 additions & 2 deletions crates/jrsonnet-evaluator/src/typed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use thiserror::Error;
#[macro_export]
macro_rules! unwrap_type {
($desc: expr, $value: expr, $typ: expr => $match: path) => {{
use $crate::{push, typed::CheckType};
push(None, $desc, || Ok($typ.check(&$value)?))?;
use $crate::{push_stack_frame, typed::CheckType};
push_stack_frame(None, $desc, || Ok($typ.check(&$value)?))?;
match $value {
$match(v) => v,
_ => unreachable!(),
Expand Down

0 comments on commit c93dcb4

Please sign in to comment.