]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40334: Catch E_EOF error, when the tokenizer returns ERRORTOKEN (GH-19743)
authorLysandros Nikolaou <lisandrosnik@gmail.com>
Tue, 28 Apr 2020 00:23:35 +0000 (03:23 +0300)
committerGitHub <noreply@github.com>
Tue, 28 Apr 2020 00:23:35 +0000 (01:23 +0100)
commitd55133f49fe678fbf047a647aa8bb8b520410e8d
treedb31a77eb0f6afec122315b46c74597f1f4f9441
parent5d1f32d33ba24d0aa87235ae40207bb57778388b
bpo-40334: Catch E_EOF error, when the tokenizer returns ERRORTOKEN (GH-19743)

An E_EOF error was only being caught after the parser exited before this commit. There are some cases though, where the tokenizer returns ERRORTOKEN *and* has set an E_EOF error (like when EOF directly follows a line continuation character) which weren't correctly handled before.
Lib/test/test_eof.py
Parser/pegen/pegen.c