@ Override public String toSource ( ) { return runInCompilerThread ( ( ) -> { Tracer tracer = newTracer ( "toSource" ) ; try { CodeBuilder cb = new CodeBuilder ( ) ; if ( jsRoot != null ) { int i = 0 ; if ( options . shouldPrintExterns ( ) ) { for ( Node scriptNode = externsRoot . getFirstChild ( ) ; scriptNode != null ; scriptNode = scriptNode . getNext ( ) ) { toSource ( cb , i ++ , scriptNode ) ; } } for ( Node scriptNode = jsRoot . getFirstChild ( ) ; scriptNode != null ; scriptNode = scriptNode . getNext ( ) ) { toSource ( cb , i ++ , scriptNode ) ; } } return cb . toString ( ) ; } finally { stopTracer ( tracer , "toSource" ) ; } } ) ; }
Converts the main parse tree back to JS code .