Skip to content

Commit 0d241bd

Browse files
authored
Fix in-out grammar underproduction (#199)
The old grammar didn't allow things like f(&x.y) which are legal in Swift. The new grammar allows a bunch of extra stuff -- literals, closures, and conditional expressions -- but that's a better problem to have. See also #194, where we're discussing a more specific fix. Fixes: #193 (partially)
2 parents c13aca7 + 028a2ec commit 0d241bd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

TSPL.docc/ReferenceManual/Expressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ as described in <doc:Expressions#Implicit-Conversion-to-a-Pointer-Type>.
6161

6262
> Grammar of an in-out expression:
6363
>
64-
> *in-out-expression***`&`** *identifier*
64+
> *in-out-expression***`&`** *primary-expression*
6565
6666
### Try Operator
6767

TSPL.docc/ReferenceManual/SummaryOfTheGrammar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ make the same change here also.
323323
324324
> Grammar of an in-out expression:
325325
>
326-
> *in-out-expression***`&`** *identifier*
326+
> *in-out-expression***`&`** *primary-expression*
327327
328328
> Grammar of a try expression:
329329
>

0 commit comments

Comments
 (0)