Skip to content

Commit fcecf4b

Browse files
committed
revert the lineno pointer back to the string start
1 parent 10bdaa8 commit fcecf4b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Lib/test/test_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def bar():
238238
239239
def baz():
240240
'''quux'''
241-
""", 9, 20)
241+
""", 9, 24)
242242
check("pass\npass\npass\n(1+)\npass\npass\npass", 4, 4)
243243
check("(1+)", 1, 4)
244244

Parser/tokenizer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,6 +1743,7 @@ tok_get(struct tok_state *tok, const char **p_start, const char **p_end)
17431743
tok->cur = (char *)tok->start;
17441744
tok->cur++;
17451745
tok->line_start = tok->multi_line_start;
1746+
tok->lineno = tok->first_lineno;
17461747
if (quote_size == 3) {
17471748
return syntaxerror(tok,
17481749
"unterminated triple-quoted string literal");

0 commit comments

Comments
 (0)