https://github.com/python/cpython/commit/11217a883da324b85a290f5d78f090d8f4880f16
commit: 11217a883da324b85a290f5d78f090d8f4880f16
branch: main
author: chemelnucfin <[email protected]>
committer: picnixz <[email protected]>
date: 2025-08-30T11:28:44+02:00
summary:
gh-138257: Fix internal `RuleCollectorVisitor` attribute name (#138208)
The internal `RuleCollectorVisitor` class had an attribute named "rulses"
instead of "rules" that other `GrammarVisitor` subclasses define.
files:
M Tools/peg_generator/pegen/parser_generator.py
diff --git a/Tools/peg_generator/pegen/parser_generator.py
b/Tools/peg_generator/pegen/parser_generator.py
index 7dd56f98a652cc..976f5e6e57d7c6 100644
--- a/Tools/peg_generator/pegen/parser_generator.py
+++ b/Tools/peg_generator/pegen/parser_generator.py
@@ -45,7 +45,7 @@ class RuleCollectorVisitor(GrammarVisitor):
"""Visitor that invokes a provided callmaker visitor with just the
NamedItem nodes"""
def __init__(self, rules: Dict[str, Rule], callmakervisitor:
GrammarVisitor) -> None:
- self.rulses = rules
+ self.rules = rules
self.callmaker = callmakervisitor
def visit_Rule(self, rule: Rule) -> None:
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]