Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix loop.
  • Loading branch information
jnthn committed Jul 21, 2012
1 parent 926e030 commit cddd89c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/QPerl6/Actions.pm
Expand Up @@ -784,11 +784,9 @@ class QPerl6::Actions is HLL::Actions {
my $block := pblock_immediate($<block>.ast);
my $cond := $<e2> ?? $<e2>[0].ast !! QAST::Var.new(:name<True>, :scope<lexical>);
my $loop := QAST::Op.new( $cond, :op('while'), :node($/) );
$loop.push($block);
if $<e3> {
$loop.push(QAST::Stmts.new( $block, $<e3>[0].ast ));
}
else {
$loop.push($block);
$loop.push($<e3>[0].ast);
}
if $<e1> {
$loop := QAST::Stmts.new( $<e1>[0].ast, $loop, :node($/) );
Expand Down

0 comments on commit cddd89c

Please sign in to comment.