Skip to content

Commit

Permalink
Add ($value if $cond) semantics for if/unless modifiers.
Browse files Browse the repository at this point in the history
Fix punning of 'list' method and 'list' operator in Range.
  • Loading branch information
pmichaud committed Apr 4, 2009
1 parent 0bb68ee commit a06d768
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/classes/Range.pir
Expand Up @@ -29,7 +29,7 @@ just return a clone of the Range.

=cut

.sub 'list' :method
.sub '' :method('list')
.local pmc range_it, result
range_it = self.'iterator'()
result = new 'List'
Expand Down
1 change: 1 addition & 0 deletions src/parser/actions.pm
Expand Up @@ -166,6 +166,7 @@ method statement($/, $key) {
my $body := $past;
$past := $( $<statement_mod_cond> );
$past.push( $body );
$past.push( PAST::Op.new( :name('list') ) );
$sml := $<statement_mod_loop>[0];
}
if $key eq 'mod_loop' { $sml := $<statement_mod_loop>; }
Expand Down

0 comments on commit a06d768

Please sign in to comment.