Skip to content

Commit 0833386

Browse files
committed
Appendix B: restructure handling of . and parens
In Table B-8, instead of treating “tuples” as the primary concern, treat parentheses as primary and tuples as one of the contexts. Move the tuple index access to live alongside field and method access.
1 parent 69980b8 commit 0833386

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/appendix-02-operators.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ overload that operator is listed.
3939
| `->` | `fn(...) -> type`, <code>&vert;...&vert; -> type</code> | Function and closure return type | |
4040
| `.` | `expr.ident` | Field access | |
4141
| `.` | `expr.ident(expr, ...)` | Method call | |
42-
| `(` | `expr(expr, ...)` | Function call | |
42+
| `.` | `expr.0`, `expr.1`, etc. | Tuple indexing | |
4343
| `..` | `..`, `expr..`, `..expr`, `expr..expr` | Right-exclusive range literal | `PartialOrd` |
4444
| `..=` | `..=expr`, `expr..=expr` | Right-inclusive range literal | `PartialOrd` |
4545
| `..` | `..expr` | Struct literal update syntax | |
@@ -170,9 +170,9 @@ Table B-7 shows symbols that create comments.
170170
| `/*!...*/` | Inner block doc comment |
171171
| `/**...*/` | Outer block doc comment |
172172

173-
Table B-8 shows symbols that appear in the context of using tuples.
173+
Table B-8 shows the contexts in which parentheses are used.
174174

175-
<span class="caption">Table B-8: Tuples</span>
175+
<span class="caption">Table B-8: Parentheses</span>
176176

177177
| Symbol | Explanation |
178178
| ------------------------ | ------------------------------------------------------------------------------------------- |
@@ -183,7 +183,6 @@ Table B-8 shows symbols that appear in the context of using tuples.
183183
| `(expr, ...)` | Tuple expression |
184184
| `(type, ...)` | Tuple type |
185185
| `expr(expr, ...)` | Function call expression; also used to initialize tuple `struct`s and tuple `enum` variants |
186-
| `expr.0`, `expr.1`, etc. | Tuple indexing |
187186

188187
Table B-9 shows the contexts in which curly braces are used.
189188

0 commit comments

Comments
 (0)