diff options
| author | Guido van Rossum <guido@python.org> | 1997-04-25 17:32:00 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1997-04-25 17:32:00 +0000 |
| commit | 5026cb4dc6477c81c465c8d0f3a1e6c5344d20c5 (patch) | |
| tree | 5c701da80226717c303fe1694712685635f5e746 /Parser | |
| parent | c474deaaf63deb633bf9bc951c8cc1cd5d107eda (diff) | |
| download | cpython-git-5026cb4dc6477c81c465c8d0f3a1e6c5344d20c5.tar.gz | |
Now that the string-sig has settled on r"obin" strings, restrict the
<letter><string> notation to 'r' and 'R'.
Diffstat (limited to 'Parser')
| -rw-r--r-- | Parser/tokenizer.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 3bf0fee0c7..9f268402d5 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); } |
