Skip to content

Commit 4731beb

Browse files
committed
disallow extra brackets on various pair thingies
1 parent 3b262af commit 4731beb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

STD.pm6

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2167,6 +2167,7 @@ grammar P6 is STD {
21672167
| '<' <desigilname> '>'
21682168
]
21692169
)
2170+
[ <?before <[ \[ \( \< \{ ]>> <.panic: "Extra argument not allowed; pair already has variable argument"> ]?
21702171
{ $key = $<var><desigilname>.Str; $value = $<var>; $¢.check_variable($value); }
21712172
]
21722173
$<k> = {$key} $<v> = {$value}
@@ -2926,6 +2927,8 @@ grammar P6 is STD {
29262927
| <param_var(1)>
29272928
| '\\' <defterm>
29282929
]
2930+
[ <?before <[ \( \[ ]>> <.panic: "Subsignature not allowed after named parameter; please insert whitespace"> ]?
2931+
[ <?before <[ \{ \< ]>> <.panic: "Cannot apply this shape"> ]?
29292932
}
29302933

29312934
token named_param_term {

0 commit comments

Comments
 (0)