]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40334: Disallow invalid single statements in the new parser (GH-19774)
authorLysandros Nikolaou <lisandrosnik@gmail.com>
Wed, 29 Apr 2020 01:42:27 +0000 (04:42 +0300)
committerGitHub <noreply@github.com>
Wed, 29 Apr 2020 01:42:27 +0000 (02:42 +0100)
commit6d6508765514c7c10719478a0430f5e47c9a96ac
treecab1123e87fe03272d86dae862cf335d9e709e81
parenta4dfe8ede5a37576e17035dccfe109ba7752237e
bpo-40334: Disallow invalid single statements in the new parser (GH-19774)

After parsing is done in single statement mode, the tokenizer buffer has to be checked for additional lines and a `SyntaxError` must be raised, in case there are any.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Lib/test/test_compile.py
Parser/pegen/pegen.c