Skip to content

Commit c95ce6c

Browse files
authored
Merge pull request rust-lang#239 from matthewjasper/lifetime-token
Add lifetime or label to tokens
2 parents 254df65 + 50c4e76 commit c95ce6c

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/expressions/loop-expr.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,4 +216,4 @@ expression `()`.
216216
[_Expression_]: expressions.html
217217
[_BlockExpression_]: expressions/block-expr.html
218218

219-
[LIFETIME_OR_LABEL]: tokens.html#symbols
219+
[LIFETIME_OR_LABEL]: tokens.html#lifetimes-and-loop-labels

src/tokens.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ a single integer literal.
411411
> **<sup>Lexer</sup>**
412412
> FLOAT_LITERAL :
413413
> &nbsp;&nbsp; &nbsp;&nbsp; DEC_LITERAL `.`
414-
> _(not immediately followed by `.`, `_` or an identifier_)
414+
> _(not immediately followed by `.`, `_` or an [identifier]_)
415415
> &nbsp;&nbsp; | DEC_LITERAL FLOAT_EXPONENT
416416
> &nbsp;&nbsp; | DEC_LITERAL `.` DEC_LITERAL FLOAT_EXPONENT<sup>?</sup>
417417
> &nbsp;&nbsp; | DEC_LITERAL (`.` DEC_LITERAL)<sup>?</sup>
@@ -476,6 +476,16 @@ The representation semantics of floating-point numbers are described in
476476
477477
The two values of the boolean type are written `true` and `false`.
478478

479+
## Lifetimes and loop labels
480+
481+
> **<sup>Lexer</sup>**
482+
> LIFETIME_OR_LABEL:
483+
> &nbsp;&nbsp; &nbsp;&nbsp; `'` [IDENTIFIER][identifier]
484+
485+
Lifetime parameters and [loop labels] both use this syntax.
486+
487+
[loop labels]: expressions/loop-expr.html
488+
479489
## Symbols
480490

481491
Symbols are a general class of printable [tokens] that play structural
@@ -490,3 +500,4 @@ They are catalogued in [the Symbols section][symbols] of the Grammar document.
490500
[tokens]: #tokens
491501
[symbols]: ../grammar.html#symbols
492502
[keywords]: keywords.html
503+
[identifier]: identifiers.html

0 commit comments

Comments
 (0)