code: 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 (allowEnums) {
              if (token.kind == ENUM) {
                  return enumDeclaration(mods, dc);
              } else {
                  int pos = token.pos;
                  List<JCTree> errs;
                  if (LAX_IDENTIFIER.accepts(token.kind)) {
                      errs = List.<JCTree>of(mods, toP(F.at(pos).Ident(ident())));
                      setErrorEndPos(token.pos);
                  } else {
                      errs = List.<JCTree>of(mods);
                  }
                  return toP(F.Exec(syntaxError(pos, errs, "expected3",
                                                CLASS, INTERFACE, ENUM)));
              }
          } else {
              if (token.kind == ENUM) {
                  error(token.pos, "enums.not.supported.in.source", source.name);
                  allowEnums = true;
                  return enumDeclaration(mods, dc);
              }
              int pos = token.pos;
              List<JCTree> errs;
              if (LAX_IDENTIFIER.accepts(token.kind)) {
                  errs = List.<JCTree>of(mods, toP(F.at(pos).Ident(ident())));
                  setErrorEndPos(token.pos);
              } else {
                  errs = List.<JCTree>of(mods);
              }
              return toP(F.Exec(syntaxError(pos, errs, "expected2",
                                            CLASS, INTERFACE)));
          }
      }
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.