code: protected void runStatements(Reader reader, PrintStream out)
              throws IOException {
          log.debug("runStatements()");
          StringBuilder txt = new StringBuilder();
          String line = "";
          BufferedReader in = new BufferedReader(reader);
  
          while ((line = in.readLine()) != null) {
              line = getProject().replaceProperties(line);
              if (line.indexOf("--") >= 0) {
                  txt.append("\n");
              }
          }
          // Catch any statements not followed by ;
          if (!txt.toString().equals("")) {
              execGroovy(txt.toString(), out);
          }
      }
docs: Read in lines and execute them.
  
  @param reader the reader from which to get the groovy source to exec
  @param out    the outputstream to use
  @throws java.io.IOException if something goes wrong