From 5026cb4dc6477c81c465c8d0f3a1e6c5344d20c5 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 25 Apr 1997 17:32:00 +0000 Subject: Now that the string-sig has settled on r"obin" strings, restrict the notation to 'r' and 'R'. --- Parser/tokenizer.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 3bf0fee..9f26840 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -541,9 +541,13 @@ tok_get(tok, p_start, p_end) /* Identifier (most frequent token!) */ if (isalpha(c) || c == '_') { - c = tok_nextc(tok); - if (c == '"' || c == '\'') - goto letter_quote; + switch (c) { + case 'r': + case 'R': + c = tok_nextc(tok); + if (c == '"' || c == '\'') + goto letter_quote; + } while (isalnum(c) || c == '_') { c = tok_nextc(tok); } -- cgit v0.12