code: private JsDocToken parseIdGeneratorTag(JsDocToken token) {
      String idgenKind = "unique";
      if (token == JsDocToken.LEFT_CURLY) {
        if (match(JsDocToken.STRING)) {
          String name = stream.getString();
          if (!idGeneratorAnnotationKeywords.contains(name)
              && !jsdocBuilder.hasParameter(name)) {
            addParserWarning("msg.jsdoc.idgen.unknown", name);
          }
  
          idgenKind = name;
          token = next();
        } else {
          addParserWarning("msg.jsdoc.idgen.bad");
          return token;
        }
  
        if (!match(JsDocToken.RIGHT_CURLY)) {
          addParserWarning("msg.jsdoc.idgen.bad");
        } else {
          token = next();
        }
      }
  
      switch (idgenKind) {
        case "unique":
          if (!jsdocBuilder.recordIdGenerator()) {
            addParserWarning("msg.jsdoc.idgen.duplicate");
          }
          break;
        case "consistent":
          if (!jsdocBuilder.recordConsistentIdGenerator()) {
            addParserWarning("msg.jsdoc.idgen.duplicate");
          }
          break;
        case "stable":
          if (!jsdocBuilder.recordStableIdGenerator()) {
            addParserWarning("msg.jsdoc.idgen.duplicate");
          }
          break;
        case "xid":
          if (!jsdocBuilder.recordXidGenerator()) {
            addParserWarning("msg.jsdoc.idgen.duplicate");
          }
          break;
        case "mapped":
          if (!jsdocBuilder.recordMappedIdGenerator()) {
            addParserWarning("msg.jsdoc.idgen.duplicate");
          }
          break;
      }
  
      return token;
    }
docs: Parse a {@code @idgenerator} tag of the form
  {@code @idgenerator} or
  {@code @idgenerator&#123;consistent&#125;}.
  
  @param token The current token.