File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 5
5
> ** <sup >Syntax</sup >**
6
6
> _ TupleExpression_ :
7
7
>   ;  ;   ;  ; ` ( ` ` ) `
8
- >   ;  ; | ` ( ` [ _ Expression_ ] ` , ` ` ) `
9
- >   ;  ; | ` ( ` [ _ Expression_ ] (` , ` [ _ Expression_ ] )<sup >\+ </sup >
10
- > ` , ` <sup >?</sup > ` ) `
8
+ >   ;  ; | ` ( ` ( [ _ Expression_ ] ` , ` )<sup >+</sup > [ _ Expression_ ] <sup >?</sup > ` ) `
11
9
12
10
Tuples are written by enclosing zero or more comma-separated expressions in
13
11
parentheses. They are used to create [ tuple-typed] ( types.html#tuple-types )
31
29
32
30
> ** <sup >Syntax</sup >**
33
31
> _ TupleIndexingExpression_ :
34
- >   ;  ; [ _ Expression_ ] ` . ` [ INTEGER_LITERAL ]
32
+ >   ;  ; [ _ Expression_ ] ` . ` [ TUPLE_INDEX ]
35
33
36
34
[ Tuples] ( types.html#tuple-types ) and [ struct tuples] ( items/structs.html ) can be
37
35
indexed using the number corresponding to the position of the field. The index
@@ -48,5 +46,5 @@ let unit_x = Point(1.0, 0.0);
48
46
assert_eq! (unit_x . 0 , 1.0 );
49
47
```
50
48
51
- [ INTEGER_LITERAL ] : tokens.html#integer-literals
49
+ [ TUPLE_INDEX ] : tokens.html#integer-literals
52
50
[ _Expression_ ] : expressions.html
You can’t perform that action at this time.
0 commit comments