anchor.diff:  
   parse_object(C, Kv, Obj) ->
       get_token(C,
  -              fun(T, {Chars, Cache}) ->
  +              fun(T, C2=#cont{cache=Cache}) ->
                         case T of
                             obj_end ->
                                 NewCache =
                                     put_obj(Obj, Cache),
  -                              Kv(Obj, {Chars, NewCache});
  +                              Kv(Obj, C2#cont{cache=NewCache});
                             _ ->
                                 NewCache =
                                     put_obj(placeholder, Cache),
                                 parse_object_field(
                                   Obj, T,
  -                                {Chars, NewCache}, Cache, Kv)
  +                                C2#cont{cache=NewCache}, Cache, Kv)
                         end
                 end).
   
  
positive.code:         0 -> "z";
          I when is_integer(I) -> [$i | integer_to_list(I)];
          F when is_float(F) -> [$d | io_lib:format("~g", [F])];
          _ -> {error, {bad_term, Term}}
      end.
  
  
negative.code:         _ -> exit({error, {haxe_encode, {bad_char, C}}})
      end.
  
  encode_object(Props, Cache, Vsn) ->
      {Result, Cache2} = encode_object_rest(Props, Cache, Vsn),
      {[$o | Result], Cache2}.
  encode_object_rest(Props, Cache, Vsn) ->
      {EncodedProps, Cache1} =
          lists:foldl(
            fun({Key, Value}, {Acc, Cache2}) ->
                    {EncodedKey, Cache3} =
                        case Key of
                            L when is_list(L) -> encode_string(L, Cache2, Vsn);
                            A when is_atom(A) -> encode_string(atom_to_list(A), Cache2, Vsn);
                            _ -> exit({error, {haxe_encode, {bad_key, Key}}})
                        end,
                    {EncodedVal, Cache4} = encode(Value, Cache3, Vsn),
                    case Acc of
                        [] -> {[[EncodedKey, EncodedVal]], Cache4};                                        _  -> {[[EncodedKey, EncodedVal] | Acc], Cache4}
                    end
  