diff --git a/Tools/peg_generator/pegen/grammar_parser.py b/Tools/peg_generator/pegen/grammar_parser.py index 892df5cf8ccca1..de735649d46159 100644 --- a/Tools/peg_generator/pegen/grammar_parser.py +++ b/Tools/peg_generator/pegen/grammar_parser.py @@ -420,7 +420,7 @@ def named_item(self) -> Optional[NamedItem]: and (item := self.item()) ): - return NamedItem ( name . string , item , f"{type.string}*" ) + return NamedItem ( name . string , item , type . string + "*" ) self.reset(mark) if cut: return None cut = False diff --git a/Tools/peg_generator/pegen/metagrammar.gram b/Tools/peg_generator/pegen/metagrammar.gram index bb4355fd189e05..77695d5e0a91a0 100644 --- a/Tools/peg_generator/pegen/metagrammar.gram +++ b/Tools/peg_generator/pegen/metagrammar.gram @@ -84,7 +84,7 @@ items[NamedItemList]: | named_item { [named_item] } named_item[NamedItem]: - | NAME '[' type=NAME '*' ']' '=' ~ item {NamedItem(name.string, item, f"{type.string}*")} + | NAME '[' type=NAME '*' ']' '=' ~ item {NamedItem(name.string, item, type.string+"*")} | NAME '[' type=NAME ']' '=' ~ item {NamedItem(name.string, item, type.string)} | NAME '=' ~ item {NamedItem(name.string, item)} | item {NamedItem(None, item)}