nl_tokens: Compile ES6 source code with Traceur .
pl_tokens: function compile ( content , options ) { options = merge ( { outputLanguage : 'es5' , modules : 'commonjs' , filename : '<unknown file>' , sourceMap : false , cwd : process . cwd ( ) , moduleName : <mask> } , options || { } ) ; var moduleName = options . moduleName ; traceurOptions . reset ( ) ; merge ( traceurOptions , options ) ; var errorReporter = new ErrorReporter ( ) ; var sourceFile = new SourceFile ( options . filename , content ) ; var parser = new Parser ( sourceFile , errorReporter ) ; var tree = parser . parseModule ( ) ; var transformer ; if ( moduleName === true || options . modules == 'register' || options . modules == 'inline' ) { moduleName = options . filename . replace ( / \.js$ / , '' ) ; moduleName = path . relative ( options . cwd , moduleName ) . replace ( / \\ / g , '/' ) ; } if ( moduleName ) { transformer = new AttachModuleNameTransformer ( moduleName ) ; tree = transformer . transformAny ( tree ) ; } if ( options . outputLanguage . toLowerCase ( ) === 'es6' ) { transformer = new PureES6Transformer ( errorReporter ) ; } else { transformer = new FromOptionsTransformer ( errorReporter ) ; } var transformedTree = transformer . transform ( tree ) ; if ( errorReporter . hadError ( ) ) { return { js : null , errors : errorReporter . errors , sourceMap : null } ; } var treeWriterOptions = { } ; if ( options . sourceMap ) { treeWriterOptions . sourceMapGenerator = new SourceMapGenerator ( { file : options . filename , sourceRoot : null } ) ; } return { js : TreeWriter . write ( transformedTree , treeWriterOptions ) , errors : errorReporter . errors , sourceMap : treeWriterOptions . sourceMap || null } ; }