def check_visit(expr): ef = ExprFunctor() try: ef.visit(expr) assert False except NotImplementedError: pass em = ExprMutator() assert em.visit(expr)
def check_visit(expr): try: ef = ExprFunctor() ef.visit(expr) assert False except NotImplementedError: pass ev = ExprVisitor() ev.visit(expr) em = ExprMutator() assert em.visit(expr)
def __init__(self): ExprFunctor.__init__(self)