diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-07-22 13:01:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-22 13:01:36 (GMT) |
commit | b6ace7516b032068a8b539a6b312c50bdde7c012 (patch) | |
tree | 512b6eef8abc5f6909fb25e635d1581ce62d6492 /Parser | |
parent | e7757ab9e13b88a37c4490751782d010b0b44015 (diff) | |
download | cpython-b6ace7516b032068a8b539a6b312c50bdde7c012.zip cpython-b6ace7516b032068a8b539a6b312c50bdde7c012.tar.gz cpython-b6ace7516b032068a8b539a6b312c50bdde7c012.tar.bz2 |
[3.12] gh-106989: Remove tok report warnings (GH-106993) (#107013)
Co-authored-by: Menelaos Kotoglou <contact@menelaoskotoglou.com>
Diffstat (limited to 'Parser')
-rw-r--r-- | Parser/tokenizer.c | 5 | ||||
-rw-r--r-- | Parser/tokenizer.h | 1 |
2 files changed, 0 insertions, 6 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 115b497..7e246d2 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -117,7 +117,6 @@ tok_new(void) tok->implicit_newline = 0; tok->tok_mode_stack[0] = (tokenizer_mode){.kind =TOK_REGULAR_MODE, .f_string_quote='\0', .f_string_quote_size = 0, .f_string_debug=0}; tok->tok_mode_stack_index = 0; - tok->tok_report_warnings = 1; #ifdef Py_DEBUG tok->debug = _Py_GetConfig()->parser_debug; #endif @@ -1546,10 +1545,6 @@ static int warn_invalid_escape_sequence(struct tok_state *tok, int first_invalid_escape_char) { - if (!tok->tok_report_warnings) { - return 0; - } - PyObject *msg = PyUnicode_FromFormat( "invalid escape sequence '\\%c'", (char) first_invalid_escape_char diff --git a/Parser/tokenizer.h b/Parser/tokenizer.h index cb44845..1e1daa3 100644 --- a/Parser/tokenizer.h +++ b/Parser/tokenizer.h @@ -128,7 +128,6 @@ struct tok_state { // TODO: Factor this into its own thing tokenizer_mode tok_mode_stack[MAXFSTRINGLEVEL]; int tok_mode_stack_index; - int tok_report_warnings; int tok_extra_tokens; int comment_newline; int implicit_newline; |