nl_tokens: Capture type with the given regex .
pl_tokens: function ( type , regex ) { var cached = this . regex . create ( type , regex ) ; var lexer = this ; var fn = this . lexers [ type ] = function ( ) { var pos = lexer . position ( ) ; var m = lexer . match ( cached . val ) ; if ( ! m || ! m [ 0 ] ) return ; var parent = lexer . prev ( ) ; var node = pos ( { type : type , val : m [ 0 ] } ) ; utils . define ( <mask> , 'parent' , parent ) ; utils . define ( node , 'rawArgs' , m [ 1 ] ) ; utils . define ( node , 'args' , function ( ) { return utils . parseArgs ( m [ 1 ] ) ; } ) ; parent . nodes . push ( node ) ; } ; this . addLexer ( fn ) ; return this ; }