Skip to content

Commit e2a36d8

Browse files
committed
disallow set<a b c>
A (beneficial?) side effect is that you may no longer say 'set' to mean ∅. You must say 'set()' instead. Which is perhaps clearer...
1 parent b33d8e0 commit e2a36d8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

STD.pm6

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4068,6 +4068,7 @@ grammar P6 is STD {
40684068
:WHAT(2), :WHICH(2), :WHERE(2), :HOW(2), :WHENCE(2), :WHO(2),
40694069
:VAR(2),
40704070
:any(2), :all(2), :none(2), :one(2),
4071+
:set(2), :bag(2),
40714072
);
40724073

40734074
# token term:funspace { <longname> \h* <?before '('> <args(0)> }
@@ -4102,6 +4103,7 @@ grammar P6 is STD {
41024103
$ok = 1 if $<args><semiarglist>;
41034104
if not $ok {
41044105
given +%deftrap{$name} {
4106+
.worry("Use of non-subscript <...> where postfix is expected; please use whitespace") if $_ and substr(self.orig, $¢.pos, 1) eq '<';
41054107
when 1 { # probably misused P5ism
41064108
$<identifier>.sorryobs("bare '$name'", ".$name if you meant \$_, or use an explicit invocant or argument");
41074109
}

0 commit comments

Comments
 (0)