def _type_reference(self):
"""A reference to a type.
The type may be already defined in place or just refered by name.
"""
identifier = (
self._typeof_expression()
# Inline struct definition.
# e.g. struct { int x; } foo;
| self._struct_definition_possibly_with_fields()
| self._enum_definition()
| self._numeric_type_identifier()
| self._compound_type_identifier()
| self._identifier()
)
return (
pyparsing.ZeroOrMore(_VOLATILE)
+ identifier
).setParseAction(self._create_type_reference)
评论列表
文章目录