diff options
author | Jakob Lykke Andersen <Jakob@caput.dk> | 2020-10-11 16:17:32 +0300 |
---|---|---|
committer | Jakob Lykke Andersen <Jakob@caput.dk> | 2021-02-24 17:59:54 +0300 |
commit | 088cef98bcb34522c2ec88c2fb4fd74199e2f10d (patch) | |
tree | 6850df561612551ad62805c06381068d53e7b044 /sphinx/domains | |
parent | 40f4db30e8943a1ea3bcb2c1726dbacbf6d419ac (diff) |
C, remove more dead code
Diffstat (limited to 'sphinx/domains')
-rw-r--r-- | sphinx/domains/c.py | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/sphinx/domains/c.py b/sphinx/domains/c.py index 3693e536a..79d4e145c 100644 --- a/sphinx/domains/c.py +++ b/sphinx/domains/c.py @@ -387,19 +387,6 @@ class ASTPostfixDec(ASTPostfixOp): signode.append(nodes.Text('--')) -class ASTPostfixMember(ASTPostfixOp): - def __init__(self, name): - self.name = name - - def _stringify(self, transform: StringifyTransform) -> str: - return '.' + transform(self.name) - - def describe_signature(self, signode: TextElement, mode: str, - env: "BuildEnvironment", symbol: "Symbol") -> None: - signode.append(nodes.Text('.')) - self.name.describe_signature(signode, 'noneIsName', env, symbol) - - class ASTPostfixMemberOfPointer(ASTPostfixOp): def __init__(self, name): self.name = name @@ -2256,7 +2243,7 @@ class DefinitionParser(BaseParser): # | postfix "[" expression "]" # | postfix "[" braced-init-list [opt] "]" # | postfix "(" expression-list [opt] ")" - # | postfix "." id-expression + # | postfix "." id-expression // taken care of in primary by nested name # | postfix "->" id-expression # | postfix "++" # | postfix "--" @@ -2274,17 +2261,6 @@ class DefinitionParser(BaseParser): self.fail("Expected ']' in end of postfix expression.") postFixes.append(ASTPostfixArray(expr)) continue - if self.skip_string('.'): - if self.skip_string('*'): - # don't steal the dot - self.pos -= 2 - elif self.skip_string('..'): - # don't steal the dot - self.pos -= 3 - else: - name = self._parse_nested_name() - postFixes.append(ASTPostfixMember(name)) - continue if self.skip_string('->'): if self.skip_string('*'): # don't steal the arrow |