summaryrefslogtreecommitdiff
path: root/Parser/tokenizer.h
diff options
context:
space:
mode:
Diffstat (limited to 'Parser/tokenizer.h')
-rw-r--r--Parser/tokenizer.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Parser/tokenizer.h b/Parser/tokenizer.h
index cd18d25dc1..096ce687ec 100644
--- a/Parser/tokenizer.h
+++ b/Parser/tokenizer.h
@@ -38,6 +38,8 @@ struct tok_state {
int pendin; /* Pending indents (if > 0) or dedents (if < 0) */
const char *prompt, *nextprompt; /* For interactive prompting */
int lineno; /* Current line number */
+ int first_lineno; /* First line of a single line or multi line string
+ expression (cf. issue 16806) */
int level; /* () [] {} Parentheses nesting level */
/* Used to allow free continuations inside them */
#ifndef PGEN
@@ -58,6 +60,9 @@ struct tok_state {
char *encoding; /* Source encoding. */
int cont_line; /* whether we are in a continuation line. */
const char* line_start; /* pointer to start of current line */
+ const char* multi_line_start; /* pointer to start of first line of
+ a single line or multi line string
+ expression (cf. issue 16806) */
#ifndef PGEN
PyObject *decoding_readline; /* open(...).readline */
PyObject *decoding_buffer;