code: protected JCClassDecl enumDeclaration(JCModifiers mods, Comment dc) {
          int pos = token.pos;
          accept(ENUM);
          Name name = ident();
  
          List<JCExpression> implementing = List.nil();
          if (token.kind == IMPLEMENTS) {
              nextToken();
              implementing = typeList();
          }
  
          List<JCTree> defs = enumBody(name);
          mods.flags |= Flags.ENUM;
          JCClassDecl result = toP(F.at(pos).
              ClassDef(mods, name, List.nil(),
                       null, implementing, defs));
          attach(result, dc);
          return result;
      }
docs: EnumDeclaration = ENUM Ident [IMPLEMENTS TypeList] EnumBody
  @param mods    The modifiers starting the enum declaration
  @param dc       The documentation comment for the enum, or null.