Skip to content

Commit 31d74ba

Browse files
committed
hash subscripts not subject to endargs
1 parent c3e944a commit 31d74ba

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

STD.pm6

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,20 +1230,20 @@ grammar P6 is STD {
12301230
<.finishlex>
12311231
[
12321232
| '{YOU_ARE_HERE}' <.you_are_here>
1233-
| :dba('block') '{' ~ '}' <statementlist> :: <.curlycheck>
1233+
| :dba('block') '{' ~ '}' <statementlist> :: <.curlycheck(1)>
12341234
| <?terminator> <.panic: 'Missing block'>
12351235
| <?> <.panic: "Malformed block">
12361236
]
12371237
}
12381238

1239-
token curlycheck {
1239+
token curlycheck($code) {
12401240
[
12411241
|| <?before \h* $$> # (usual case without comments)
12421242
{ @*MEMOS[$¢.pos]<endstmt> = 2; }
12431243
|| <?before \h* <[\\,:]>>
12441244
|| <.unv> $$
12451245
{ @*MEMOS[$¢.pos]<endstmt> = 2; }
1246-
|| <.unsp>? { @*MEMOS[$¢.pos]<endargs> = 1; }
1246+
|| <.unsp>? { @*MEMOS[$¢.pos]<endargs> = $code; }
12471247
]
12481248
}
12491249

@@ -1272,7 +1272,7 @@ grammar P6 is STD {
12721272
]
12731273
]
12741274

1275-
<.curlycheck>
1275+
<.curlycheck(1)>
12761276
}
12771277

12781278
# statement semantics
@@ -1633,7 +1633,7 @@ grammar P6 is STD {
16331633
}
16341634
}
16351635
| :dba('shape definition') '[' ~ ']' <semilist>
1636-
| :dba('shape definition') '{' ~ '}' <semilist> <.curlycheck>
1636+
| :dba('shape definition') '{' ~ '}' <semilist> <.curlycheck(0)>
16371637
| <?before '<'> <postcircumfix>
16381638
]*
16391639
]?
@@ -3448,7 +3448,7 @@ grammar P6 is STD {
34483448
# <.finishlex> # XXX not sure if we need this
34493449
'{' ~ '}' <semilist> <O(|%methodcall)>
34503450
<.checkyada>
3451-
<.curlycheck>
3451+
<.curlycheck(0)>
34523452
}
34533453

34543454
token postcircumfix:sym«< >» {

0 commit comments

Comments
 (0)