docs: public final boolean stringIsCompilableUnit(String source) {
          boolean errorseen = false;
          CompilerEnvirons compilerEnv = new CompilerEnvirons();
          compilerEnv.initFromContext(this);
          // no source name or source text manager, because we're just
          // going to throw away the result.
          compilerEnv.setGeneratingSource(false);
          Parser p = new Parser(compilerEnv, DefaultErrorReporter.instance);
          try {
              p.parse(source, null, 1);
          } catch (EvaluatorException ee) {
              errorseen = true;
          }
          // Return false only if an error occurred as a result of reading past
          // the end of the file, i.e. if the source could be fixed by
          // appending more source.
          return !(errorseen && p.eof());
      }