Skip to content

Commit

Permalink
Merge pull request #1479 from mattheww/2024-03_lifetime_tokens
Browse files Browse the repository at this point in the history
Lexer: say that lifetime-like tokens can't be immediately followed by '
  • Loading branch information
ehuss committed Mar 6, 2024
2 parents 1afcfd9 + 7bd81a6 commit 5440070
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -630,11 +630,14 @@ Examples of reserved forms:

> **<sup>Lexer</sup>**\
> LIFETIME_TOKEN :\
> &nbsp;&nbsp; &nbsp;&nbsp; `'` [IDENTIFIER_OR_KEYWORD][identifier]\
> &nbsp;&nbsp; &nbsp;&nbsp; `'` [IDENTIFIER_OR_KEYWORD][identifier]
> _(not immediately followed by `'`)_\
> &nbsp;&nbsp; | `'_`
> _(not immediately followed by `'`)_
>
> LIFETIME_OR_LABEL :\
> &nbsp;&nbsp; &nbsp;&nbsp; `'` [NON_KEYWORD_IDENTIFIER][identifier]
> _(not immediately followed by `'`)_
Lifetime parameters and [loop labels] use LIFETIME_OR_LABEL tokens. Any
LIFETIME_TOKEN will be accepted by the lexer, and for example, can be used in
Expand Down

0 comments on commit 5440070

Please sign in to comment.