Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix [|] and [&] to provide flat junctions (RT #112696, masak++).

  • Loading branch information...
commit 7eae9b2740d177706696cc9dacac6c97f78e77d6 1 parent 83587be
@pmichaud pmichaud authored
Showing with 7 additions and 0 deletions.
  1. +1 −0  src/Perl6/Actions.pm
  2. +6 −0 src/core/metaops.pm
View
1  src/Perl6/Actions.pm
@@ -3932,6 +3932,7 @@ class Perl6::Actions is HLL::Actions {
:scope<lexical_6model>);
my $metaop := '&METAOP_REDUCE';
if $base<OPER><O><assoc> eq 'right' { $metaop := '&METAOP_REDUCE_RIGHT' }
+ elsif $base<OPER><O><assoc> eq 'list' { $metaop := '&METAOP_REDUCE_LIST' }
elsif $base<OPER><O><prec> eq 'm=' { $metaop := '&METAOP_REDUCE_CHAIN' }
elsif $base<OPER><O><pasttype> eq 'xor' { $metaop := '&METAOP_REDUCE_XOR' }
my $metapast := PAST::Op.new( :pasttype<call>, :name($metaop), $basepast);
View
6 src/core/metaops.pm
@@ -107,6 +107,12 @@ sub METAOP_REDUCE_RIGHT(\$op, :$triangle) {
}
+sub METAOP_REDUCE_LIST(\$op, :$triangle) {
+ NYI ":assoc<list> reduce triangle NYI" if $triangle;
+ sub (*@values) { $op(|@values) }
+}
+
+
sub METAOP_REDUCE_CHAIN(\$op, :$triangle) {
$triangle
?? sub (*@values) {

0 comments on commit 7eae9b2

Please sign in to comment.
Something went wrong with that request. Please try again.