mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
bpo-40176: Improve error messages for unclosed string literals (GH-19346)
Automerge-Triggered-By: GH:isidentical
This commit is contained in:
parent
c3f167d7b2
commit
a698d52c39
7 changed files with 34 additions and 32 deletions
|
@ -327,12 +327,6 @@ tokenizer_error(Parser *p)
|
|||
case E_TOKEN:
|
||||
msg = "invalid token";
|
||||
break;
|
||||
case E_EOFS:
|
||||
RAISE_SYNTAX_ERROR("EOF while scanning triple-quoted string literal");
|
||||
return -1;
|
||||
case E_EOLS:
|
||||
RAISE_SYNTAX_ERROR("EOL while scanning string literal");
|
||||
return -1;
|
||||
case E_EOF:
|
||||
if (p->tok->level) {
|
||||
raise_unclosed_parentheses_error(p);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue