code: public List<String> genJsSrc(
        SoyFileSetNode soyTree,
        TemplateRegistry registry,
        SoyIncrementalDomSrcOptions options,
        ErrorReporter errorReporter) {
  
      SoyJsSrcOptions incrementalJSSrcOptions = options.toJsSrcOptions();
  
      BidiGlobalDir bidiGlobalDir =
          SoyBidiUtils.decodeBidiGlobalDirFromJsOptions(
              incrementalJSSrcOptions.getBidiGlobalDir(),
              incrementalJSSrcOptions.getUseGoogIsRtlForBidiGlobalDir());
      try (SoyScopedData.InScope inScope = apiCallScope.enter(/* msgBundle= */ null, bidiGlobalDir)) {
        // Do the code generation.
  
        new HtmlContextVisitor().exec(soyTree);
        // If any errors are reported in {@code HtmlContextVisitor}, we should not continue.
        // Return an empty list here, {@code SoyFileSet} will throw an exception.
        if (errorReporter.hasErrors()) {
          return Collections.emptyList();
        }
  
        UnescapingVisitor.unescapeRawTextInHtml(soyTree);
  
        new RemoveUnnecessaryEscapingDirectives(bidiGlobalDir).run(soyTree);
        // some of the above passes may slice up raw text nodes, recombine them.
        new CombineConsecutiveRawTextNodesPass().run(soyTree);
        return createVisitor(
                incrementalJSSrcOptions,
                registry,
                typeRegistry,
                inScope.getBidiGlobalDir(),
                errorReporter)
            .gen(soyTree, registry, errorReporter);
      }
    }
docs: Generates Incremental DOM JS source code given a Soy parse tree, an options object, and an
  optional bundle of translated messages.
  
  @param soyTree The Soy parse tree to generate JS source code for.
  @param registry The template registry that contains all the template information.
  @param options The compilation options relevant to this backend.
  @param errorReporter The Soy error reporter that collects errors during code generation.
  @return A list of strings where each string represents the JS source code that belongs in one
  JS file. The generated JS files correspond one-to-one to the original Soy source files.