Skip to content

Commit

Permalink
"for" list iteration calls .for, not .map
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Jan 17, 2015
1 parent a964f98 commit 7a1e7f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Perl6/Actions.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
# Turn $code into "for lines() { $code }"
sub wrap_option_n_code($/, $code) {
$code := make_topic_block_ref($/, $code, copy => 1);
my $past := QAST::Op.new(:op<callmethod>, :name<map>,
my $past := QAST::Op.new(:op<callmethod>, :name<for>,
QAST::Op.new(:op<call>, :name<&lines>),
QAST::Op.new(:op<p6capturelex>, $code)
);
Expand Down Expand Up @@ -769,7 +769,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
$past := make_topic_block_ref($/, $past);
}
$past := QAST::Op.new(
:op<callmethod>, :name<map>, :node($/),
:op<callmethod>, :name<for>, :node($/),
QAST::Op.new(:op('call'), :name('&infix:<,>'), $cond),
block_closure($past)
);
Expand Down Expand Up @@ -1040,7 +1040,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
method statement_control:sym<for>($/) {
my $xblock := $<xblock>.ast;
my $past := QAST::Op.new(
:op<callmethod>, :name<map>, :node($/),
:op<callmethod>, :name<for>, :node($/),
QAST::Op.new(:name('&infix:<,>'), :op('call'), $xblock[0]),
block_closure($xblock[1])
);
Expand Down

0 comments on commit 7a1e7f4

Please sign in to comment.