summaryrefslogtreecommitdiffstats
path: root/Tools/peg_generator/pegen/python_generator.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/peg_generator/pegen/python_generator.py')
-rw-r--r--Tools/peg_generator/pegen/python_generator.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Tools/peg_generator/pegen/python_generator.py b/Tools/peg_generator/pegen/python_generator.py
index 45a7597..b786de7 100644
--- a/Tools/peg_generator/pegen/python_generator.py
+++ b/Tools/peg_generator/pegen/python_generator.py
@@ -217,6 +217,9 @@ class PythonParserGenerator(ParserGenerator, GrammarVisitor):
else:
self.print("and")
self.visit(item)
+ if is_gather:
+ self.print("is not None")
+
self.print("):")
with self.indent():
action = node.action