mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-104169: Fix test_peg_generator after tokenizer refactoring (#110727)
* Fix test_peg_generator after tokenizer refactoring * Remove references to tokenizer.c in comments etc.
This commit is contained in:
parent
23645420dc
commit
17d65547df
10 changed files with 24 additions and 14 deletions
|
|
@ -14,8 +14,9 @@ static int
|
|||
warn_invalid_escape_sequence(Parser *p, const char *first_invalid_escape, Token *t)
|
||||
{
|
||||
unsigned char c = *first_invalid_escape;
|
||||
if ((t->type == FSTRING_MIDDLE || t->type == FSTRING_END) && (c == '{' || c == '}')) { // in this case the tokenizer has already emitted a warning,
|
||||
// see tokenizer.c:warn_invalid_escape_sequence
|
||||
if ((t->type == FSTRING_MIDDLE || t->type == FSTRING_END) && (c == '{' || c == '}')) {
|
||||
// in this case the tokenizer has already emitted a warning,
|
||||
// see Parser/tokenizer/helpers.c:warn_invalid_escape_sequence
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue