equal
deleted
inserted
replaced
715 return _hashre.match(symbol) |
715 return _hashre.match(symbol) |
716 |
716 |
717 def gethashlikesymbols(tree): |
717 def gethashlikesymbols(tree): |
718 """returns the list of symbols of the tree that look like hashes |
718 """returns the list of symbols of the tree that look like hashes |
719 |
719 |
720 >>> gethashlikesymbols(('dagrange', ('symbol', '3'), ('symbol', 'abe3ff'))) |
720 >>> gethashlikesymbols(parse(b'3::abe3ff')) |
721 ['3', 'abe3ff'] |
721 ['3', 'abe3ff'] |
722 >>> gethashlikesymbols(('func', ('symbol', 'precursors'), ('symbol', '.'))) |
722 >>> gethashlikesymbols(parse(b'precursors(.)')) |
723 [] |
723 [] |
724 >>> gethashlikesymbols(('func', ('symbol', 'precursors'), ('symbol', '34'))) |
724 >>> gethashlikesymbols(parse(b'precursors(34)')) |
725 ['34'] |
725 ['34'] |
726 >>> gethashlikesymbols(('symbol', 'abe3ffZ')) |
726 >>> gethashlikesymbols(parse(b'abe3ffZ')) |
727 [] |
727 [] |
728 """ |
728 """ |
729 if not tree: |
729 if not tree: |
730 return [] |
730 return [] |
731 |
731 |