def disallow(nodes):
 def disallowed(cls):
  cls.unsupported_nodes = ()
  for node in nodes:
   new_method = _node_not_implemented(node, cls)
   name = 'visit_{0}'.format(node)
   cls.unsupported_nodes += (name,)
   setattr(cls, name, new_method)
  return cls
 return disallowed

def disallow ( nodes ) : def disallowed ( cls ) : cls . unsupported_nodes = ( ) for node in nodes : new_method = _node_not_implemented ( node , cls ) name = 'visit_{0}' . format ( node ) cls . unsupported_nodes += ( name , ) setattr ( cls , name , new_method ) return cls return disallowed
decorator to disallow certain nodes from parsing .