Skip to content

Commit

Permalink
Fix check_recursion_prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Westerlind authored and Markus Westerlind committed Apr 7, 2022
1 parent 2957794 commit 948e1e1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,11 @@ macro_rules! if_checking_recursion_limit {

macro_rules! check_recursion_prefix {
($self_: ident, $error: path) => {
$self_.remaining_depth -= 1;
if $self_.remaining_depth == 0 {
return $error($self_.error(ErrorCode::RecursionLimitExceeded));
if_checking_recursion_limit! {
$self_.remaining_depth -= 1;
if $self_.remaining_depth == 0 {
return $error($self_.error(ErrorCode::RecursionLimitExceeded));
}
}
};
}
Expand Down

0 comments on commit 948e1e1

Please sign in to comment.