From 028a2ec7647466d8a183206d2a268062a71f51d3 Mon Sep 17 00:00:00 2001 From: Alex Martini Date: Thu, 19 Oct 2023 12:46:55 -0700 Subject: [PATCH] Change grammar underproduction to overproduction. The old grammar didn't allow things like f(&x.y) which are legal in Swift. The new grammar allows a bunch of stuff -- literals, closures, and conditional expressions -- but that's a better problem to have. See also this PR, where we're discussing a more specific fix: https://github.com/apple/swift-book/pull/194 --- TSPL.docc/ReferenceManual/Expressions.md | 2 +- TSPL.docc/ReferenceManual/SummaryOfTheGrammar.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TSPL.docc/ReferenceManual/Expressions.md b/TSPL.docc/ReferenceManual/Expressions.md index ab58727b0..96b11b9e6 100644 --- a/TSPL.docc/ReferenceManual/Expressions.md +++ b/TSPL.docc/ReferenceManual/Expressions.md @@ -61,7 +61,7 @@ as described in . > Grammar of an in-out expression: > -> *in-out-expression* → **`&`** *identifier* +> *in-out-expression* → **`&`** *primary-expression* ### Try Operator diff --git a/TSPL.docc/ReferenceManual/SummaryOfTheGrammar.md b/TSPL.docc/ReferenceManual/SummaryOfTheGrammar.md index c177c3d3b..20ecde510 100644 --- a/TSPL.docc/ReferenceManual/SummaryOfTheGrammar.md +++ b/TSPL.docc/ReferenceManual/SummaryOfTheGrammar.md @@ -323,7 +323,7 @@ make the same change here also. > Grammar of an in-out expression: > -> *in-out-expression* → **`&`** *identifier* +> *in-out-expression* → **`&`** *primary-expression* > Grammar of a try expression: >