Skip to content

Commit

Permalink
when [for] loop gets a [continue], we still must process our 'next' arg.
Browse files Browse the repository at this point in the history
... and when enabling this, make sure [break] still breaks.
  • Loading branch information
coke committed Dec 17, 2009
1 parent 033f0ff commit 9fcf4a5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Partcl/commands/main.pm
Expand Up @@ -176,9 +176,17 @@ our sub for(*@args) {
my $body := @args[3];

eval($init);
while expr($cond) {
my $loop := 1;
while $loop && expr($cond) {
eval($body);
eval($incr);
CONTROL {
if $!<type> == 65 { # CONTROL_LOOP_NEXT
eval($incr);
} elsif $!<type> == 66 { # CONTROL_LOOP_LAST
$loop := 0;
}
}
}
'';
}
Expand Down

0 comments on commit 9fcf4a5

Please sign in to comment.