summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorLysandros Nikolaou <lisandrosnik@gmail.com>2023-10-12 07:34:35 (GMT)
committerGitHub <noreply@github.com>2023-10-12 07:34:35 (GMT)
commit17d65547df55eaefe077c45242a7f2d175961dfd (patch)
tree008f24ce995cd5e0a88f35bba06c8ea7ad76f19b /Parser
parent23645420dcc4f3b7b2ec4045ef6ac126c37a98c2 (diff)
downloadcpython-17d65547df55eaefe077c45242a7f2d175961dfd.zip
cpython-17d65547df55eaefe077c45242a7f2d175961dfd.tar.gz
cpython-17d65547df55eaefe077c45242a7f2d175961dfd.tar.bz2
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.
Diffstat (limited to 'Parser')
-rw-r--r--Parser/myreadline.c4
-rw-r--r--Parser/string_parser.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/Parser/myreadline.c b/Parser/myreadline.c
index 719a178..1825665 100644
--- a/Parser/myreadline.c
+++ b/Parser/myreadline.c
@@ -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)
diff --git a/Parser/string_parser.c b/Parser/string_parser.c
index c5f4218..f1e0277 100644
--- a/Parser/string_parser.c
+++ b/Parser/string_parser.c
@@ -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;
}