diff options
author | Christian Heimes <c.heimes@cheimes.de> | 2012-06-20 09:17:58 (GMT) |
---|---|---|
committer | Christian Heimes <c.heimes@cheimes.de> | 2012-06-20 09:17:58 (GMT) |
commit | 0b3847de6dbe451d38d8de940717a5a1f186c2e9 (patch) | |
tree | 62f54dd84693e7b25deae94699b8c240d824b806 /Parser/tokenizer.c | |
parent | 10c8791978203be95af2c4c1d7ce33496fac880c (diff) | |
download | cpython-0b3847de6dbe451d38d8de940717a5a1f186c2e9.zip cpython-0b3847de6dbe451d38d8de940717a5a1f186c2e9.tar.gz cpython-0b3847de6dbe451d38d8de940717a5a1f186c2e9.tar.bz2 |
Issue #15096: Drop support for the ur string prefix
Diffstat (limited to 'Parser/tokenizer.c')
-rw-r--r-- | Parser/tokenizer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 36ca079..93a4a5c 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -1412,7 +1412,7 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end) /* Identifier (most frequent token!) */ nonascii = 0; if (is_potential_identifier_start(c)) { - /* Process b"", r"", u"", br"", rb"" and ur"" */ + /* Process b"", r"", u"", br"" and rb"" */ int saw_b = 0, saw_r = 0, saw_u = 0; while (1) { if (!(saw_b || saw_u) && (c == 'b' || c == 'B')) @@ -1421,7 +1421,8 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end) want to support it in arbitrary order like byte literals. */ else if (!(saw_b || saw_u || saw_r) && (c == 'u' || c == 'U')) saw_u = 1; - else if (!saw_r && (c == 'r' || c == 'R')) + /* ur"" and ru"" are not supported */ + else if (!(saw_r || saw_u) && (c == 'r' || c == 'R')) saw_r = 1; else break; |