Skip to content

Commit

Permalink
Change grammar underproduction to overproduction.
Browse files Browse the repository at this point in the history
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:

    #194
  • Loading branch information
amartini51 committed Oct 19, 2023
1 parent e123da3 commit 028a2ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion TSPL.docc/ReferenceManual/Expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ as described in <doc:Expressions#Implicit-Conversion-to-a-Pointer-Type>.

> Grammar of an in-out expression:
>
> *in-out-expression***`&`** *identifier*
> *in-out-expression***`&`** *primary-expression*
### Try Operator

Expand Down
2 changes: 1 addition & 1 deletion TSPL.docc/ReferenceManual/SummaryOfTheGrammar.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
>
Expand Down

0 comments on commit 028a2ec

Please sign in to comment.