Merge pull request #1479 from mattheww/2024-03_lifetime_tokens

Lexer: say that lifetime-like tokens can't be immediately followed by '
This commit is contained in:
Eric Huss 2024-03-06 19:01:19 +00:00 committed by GitHub
commit 54400709b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -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