code: ParseResult compileMinimallyForHeaders() {
      resetErrorReporter();
      ParseResult result =
          parse(
              passManagerBuilder()
                  // ResolveExpressionTypesPass resolve types (specifically on default parameter
                  // values) which is necessary for template metadatas
                  .addPassContinuationRule(
                      ResolveExpressionTypesPass.class, PassContinuationRule.STOP_AFTER_PASS)
                  .allowV1Expression(),
              typeRegistry);
  
      throwIfErrorsPresent();
      reportWarnings();
      return result;
    }
docs: Performs the minimal amount of work needed to calculate TemplateMetadata objects for header
  compilation.