def add_declaration(self, declaration: ASTDeclaration, docname: str) -> 'Symbol':
    if Symbol.debug_lookup:
        Symbol.debug_indent += 1
        Symbol.debug_print('add_declaration:')
    assert declaration
    assert docname
    nestedName = declaration.name
    if declaration.templatePrefix:
        templateDecls = declaration.templatePrefix.templates
    else:
        templateDecls = []
    res = self._add_symbols(nestedName, templateDecls, declaration, docname)
    if Symbol.debug_lookup:
        Symbol.debug_indent -= 1
    return res
def add_declaration(self, declaration: ASTDeclaration, docname: str) -> 'Symbol':
    if Symbol.debug_lookup:
        Symbol.debug_indent += 1
        Symbol.debug_print('add_declaration:')
    assert declaration
    assert docname
    nestedName = declaration.name
    if declaration.templatePrefix:
        templateDecls = declaration.templatePrefix.templates
    else:
        templateDecls = []
    res = self._add_symbols(nestedName, templateDecls, declaration, docname)
    if Symbol.debug_lookup:
        Symbol.debug_indent -= 1
    return res