nl_tokens: A way to inherit one class from another in a consisstent way ( more or less )
pl_tokens: function inherit ( child , parent ) { // copy over all parent properties for ( var key in parent ) { if ( { } . hasOwnProperty . call ( <mask> , key ) ) { child [ key ] = parent [ key ] ; } } // give child `class` a place to define its own methods function ctor ( ) { this . constructor = child ; if ( MXI_DEBUG ) { var getCtorName = function ( fn ) { var m = fn . toString ( ) . match ( / ^function\s([^\(\s]+) / ) ; return m ? m [ 1 ] : false ; } ; this . ctorName = getCtorName ( child ) ; } } ctor . prototype = parent . prototype ; child . prototype = new ctor ( ) ; // keep a way to reference parent methods child . parent = parent . prototype ; return child ; }