Replace two checks with slurp_token
This commit is contained in:
parent
9cc16ed55a
commit
5c37830ef4
1 changed files with 2 additions and 4 deletions
|
@ -687,14 +687,12 @@ sub macro_cond {
|
|||
my @cases;
|
||||
while (!peek_token($ts,RPAREN))
|
||||
{
|
||||
die "Expected ( before case in cond"
|
||||
unless (shift @$ts)->{type} == LPAREN;
|
||||
slurp_token($ts, LPAREN, "Expected ( before case in cond");
|
||||
|
||||
my $condition = parser_expr($ts);
|
||||
my $work = parser_expr($ts);
|
||||
|
||||
die "Expected ) after case in cond"
|
||||
unless (shift @$ts)->{type} == RPAREN;
|
||||
slurp_token($ts, RPAREN, "Expected ) after case in cond");
|
||||
|
||||
push @cases, {
|
||||
condition => $condition,
|
||||
|
|
Loading…
Reference in a new issue