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
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
/* Readline interface for tokenizer.c and [raw_]input() in bltinmodule.c.
|
||||
/* Readline interface for the tokenizer and [raw_]input() in bltinmodule.c.
|
||||
By default, or when stdin is not a tty device, we have a super
|
||||
simple my_readline function using fgets.
|
||||
Optionally, we can use the GNU readline library.
|
||||
|
|
@ -364,7 +364,7 @@ PyOS_StdioReadline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt)
|
|||
char *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, const char *) = NULL;
|
||||
|
||||
|
||||
/* Interface used by tokenizer.c and bltinmodule.c */
|
||||
/* Interface used by file_tokenizer.c and bltinmodule.c */
|
||||
|
||||
char *
|
||||
PyOS_Readline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt)
|
||||
|
|
|
|||
|
|
@ -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