nl_tokens: Asynchronously compiles tokens and invoke callback ( err compiled ) with compiled as an array .
pl_tokens: function compileTokenArray ( tokens , compiler , callback ) { var acc = [ ] ; var index = 0 ; function compileOne ( token , next ) { token . compile ( compiler , function onCompiled ( err , compiled ) { if ( <mask> ) return next ( err ) ; acc . push ( compiled ) ; next ( null , compiled ) ; } ) ; index ++ ; } function done ( err ) { if ( err ) return callback ( err ) ; callback ( null , acc ) ; } asyncForEach ( tokens , compileOne , done ) ; }