Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(394)

Unified Diff: Parser/tokenizer.c

Issue 15096: Drop support for the "ur" string prefix
Patch Set: Created 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« Lib/test/test_tokenize.py ('K') | « Misc/NEWS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -1412,7 +1412,7 @@
/* 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 @@
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;
« Lib/test/test_tokenize.py ('K') | « Misc/NEWS ('k') | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7