Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
. and .= should parse tighter
To be intuitive, . and .= need to parse at about the level of unaries,
such that "-3**2 . abs" treats the left as a single pill, but nothing
looser than that, lest it eat up the multiplication of "-3 * 2 . abs".
(Changing .= away from item assignment is okay because initializer .=
was effectively tighter precedence anyway, and nobody ever noticed.
And .= was always syntactically privileged anyway.)
  • Loading branch information
TimToady committed Sep 27, 2015
1 parent 96c2ec9 commit be141b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Perl6/Grammar.nqp
Expand Up @@ -3608,6 +3608,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
Perl6::Grammar.O(':prec<x=>, :assoc<unary>, :dba<autoincrement>', '%autoincrement');
Perl6::Grammar.O(':prec<w=>, :assoc<right>, :dba<exponentiation>', '%exponentiation');
Perl6::Grammar.O(':prec<v=>, :assoc<unary>, :dba<symbolic unary>', '%symbolic_unary');
Perl6::Grammar.O(':prec<v=>, :assoc<left>, :dba<dotty infix>, :nextterm<dottyopish>, :sub<z=>', '%dottyinfix');
Perl6::Grammar.O(':prec<u=>, :assoc<left>, :dba<multiplicative>', '%multiplicative');
Perl6::Grammar.O(':prec<t=>, :assoc<left>, :dba<additive>', '%additive');
Perl6::Grammar.O(':prec<s=>, :assoc<left>, :dba<replication>', '%replication');
Expand All @@ -3621,7 +3622,6 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
Perl6::Grammar.O(':prec<k=>, :assoc<list>, :dba<tight or>', '%tight_or');
Perl6::Grammar.O(':prec<j=>, :assoc<right>, :dba<conditional>, :fiddly<1>', '%conditional');
Perl6::Grammar.O(':prec<i=>, :assoc<right>, :dba<item assignment>', '%item_assignment');
Perl6::Grammar.O(':prec<i=>, :assoc<right>, :dba<item assignment>, :nextterm<dottyopish>, :sub<z=>', '%dottyinfix');
Perl6::Grammar.O(':prec<i=>, :assoc<right>, :dba<list assignment>, :sub<e=>, :fiddly<1>', '%list_assignment');
Perl6::Grammar.O(':prec<h=>, :assoc<unary>, :dba<loose unary>', '%loose_unary');
Perl6::Grammar.O(':prec<g=>, :assoc<list>, :dba<comma>, :nextterm<nulltermish>, :fiddly<1>', '%comma');
Expand Down

0 comments on commit be141b8

Please sign in to comment.