summaryrefslogtreecommitdiffstats
path: root/Parser/tokenizer.c
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2007-02-23 19:56:57 (GMT)
committerThomas Wouters <thomas@python.org>2007-02-23 19:56:57 (GMT)
commit00e41defe8801ef37548fb60abacb3be13156d2a (patch)
tree863d072e568fee2b8f4959016b5954de457c7f4c /Parser/tokenizer.c
parentcf297e46b85257396560774e5492e9d71a40f32e (diff)
downloadcpython-00e41defe8801ef37548fb60abacb3be13156d2a.zip
cpython-00e41defe8801ef37548fb60abacb3be13156d2a.tar.gz
cpython-00e41defe8801ef37548fb60abacb3be13156d2a.tar.bz2
Bytes literal.
Diffstat (limited to 'Parser/tokenizer.c')
-rw-r--r--Parser/tokenizer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 84b7232..84bd60e 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -1244,6 +1244,14 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end)
if (c == '"' || c == '\'')
goto letter_quote;
break;
+ case 'b':
+ case 'B':
+ c = tok_nextc(tok);
+ if (c == 'r' || c == 'R')
+ c = tok_nextc(tok);
+ if (c == '"' || c == '\'')
+ goto letter_quote;
+ break;
}
while (isalnum(c) || c == '_') {
c = tok_nextc(tok);