anchor.diff:      end.
   
   defs_to_msgtype(Defs) ->
  +    AllOneofs = get_all_oneofs(Defs),
       %% There is a slight bit of mismatch here: the DescriptorProto
       %% contains fields for `nested_type' and `enum_type', and defines
       %% a name resolution scheme, but the gpb parser already un-nests,
  
positive.code:         type          = type_to_descr_type(Type),
          type_name     = type_to_descr_type_name(Type),
          default_value = field_default_value(Field),
          options       = field_options(Opts)}
       || #?gpb_field{name=FName,
                      fnum=FNum,
                      type=Type,
                      occurrence=Occurrence,
                      opts=Opts}=Field <- Fields].
  
  occurrence_def_to_descr_label(optional) -> 'LABEL_OPTIONAL';
  occurrence_def_to_descr_label(required) -> 'LABEL_REQUIRED';
  
negative.code:     %% save also the unprocessed parse results.
      [#'DescriptorProto'{
          name            = atom_to_ustring(MsgName),
          field           = field_defs_to_mgstype_fields(Fields, AllOneofs),
          extension       = [],
          nested_type     = [],
          enum_type       = [],
          extension_range = [],
          options         = undefined,
          oneof_decl      = oneof_decl(AllOneofs)
         }
       || {{msg,MsgName}, Fields} <- Defs].
  
  field_defs_to_mgstype_fields(Fields, AllOneofs) ->
      lists:append([field_def_to_msgtype_field(Field, AllOneofs)
                    || Field <- Fields]).
  
  field_def_to_msgtype_field(#?gpb_field{name=FName,
                                         fnum=FNum,
                                         type=Type,
                                         occurrence=Occurrence,
                                         opts=Opts}=Field,
                             _AllOneofs) ->
      [#'FieldDescriptorProto'{
          name          = atom_to_ustring(FName),
          number        = FNum,
  