Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix RT #77114.
  • Loading branch information
peschwa committed Dec 25, 2014
1 parent e861672 commit a4576a2
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions src/Perl6/Grammar.nqp
Expand Up @@ -3758,6 +3758,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
$<opening>=[ '«' | '»' ]
{} <infixish('hyper')>
$<closing>=[ '«' | '»' || <.missing("« or »")> ]
<.can_meta($<infixish>, "hyper with")>
{} <O=.copyO($<infixish>)>
}

Expand Down Expand Up @@ -4041,14 +4042,36 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
<sym> <![!]> {} [ <infixish('neg')> || <.panic: "Negation metaoperator not followed by valid infix"> ]
[
|| <?{ $<infixish>.Str eq '=' }> <O('%chaining')>
|| <?{ $<infixish><OPER><O><iffy> }> <O=.copyO($<infixish>)>
|| <.can_meta($<infixish>, "negate")> <?{ $<infixish><OPER><O><iffy> }> <O=.copyO($<infixish>)>
|| <.panic("Cannot negate " ~ $<infixish>.Str ~ " because it is not iffy enough")>
]
}
token infix_prefix_meta_operator:sym<R> { <sym> <infixish('R')> {} <O=.copyO($<infixish>)> }
token infix_prefix_meta_operator:sym<S> { <sym> <infixish('S')> {} <O=.copyO($<infixish>)> }
token infix_prefix_meta_operator:sym<X> { <sym> <infixish('X')> <O('%list_infix')> }
token infix_prefix_meta_operator:sym<Z> { <sym> <infixish('Z')> <O('%list_infix')> }

token infix_prefix_meta_operator:sym<R> {
<sym> <infixish('R')> {}
<.can_meta($<infixish>, "reverse the args of")>
<O=.copyO($<infixish>)>
}

token infix_prefix_meta_operator:sym<S> {
<sym> <infixish('S')> {}
<.can_meta($<infixish>, "sequence the args of")>
<O=.copyO($<infixish>)>
}

token infix_prefix_meta_operator:sym<X> {
<sym> <infixish('X')> {}
<.can_meta($<infixish>, "cross with")>
<O('%list_infix')>

}

token infix_prefix_meta_operator:sym<Z> {
<sym> <infixish('Z')> {}
<.can_meta($<infixish>, "zip with")>
<O('%list_infix')>
}

token infix:sym<minmax> { <sym> >> <O('%list_infix')> }

token infix:sym<:=> {
Expand Down

0 comments on commit a4576a2

Please sign in to comment.