diff options
author | Eli Bendersky <eliben@gmail.com> | 2021-09-25 06:53:41 -0700 |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2021-09-25 06:53:41 -0700 |
commit | 007e79e5ba45d3f3c4325578a91f7786a7b88cfb (patch) | |
tree | d75c1a7b2870d770ccec315818e8ac2c716e5776 | |
parent | fea063c7e781cf1d507036179145b4b24f13b805 (diff) | |
download | pycparser-007e79e5ba45d3f3c4325578a91f7786a7b88cfb.tar.gz |
Simplify usage of _add_declaration_specifier
-rw-r--r-- | pycparser/c_parser.py | 3 |
1 files changed, 1 insertions, 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 |