def find_identifier(self, identOrOp: Union[(ASTIdentifier, ASTOperator)], matchSelf: bool, recurseInAnon: bool, searchInSiblings: bool) -> 'Symbol':
    if Symbol.debug_lookup:
        Symbol.debug_indent += 1
        Symbol.debug_print('find_identifier:')
        Symbol.debug_indent += 1
        Symbol.debug_print('identOrOp:       ', identOrOp)
        Symbol.debug_print('matchSelf:       ', matchSelf)
        Symbol.debug_print('recurseInAnon:   ', recurseInAnon)
        Symbol.debug_print('searchInSiblings:', searchInSiblings)
        print(self.to_string((Symbol.debug_indent + 1)), end='')
        Symbol.debug_indent -= 2
    current = self
    while (current is not None):
        if Symbol.debug_lookup:
            Symbol.debug_indent += 2
            Symbol.debug_print('trying:')
            print(current.to_string((Symbol.debug_indent + 1)), end='')
            Symbol.debug_indent -= 2
        if (matchSelf and (current.identOrOp == identOrOp)):
            return current
        children = (current.children_recurse_anon if recurseInAnon else current._children)
        for s in children:
            if (s.identOrOp == identOrOp):
                return s
        if (not searchInSiblings):
            break
        current = current.siblingAbove
    return None
def find_identifier(self, identOrOp: Union[(ASTIdentifier, ASTOperator)], matchSelf: bool, recurseInAnon: bool, searchInSiblings: bool) -> 'Symbol':
    if Symbol.debug_lookup:
        Symbol.debug_indent += 1
        Symbol.debug_print('find_identifier:')
        Symbol.debug_indent += 1
        Symbol.debug_print('identOrOp:       ', identOrOp)
        Symbol.debug_print('matchSelf:       ', matchSelf)
        Symbol.debug_print('recurseInAnon:   ', recurseInAnon)
        Symbol.debug_print('searchInSiblings:', searchInSiblings)
        print(self.to_string((Symbol.debug_indent + 1)), end=)
        Symbol.debug_indent -= 2
    current = self
    while (current is not None):
        if Symbol.debug_lookup:
            Symbol.debug_indent += 2
            Symbol.debug_print('trying:')
            print(current.to_string((Symbol.debug_indent + 1)), end=)
            Symbol.debug_indent -= 2
        if (matchSelf and (current.identOrOp == identOrOp)):
            return current
        children = (current.children_recurse_anon if recurseInAnon else current._children)
        for s in children:
            if (s.identOrOp == identOrOp):
                return s
        if (not searchInSiblings):
            break
        current = current.siblingAbove
    return None