Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed infixed function syntax [[&foo]] (RT #121692)
  • Loading branch information
FROGGS committed Jul 18, 2014
1 parent 48fe6dd commit c63233a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/ChangeLog
@@ -1,5 +1,6 @@
New in 2014.08
+ print file/line annotations for warnings also on moar and jvm
+ fixed infixed function syntax [[&foo]]

New in 2014.07
+ require and build parrot 6.6.0
Expand Down
6 changes: 6 additions & 0 deletions src/Perl6/Grammar.nqp
Expand Up @@ -3318,6 +3318,12 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
| :dba('bracketed infix') '[' ~ ']' <infixish('[]')> { $oper := $<infixish><OPER> }
# XXX Gets false positives.
#[ <!before '='> { self.worry("Useless use of [] around infix op") unless $*IN_META; } ]?
| :dba('infixed function') <?before '[&' <twigil>? [<alpha>|'('] > '[' ~ ']' <infix=.variable>
{
$<infix><O> := nqp::hash('prec', 't=', 'assoc', 'left', 'dba', 'additive') unless $<infix><O>;
$oper := $<infix>;
self.check_variable($<infix>)
}
| <infix_circumfix_meta_operator> { $oper := $<infix_circumfix_meta_operator> }
| <infix_prefix_meta_operator> { $oper := $<infix_prefix_meta_operator> }
| <infix> { $oper := $<infix> }
Expand Down

0 comments on commit c63233a

Please sign in to comment.