From 99b4ed59e0480764efa66b371871dbdb99f7ee48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Br=C3=A1ulio=20Bezerra?= Date: Tue, 5 Sep 2017 11:12:14 -0300 Subject: [PATCH 1/2] Non-ASCII chars in identifiers aren't supported yet --- src/identifiers.md | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/src/identifiers.md b/src/identifiers.md index f6d2a8fb818c5..a27ad91120e33 100644 --- a/src/identifiers.md +++ b/src/identifiers.md @@ -2,10 +2,34 @@ > **Lexer:** > IDENTIFIER : ->       XID_start XID_continue\* ->    | `_` XID_continue+ +>       [`a`-`z` `A`-`Z`] [`a`-`z` `A`-`Z` `0`-`9` `_`]\* +>    | `_` [`a`-`z` `A`-`Z` `0`-`9` `_`]+ -An identifier is any nonempty Unicode[^non_ascii_idents] string of the following form: +An identifier is any nonempty ASCII[^non_ascii_idents] string of the following form: + +Either + + * The first character is a letter + * The remaining characters are alphanumeric or `_` + +Or + + * The first character is `_` + * The identifier is more than one character, `_` alone is not an identifier + * The remaining characters are alphanumeric or `_` + +[keywords]: keywords.html + +[^non_ascii_idents] Non-ASCII characters in identifiers are currently feature-gated. See [issue #28979](https://github.com/rust-lang/rust/issues/28979). + + From 0e4342e868efbf5d5b73d2e8d89ad3c376d73086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Br=C3=A1ulio=20Bezerra?= Date: Thu, 12 Oct 2017 23:16:35 -0300 Subject: [PATCH 2/2] Removed unstable commented out text --- src/identifiers.md | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/src/identifiers.md b/src/identifiers.md index a27ad91120e33..51102137c7fe7 100644 --- a/src/identifiers.md +++ b/src/identifiers.md @@ -18,37 +18,4 @@ Or * The identifier is more than one character, `_` alone is not an identifier * The remaining characters are alphanumeric or `_` -[keywords]: keywords.html - [^non_ascii_idents] Non-ASCII characters in identifiers are currently feature-gated. See [issue #28979](https://github.com/rust-lang/rust/issues/28979). - -