public void emitRetainedVars(GenerateJsVisitor gen){
  if (!retainedVars.isEmpty()) {
    gen.out("var ");
    boolean first=true;
    for (    String varName : retainedVars) {
      if (!first) {
        gen.out(",");
      }
      first=false;
      gen.out(varName);
    }
    gen.endLine(true);
    retainedVars.clear();
  }
}

public void emitRetainedVars ( GenerateJsVisitor gen ) { if ( ! retainedVars . isEmpty ( ) ) { gen . out ( "var " ) ; boolean first = true ; for ( String varName : retainedVars ) { if ( ! first ) { gen . out ( "," ) ; } first = false ; gen . out ( varName ) ; } gen . endLine ( true ) ; retainedVars . clear ( ) ; } }
writes all retained variables to the output of the specified generator , then clears them .
