def candidates() -> Generator[(Symbol, None, None)]:
    s = self
    if Symbol.debug_lookup:
        Symbol.debug_print('searching in self:')
        print(s.to_string((Symbol.debug_indent + 1)), end='')
    while True:
        if matchSelf:
            (yield s)
        if recurseInAnon:
            (yield from s.children_recurse_anon)
        else:
            (yield from s._children)
        if (s.siblingAbove is None):
            break
        s = s.siblingAbove
        if Symbol.debug_lookup:
            Symbol.debug_print('searching in sibling:')
            print(s.to_string((Symbol.debug_indent + 1)), end='')
def candidates() -> Generator[(Symbol, None, None)]:
    s = self
    if Symbol.debug_lookup:
        Symbol.debug_print('searching in self:')
        print(s.to_string((Symbol.debug_indent + 1)), end=)
    while True:
        if matchSelf:
            (yield s)
        if recurseInAnon:
            (yield from s.children_recurse_anon)
        else:
            (yield from s._children)
        if (s.siblingAbove is None):
            break
        s = s.siblingAbove
        if Symbol.debug_lookup:
            Symbol.debug_print('searching in sibling:')
            print(s.to_string((Symbol.debug_indent + 1)), end=)