Skip to content

Commit bcb3aa6

Browse files
committed
properly diagnose missing assignop on s[]
1 parent a426055 commit bcb3aa6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

STD.pm6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2579,9 +2579,9 @@ grammar P6 is STD {
25792579
<.ws>
25802580
[ <?[ \[ \{ \( \< ]> <.obs('brackets around replacement', 'assignment syntax')> ]?
25812581
[ <infixish> || <panic: "Missing assignment operator"> ]
2582-
[ <?{ $<infixish>.Str eq '=' || $<infixish>.<infix_postfix_meta_operator> }> || <.panic: "Malformed assignment operator"> ]
2582+
[ <?{ $<infixish>.Str eq '=' || $<infixish>.<infix_postfix_meta_operator> }>.Str eq '=' || <.panic: "Malformed assignment operator"> ]
25832583
<.ws>
2584-
<right=EXPR(item %item_assignment)>
2584+
[ <right=EXPR(item %item_assignment)> || <.panic: "Assignment operator missing its expression"> ]
25852585
||
25862586
{ $lang = $lang2.unbalanced($stop); }
25872587
<right=.nibble($lang)> $stop || <.panic: "Malformed replacement part; couldn't find final $stop">

0 commit comments

Comments
 (0)