code: private ExtendElement readExtend(String documentation) {
      String name = readName();
      String qualifiedName = name;
      if (!name.contains(".") && packageName != null) {
        qualifiedName = packageName + "." + name;
      }
      ExtendElement.Builder builder = ExtendElement.builder()
          .name(name)
          .qualifiedName(qualifiedName)
          .documentation(documentation);
  
      if (readChar() != '{') throw unexpected("expected '{'");
      while (true) {
        String nestedDocumentation = readDocumentation();
        if (peekChar() == '}') {
          pos++;
          break;
        }
        Object declared = readDeclaration(nestedDocumentation, Context.EXTEND);
        if (declared instanceof FieldElement) {
          builder.addField((FieldElement) declared);
        }
      }
      return builder.build();
    }
docs: Reads an extend declaration.