From 007e79e5ba45d3f3c4325578a91f7786a7b88cfb Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Sat, 25 Sep 2021 06:53:41 -0700 Subject: Simplify usage of _add_declaration_specifier --- pycparser/c_parser.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pycparser/c_parser.py b/pycparser/c_parser.py index f9528f8..8fd8f16 100644 --- a/pycparser/c_parser.py +++ b/pycparser/c_parser.py @@ -920,8 +920,7 @@ class CParser(PLYParser): def p_specifier_qualifier_list_4(self, p): """ specifier_qualifier_list : type_qualifier_list type_specifier """ - spec = dict(qual=p[1], storage=[], type=[], function=[]) - p[0] = self._add_declaration_specifier(spec, p[2], 'type', append=True) + p[0] = dict(qual=p[1], storage=[], type=[p[2]], function=[]) # TYPEID is allowed here (and in other struct/enum related tag names), because # struct/enum tags reside in their own namespace and can be named the same as types -- cgit v1.2.1