anchor.diff:  label_to_record_field(Label) ->
       case atom_to_list(Label) of
           "$_els" ->
  -            erl_syntax:atom("sub_els");
  +            sub_els;
           [$$|T] ->
  -            erl_syntax:atom(T)
  +            list_to_atom(T)
       end.
   
   prepare_label(Label, Name) when is_atom(Name) ->
  
positive.code: 
  elem_to_AST(#elem{name = Name, xmlns = XMLNS, cdata = CData,
                    result = Result, attrs = Attrs, refs = _Refs} = Elem1,
              Tag, #state{known_functions = KnownFuns,
                          all_elems = AllElems} = State) ->
      Elem = prepare_elem(Elem1, KnownFuns, AllElems),
      NewState = State,
      AttrAST = lists:flatmap(
                  fun(#attr{name = AttrName,
                            required = Required,
  
negative.code:         ok ->
              file:write_file(
                filename:join([DirName, ModName ++ ".hrl"]),
                [erl_prettypr:format(Hdr),
                 io_lib:nl(),
                 string:join(Records, io_lib:nl() ++ io_lib:nl()),
                 io_lib:nl()]);
          Err ->
              Err
      end.
  
  make_records(Types) ->
      D = dict:from_list(
            lists:flatmap(
              fun({_, {record, RecName, _}}) ->
                      [{{record, RecName}, [{0, []}]}];
                 (_) ->
                      []
              end, Types)),
      {Strings, _} = lists:foldr(
                       fun({_, {record, RecName, _} = R}, {Res, Seen}) ->
                               case lists:member(RecName, Seen) of
                                   false ->
                                       {[record_to_string(R, D)|Res],
                                        [RecName|Seen]};
                                   true ->
                                       {Res, Seen}
                               end;
                          (_, Acc) ->
                               Acc
                       end, {[], []}, Types),
      Strings.
  
  atom_to_string(Atom) ->
      erl_syntax:atom_literal(abstract(Atom)).
  
  record_to_string({record, RecName, RecFields}, RecDict) ->
      Prefix = "-record(" ++ atom_to_string(RecName) ++ ", {",
      Sep = "," ++ io_lib:nl() ++ lists:duplicate(length(Prefix), $ ),
      Fs = lists:map(
             fun({FName, {FType, undefined}}) ->
                     [atom_to_string(FName), " :: ",
                      erl_types:t_to_string(FType, RecDict)];
                ({FName, {FType, Default}}) ->
                     Type = erl_types:t_sup(
                              [erl_types:t_from_term(Default),
                               FType]),
                     [atom_to_string(FName), " = ",
                      io_lib:fwrite("~w", [Default]),
                      " :: ",
                      erl_types:t_to_string(Type, RecDict)]
             end, RecFields),
      [Prefix, string:join(Fs, Sep), "})."].
  
  header(FileName) ->
      erl_syntax:comment(
  