code: private SoyFileNode parseSoyFileHelper(SoyFileSupplier soyFileSupplier, IdGenerator nodeIdGen)
        throws IOException {
      // See copious comments above on this test
      if (soyFileSupplier instanceof HasAstOrErrors) {
        return ((HasAstOrErrors) soyFileSupplier).getAst(nodeIdGen, errorReporter());
      } else {
        try (Reader soyFileReader = soyFileSupplier.open()) {
          String filePath = soyFileSupplier.getFilePath();
          int lastBangIndex = filePath.lastIndexOf('!');
          if (lastBangIndex != -1) {
            // This is a resource in a JAR file. Only keep everything after the bang.
            filePath = filePath.substring(lastBangIndex + 1);
          }
          // Think carefully before adding new parameters to the parser.
          // Currently the only parameters are the id generator, the file, and the errorReporter.
          // This
          // ensures that the file be cached without worrying about other compiler inputs.
          return new SoyFileParser(nodeIdGen, soyFileReader, filePath, errorReporter())
              .parseSoyFile();
        }
      }
    }
docs: Private helper for {@code parseWithVersions()} to parse one Soy file.
  
  @param soyFileSupplier Supplier of the Soy file content and path.
  @param nodeIdGen The generator of node ids.
  @return The resulting parse tree for one Soy file and the version from which it was parsed.