Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion TSPL.docc/ReferenceManual/Expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ as an in-out argument to a function call expression.
&<#expression#>
```

The _expression_ is a combination of the following kinds of expression:

- An identifier or `self`
- Access to a member, including properties, tuple elements, and `.self`
- Access to an array subscript

Member access can be explicit like `f(&x.y)` or implicit like `f(&.z)`.
The _expression_ can also include grouping parentheses.

For more information about in-out parameters and to see an example,
see <doc:Functions#In-Out-Parameters>.

Expand All @@ -61,7 +70,7 @@ as described in <doc:Expressions#Implicit-Conversion-to-a-Pointer-Type>.

> Grammar of an in-out expression:
>
> *in-out-expression* → **`&`** *primary-expression*
> *in-out-expression* → **`&`** *postfix-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* → **`&`** *primary-expression*
> *in-out-expression* → **`&`** *postfix-expression*

> Grammar of a try expression:
>
Expand Down