Skip to content

Commit

Permalink
Merge pull request #395 from alexreg/raw-identifiers
Browse files Browse the repository at this point in the history
Updated section on identifiers for raw identifiers
  • Loading branch information
Havvy committed Aug 21, 2018
2 parents 0b877de + 25227b4 commit b492524
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/identifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
> &nbsp;&nbsp; &nbsp;&nbsp; [`a`-`z` `A`-`Z`]&nbsp;[`a`-`z` `A`-`Z` `0`-`9` `_`]<sup>\*</sup>\
> &nbsp;&nbsp; | `_` [`a`-`z` `A`-`Z` `0`-`9` `_`]<sup>+</sup>
>
> RAW_IDENTIFIER : `r#` IDENTIFIER_OR_KEYWORD <sub>*Except `crate`, `extern`, `self`, `super`, `Self`*</sub>
>
> IDENTIFIER :\
> IDENTIFIER_OR_KEYWORD <sub>*Except a [strict] or [reserved] keyword*</sub>
> IDENTIFIER_OR_KEYWORD <sub>*Except a [strict] or [reserved] keyword*</sub> | RAW_IDENTIFIER
An identifier is any nonempty ASCII string of the following form:

Expand All @@ -21,5 +23,10 @@ Or
* The identifier is more than one character. `_` alone is not an identifier.
* The remaining characters are alphanumeric or `_`.

A raw identifier is like a normal identifier, but prefixed by `r#`. (Note that
the `r#` prefix is not included as part of the actual identifier.)
Unlike a normal identifier, a raw identifier may be any strict or reserved
keyword except the ones listed above for `RAW_IDENTIFIER`.

[strict]: keywords.html#strict-keywords
[reserved]: keywords.html#reserved-keywords

0 comments on commit b492524

Please sign in to comment.