]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Fix 'gather' rules in the python parser generator (GH-22021)
authorPablo Galindo <Pablogsal@gmail.com>
Thu, 3 Sep 2020 14:29:55 +0000 (15:29 +0100)
committerGitHub <noreply@github.com>
Thu, 3 Sep 2020 14:29:55 +0000 (15:29 +0100)
commite55a0e971b4bf9e6473bf0ca6bebdff76c075ef6
tree5dca77a9c05b0075139bdbd4762a643f782e114e
parent315a61f7a9418d904e0eea14b1f054fac3a90e9f
Fix 'gather' rules in the python parser generator (GH-22021)

Currently, empty sequences in gather rules make the conditional for
gather rules fail as empty sequences evaluate as "False". We need to
explicitly check for "None" (the failure condition) to avoid false
negatives.
Lib/test/test_peg_generator/test_pegen.py
Tools/peg_generator/pegen/python_generator.py