C++, code cleanup.

This commit is contained in:
Jakob Lykke Andersen 2015-09-06 16:01:34 +02:00
parent 89c3dd81c3
commit 45a8169184

View File

@ -871,6 +871,7 @@ class ASTTemplateArgs(ASTBase):
a.describe_signature(signode, 'markType', env, symbol=symbol)
signode += nodes.Text('>')
class ASTNestedNameElement(ASTBase):
def __init__(self, identifier, templateArgs):
self.identifier = identifier
@ -986,6 +987,7 @@ class ASTNestedName(ASTBase):
else:
raise Exception('Unknown description mode: %s' % mode)
class ASTTrailingTypeSpecFundamental(ASTBase):
def __init__(self, name):
self.name = name
@ -2105,7 +2107,7 @@ class Symbol(object):
def get_full_nested_name(self):
names = []
for nne, _ in self.get_lookup_key():
for nne, templateParams in self.get_lookup_key():
names.append(nne)
return ASTNestedName(names, rooted=False)
@ -3239,7 +3241,7 @@ class CPPObject(ObjectDescription):
if s is not None:
# something is already declared with that name
return
_ = Symbol(parent=targetSymbol, identifier=symbol.identifier,
Symbol(parent=targetSymbol, identifier=symbol.identifier,
templateParams=None, templateArgs=None,
declaration=symbol.declaration.clone())
@ -3496,7 +3498,7 @@ class CPPDomain(Domain):
'enumerator': CPPXRefRole()
}
initial_data = {
'rootSymbol' : Symbol(None, None, None, None, None),
'rootSymbol': Symbol(None, None, None, None, None),
'names': {} # full name for indexing -> docname
}