bridgepoint/oal.py
def track_production(f):
    '''
    decorator for adding positional information to returning nodes
    '''
    @wraps(f)
    def wrapper(self, p):
        r = f(self, p)
        node = p[0]
        if isinstance(node, Node) and len(p) > 1:
            set_positional_info(node, p)
        return r
    
    return wrapper
def track_production(f):
    '''
    decorator for adding positional information to returning nodes
    '''
    @wraps(f)
    def wrapper(self, p):
        r = f(self, p)
        node = p[0]
        if isinstance(node, Node) and len(p) > 1:
            set_positional_info(node, p)
        return r
    
    return wrapper
def track_production ( f ) : @ wraps ( f ) def wrapper ( self , p ) : r = f ( self , p ) node = p [ 0 ] if isinstance ( node , Node ) and len ( p ) > 1 : set_positional_info ( node , p ) return r return wrapper
decorator for adding positional information to returning nodes
decorator for adding positional information to returning nodes