Skip to content

Commit

Permalink
Apk: initialize pushback in loop creation
Browse files Browse the repository at this point in the history
Otherwise we do not parse the line after the loop.
  • Loading branch information
mlschroe committed Dec 6, 2024
1 parent b61443e commit e5bc758
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Build/Apk.pm
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,14 @@ sub parse {
my @vals = unquotesplit($2, \%vars);
my $body = readloopbody(\*PKG);
$inloop = [ 0, 'for', $var, \@vals, $body ] if $body && @vals;
push @pushback, 'done' if $inloop;
next;
}
if ($preamble && !$inloop && !@pushback && /^while\s+\[\s(.+)\s+]\s*;\s*do\s*$/) {
my $cond = $1;
my $body = readloopbody(\*PKG);
$inloop = [ 0, 'while', undef, $cond, $body ] if $body;
push @pushback, 'done' if $inloop;
next;
}

Expand Down

0 comments on commit e5bc758

Please sign in to comment.