Skip to content

Add lifetime or label to tokens #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 11, 2018
Merged
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
2 changes: 1 addition & 1 deletion src/expressions/loop-expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,4 +216,4 @@ expression `()`.
[_Expression_]: expressions.html
[_BlockExpression_]: expressions/block-expr.html

[LIFETIME_OR_LABEL]: tokens.html#symbols
[LIFETIME_OR_LABEL]: tokens.html#lifetimes-and-loop-labels
13 changes: 12 additions & 1 deletion src/tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ a single integer literal.
> **<sup>Lexer</sup>**
> FLOAT_LITERAL :
> &nbsp;&nbsp; &nbsp;&nbsp; DEC_LITERAL `.`
> _(not immediately followed by `.`, `_` or an identifier_)
> _(not immediately followed by `.`, `_` or an [identifier]_)
> &nbsp;&nbsp; | DEC_LITERAL FLOAT_EXPONENT
> &nbsp;&nbsp; | DEC_LITERAL `.` DEC_LITERAL FLOAT_EXPONENT<sup>?</sup>
> &nbsp;&nbsp; | DEC_LITERAL (`.` DEC_LITERAL)<sup>?</sup>
Expand Down Expand Up @@ -476,6 +476,16 @@ The representation semantics of floating-point numbers are described in

The two values of the boolean type are written `true` and `false`.

## Lifetimes and loop labels

> **<sup>Lexer</sup>**
> LIFETIME_OR_LABEL:
> &nbsp;&nbsp; &nbsp;&nbsp; `'` [IDENTIFIER][identifier]

Lifetime parameters and [loop labels] both use this syntax.

[loop labels]: expressions/loop-expr.html

## Symbols

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