Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 7eae9b2740d177706696cc9dacac6c97f78e77d6 1 parent 83587be
Patrick R. Michaud pmichaud authored

Showing 2 changed files with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. +1 0  src/Perl6/Actions.pm
  2. +6 0 src/core/metaops.pm
1  src/Perl6/Actions.pm
@@ -3932,6 +3932,7 @@ class Perl6::Actions is HLL::Actions {
3932 3932 :scope<lexical_6model>);
3933 3933 my $metaop := '&METAOP_REDUCE';
3934 3934 if $base<OPER><O><assoc> eq 'right' { $metaop := '&METAOP_REDUCE_RIGHT' }
  3935 + elsif $base<OPER><O><assoc> eq 'list' { $metaop := '&METAOP_REDUCE_LIST' }
3935 3936 elsif $base<OPER><O><prec> eq 'm=' { $metaop := '&METAOP_REDUCE_CHAIN' }
3936 3937 elsif $base<OPER><O><pasttype> eq 'xor' { $metaop := '&METAOP_REDUCE_XOR' }
3937 3938 my $metapast := PAST::Op.new( :pasttype<call>, :name($metaop), $basepast);
6 src/core/metaops.pm
@@ -107,6 +107,12 @@ sub METAOP_REDUCE_RIGHT(\$op, :$triangle) {
107 107 }
108 108
109 109
  110 +sub METAOP_REDUCE_LIST(\$op, :$triangle) {
  111 + NYI ":assoc<list> reduce triangle NYI" if $triangle;
  112 + sub (*@values) { $op(|@values) }
  113 +}
  114 +
  115 +
110 116 sub METAOP_REDUCE_CHAIN(\$op, :$triangle) {
111 117 $triangle
112 118 ?? sub (*@values) {

0 comments on commit 7eae9b2

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