示例#1
0
文件: pair.py 项目: sadboy/AsdlPy
def eliminateUnused(tree):
    syms = du.UseFinder().run(tree)
    unneeded = lambda sym: ismeta(sym) or pat.isauxmap(sym) and sym not in syms
    du.EliminateUnused().run(tree, unneeded)
示例#2
0
文件: pair.py 项目: sadboy/AsdlPy
def ismemberaux(auxsym):
    return pat.isauxmap(auxsym) and ismember(auxsym.host)
示例#3
0
文件: pair.py 项目: sadboy/AsdlPy
def isfieldaux(auxsym):
    return pat.isauxmap(auxsym) and isfield(auxsym.host)
示例#4
0
文件: pair.py 项目: sadboy/AsdlPy
def isforward(auxsym):
    return (pat.isauxmap(auxsym) and
            dha.isBoundPat(auxsym.pat.elts[0]) and
            dha.isUnboundPat(auxsym.pat.elts[1]))