code: protected JCStatement classOrInterfaceOrEnumDeclaration(JCModifiers mods, Comment dc) {
          if (token.kind == CLASS) {
              return classDeclaration(mods, dc);
          } else if (token.kind == INTERFACE) {
              return interfaceDeclaration(mods, dc);
          } else if (token.kind == ENUM) {
              return enumDeclaration(mods, dc);
          } else {
              int pos = token.pos;
              List<JCTree> errs;
              if (LAX_IDENTIFIER.accepts(token.kind)) {
                  errs = List.of(mods, toP(F.at(pos).Ident(ident())));
                  setErrorEndPos(token.pos);
              } else {
                  errs = List.of(mods);
              }
              final JCErroneous erroneousTree;
              if (parseModuleInfo) {
                  erroneousTree = syntaxError(pos, errs, "expected.module.or.open");
              } else {
                  erroneousTree = syntaxError(pos, errs, "expected3", CLASS, INTERFACE, ENUM);
              }
              return toP(F.Exec(erroneousTree));
          }
      }
docs: ClassOrInterfaceOrEnumDeclaration = ModifiersOpt
  (ClassDeclaration | InterfaceDeclaration | EnumDeclaration)
  @param mods     Any modifiers starting the class or interface declaration
  @param dc       The documentation comment for the class, or null.