nl_tokens: Redirect edges so that target is the root of its subtree .
pl_tokens: function redirect ( v ) { var edges = tree . inEdges ( v ) ; for ( var i in edges ) { var e = edges [ i ] ; var u = tree . source ( e ) ; var <mask> = tree . edge ( e ) ; redirect ( u ) ; tree . delEdge ( e ) ; value . reversed = ! value . reversed ; tree . addEdge ( e , v , u , value ) ; } }