diff options
author | Jakob Lykke Andersen <Jakob@caput.dk> | 2020-10-11 15:05:07 +0300 |
---|---|---|
committer | Jakob Lykke Andersen <Jakob@caput.dk> | 2021-02-24 17:59:54 +0300 |
commit | 40f4db30e8943a1ea3bcb2c1726dbacbf6d419ac (patch) | |
tree | a5d81e076bc62682f5c9b654960ff1ab1958778d /sphinx/domains | |
parent | 17337a3257927fbd3e8aeeabd73201054e39331b (diff) |
C, remove dead code
Diffstat (limited to 'sphinx/domains')
-rw-r--r-- | sphinx/domains/c.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sphinx/domains/c.py b/sphinx/domains/c.py index 4909844cb..3693e536a 100644 --- a/sphinx/domains/c.py +++ b/sphinx/domains/c.py @@ -2693,15 +2693,9 @@ class DefinitionParser(BaseParser): def _parse_declarator_name_suffix( self, named: Union[bool, str], paramMode: str, typed: bool ) -> ASTDeclarator: + assert named in (True, False, 'single') # now we should parse the name, and then suffixes - if named == 'maybe': - pos = self.pos - try: - declId = self._parse_nested_name() - except DefinitionError: - self.pos = pos - declId = None - elif named == 'single': + if named == 'single': if self.match(identifier_re): if self.matched_text in _keywords: self.fail("Expected identifier, " @@ -2883,8 +2877,8 @@ class DefinitionParser(BaseParser): def _parse_type(self, named: Union[bool, str], outer: str = None) -> ASTType: """ - named=False|'maybe'|True: 'maybe' is e.g., for function objects which - doesn't need to name the arguments + named=False|'single'|True: 'single' is e.g., for function objects which + doesn't need to name the arguments, but otherwise is a single name """ if outer: # always named if outer not in ('type', 'member', 'function'): |