From e5bc7585e1ce2663dfc350e0a990005f7f3e1953 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Fri, 6 Dec 2024 13:04:44 +0100 Subject: [PATCH] Apk: initialize pushback in loop creation Otherwise we do not parse the line after the loop. --- Build/Apk.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Build/Apk.pm b/Build/Apk.pm index 09052205..3a814e1a 100644 --- a/Build/Apk.pm +++ b/Build/Apk.pm @@ -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; }