

def __search(node, coll=None):
    if (coll is None):
        coll = set()
    if ((node.type == 'assign') and (node[0].type == 'dot')):
        if (node[0][1].type == 'identifier'):
            name = node[0][1].value
            if ((type(name) is str) and __matcher.match(name)):
                coll.add(name)
    elif (node.type == 'property_init'):
        name = node[0].value
        if ((type(name) is str) and __matcher.match(name)):
            coll.add(name)
    for child in node:
        if (child != None):
            __search(child, coll)
    return coll

dataset/ETHPy150Open zynga/jasy/jasy/js/optimize/CryptPrivates.py __search/original