code: List<JCTree> enumBody(Name enumName) {
          accept(LBRACE);
          ListBuffer<JCTree> defs = new ListBuffer<>();
          if (token.kind == COMMA) {
              nextToken();
          } else if (token.kind != RBRACE && token.kind != SEMI) {
              defs.append(enumeratorDeclaration(enumName));
              while (token.kind == COMMA) {
                  nextToken();
                  if (token.kind == RBRACE || token.kind == SEMI) break;
                  defs.append(enumeratorDeclaration(enumName));
              }
              if (token.kind != SEMI && token.kind != RBRACE) {
                  defs.append(syntaxError(token.pos, "expected3",
                                  COMMA, RBRACE, SEMI));
                  nextToken();
              }
          }
          if (token.kind == SEMI) {
              nextToken();
              while (token.kind != RBRACE && token.kind != EOF) {
                  defs.appendList(classOrInterfaceBodyDeclaration(enumName,
                                                                  false));
                  if (token.pos <= endPosTable.errorEndPos) {
                      // error recovery
                     skip(false, true, true, false);
                  }
              }
          }
          accept(RBRACE);
          return defs.toList();
      }
docs: EnumBody = "{" { EnumeratorDeclarationList } [","]
  [ ";" {ClassBodyDeclaration} ] "}"