anchor.diff:              case catch Module:dependencies() of
                   L when is_list(L) ->
                       RecompileList = lists:foldl(fun
  -                            ({XFile, XCheckSum}, Acc) ->
  -                                case catch M:F(XFile) of
  -                                    {ok, Data} ->
  -                                        case binary_to_list(erlang:md5(Data)) of
  -                                            XCheckSum ->
  -                                                Acc;
  -                                            _ ->
  -                                                [recompile | Acc]
  -                                        end;
  -                                    _ ->
  -                                        [recompile | Acc]
  -                                end                                        
  -                        end, [], L),
  +						    ({XFile, XCheckSum}, Acc) ->
  +						       case catch M:F(XFile) of
  +							   {ok, Data} ->
  +							       case binary_to_list(erlang:md5(Data)) of
  +								   XCheckSum ->
  +								       Acc;
  +								   _ ->
  +								       [recompile | Acc]
  +							       end;
  +							   _ ->
  +							       [recompile | Acc]
  +						       end                                        
  +					       end, [], L),
                       case RecompileList of
                           [] -> true; 
                           _ -> false
  
positive.code:                     case parse(CustomTagFile, Context) of
                          {ok, DjangoParseTree, CheckSum} ->
                              {{BodyAst, BodyAstInfo}, TreeWalker1} = with_dependency(
                                  {CustomTagFile, CheckSum}, body_ast(DjangoParseTree, Context, TreeWalker)),
                              MatchAst = options_match_ast(), 
                              Clause = erl_syntax:clause(
                                  [key_to_string(Tag), erl_syntax:variable("_Variables"), erl_syntax:variable("RenderOptions")],
                                  none, MatchAst ++ [BodyAst]),
                              custom_tags_clauses_ast1(CustomTags, [Tag|ExcludeTags],
                                  [Clause|ClauseAcc], merge_info(BodyAstInfo, InfoAcc), 
                                  Context, TreeWalker1);
                          Error ->
                              throw(Error)
                      end;
                  false ->
                      custom_tags_clauses_ast1(CustomTags, [Tag | ExcludeTags],
                          ClauseAcc, InfoAcc, Context, TreeWalker)
              end
      end.
  
  dependencies_function(Dependencies) ->
      erl_syntax:function(
          erl_syntax:atom(dependencies), [erl_syntax:clause([], none, 
              [erl_syntax:list(lists:map(fun 
                      ({XFile, XCheckSum}) -> 
                          erl_syntax:tuple([erl_syntax:string(XFile), erl_syntax:string(XCheckSum)])
                  end, Dependencies))])]).
  
  translatable_strings_function(TranslatableStrings) ->
          erl_syntax:function(
          erl_syntax:atom(translatable_strings), [erl_syntax:clause([], none,
                  [erl_syntax:list(lists:map(fun(String) -> 
                                      erl_syntax:string(String) 
                              end,
                              TranslatableStrings))])]).
  
  translated_blocks_function(TranslatedBlocks) ->
          erl_syntax:function(
          erl_syntax:atom(translated_blocks), [erl_syntax:clause([], none,
                  [erl_syntax:list(lists:map(fun(String) -> 
                                      erl_syntax:string(String) 
                              end,
                              TranslatedBlocks))])]).
  
  variables_function(Variables) ->
          erl_syntax:function(
          erl_syntax:atom(variables), [erl_syntax:clause([], none,
                  [erl_syntax:list([erl_syntax:atom(S) || S <- lists:usort(Variables)])])]). 
  
  custom_forms(Dir, Module, Functions, AstInfo) ->
      ModuleAst = erl_syntax:attribute(erl_syntax:atom(module), [erl_syntax:atom(Module)]),
      ExportAst = erl_syntax:attribute(erl_syntax:atom(export),
          [erl_syntax:list([
                      erl_syntax:arity_qualifier(erl_syntax:atom(source_dir), erl_syntax:integer(0)),
                      erl_syntax:arity_qualifier(erl_syntax:atom(dependencies), erl_syntax:integer(0)),
                      erl_syntax:arity_qualifier(erl_syntax:atom(translatable_strings), erl_syntax:integer(0))
                      | 
                          lists:foldl(fun({FunctionName, _, _}, Acc) ->
                              [erl_syntax:arity_qualifier(erl_syntax:atom(FunctionName), erl_syntax:integer(1)),
                                  erl_syntax:arity_qualifier(erl_syntax:atom(FunctionName), erl_syntax:integer(2))|Acc]
                      end, [], Functions)]
              )]),
      SourceFunctionAst = erl_syntax:function(
          erl_syntax:atom(source_dir), [erl_syntax:clause([], none, [erl_syntax:string(Dir)])]),
      DependenciesFunctionAst = dependencies_function(AstInfo#ast_info.dependencies), 
      TranslatableStringsFunctionAst = translatable_strings_function(AstInfo#ast_info.translatable_strings),
      FunctionAsts = lists:foldl(fun({_, Function1, Function2}, Acc) -> [Function1, Function2 | Acc] end, [], Functions),
  
      [erl_syntax:revert(X) || X <- [ModuleAst, ExportAst, SourceFunctionAst, DependenciesFunctionAst, TranslatableStringsFunctionAst
              | FunctionAsts] ++ AstInfo#ast_info.pre_render_asts].
  
  forms(File, Module, {BodyAst, BodyInfo}, {CustomTagsFunctionAst, CustomTagsInfo}, BinaryStrings, CheckSum) ->
      MergedInfo = merge_info(BodyInfo, CustomTagsInfo),
      Render0FunctionAst = erl_syntax:function(erl_syntax:atom(render),
          [erl_syntax:clause([], none, [erl_syntax:application(none, 
                          erl_syntax:atom(render), [erl_syntax:list([])])])]),
      Render1FunctionAst = erl_syntax:function(erl_syntax:atom(render),
          [erl_syntax:clause([erl_syntax:variable("_Variables")], none,
                  [erl_syntax:application(none,
                          erl_syntax:atom(render),
                          [erl_syntax:variable("_Variables"), erl_syntax:list([])])])]),
      Function2 = erl_syntax:application(none, erl_syntax:atom(render_internal), 
          [erl_syntax:variable("_Variables"), erl_syntax:variable("RenderOptions")]),
      ClauseOk = erl_syntax:clause([erl_syntax:variable("Val")], none,
          [erl_syntax:tuple([erl_syntax:atom(ok), erl_syntax:variable("Val")])]),     
      ClauseCatch = erl_syntax:clause([erl_syntax:variable("Err")], none,
          [erl_syntax:tuple([erl_syntax:atom(error), erl_syntax:variable("Err")])]),            
      Render2FunctionAst = erl_syntax:function(erl_syntax:atom(render),
          [erl_syntax:clause([erl_syntax:variable("_Variables"),
                      erl_syntax:variable("RenderOptions")], none, 
              [erl_syntax:try_expr([Function2], [ClauseOk], [ClauseCatch])])]),  
       
      SourceFunctionTuple = erl_syntax:tuple(
          [erl_syntax:string(File), erl_syntax:string(CheckSum)]),
      SourceFunctionAst = erl_syntax:function(
          erl_syntax:atom(source),
              [erl_syntax:clause([], none, [SourceFunctionTuple])]),
      
      DependenciesFunctionAst = dependencies_function(MergedInfo#ast_info.dependencies),
  
      TranslatableStringsAst = translatable_strings_function(MergedInfo#ast_info.translatable_strings),
  
negative.code:             case parse(File, Context) of
                  {ok, ParentParseTree, CheckSum} ->
                      BlockDict = lists:foldl(
  				  fun
  				      ({block, {identifier, _, Name}, Contents}, Dict) ->
  						   dict:store(Name, Contents, Dict);
  				      (_, Dict) ->
  						   Dict
  					   end, dict:new(), ThisParseTree),
                      with_dependency({File, CheckSum}, body_ast(ParentParseTree, Context#dtl_context{
  										  block_dict = dict:merge(fun(_Key, _ParentVal, ChildVal) -> ChildVal end,
  													  BlockDict, Context#dtl_context.block_dict),
  										  parse_trail = [File | Context#dtl_context.parse_trail]}, TreeWalker));
                  Err ->
                      throw(Err)
              end        
      end;
  
  
  body_ast(DjangoParseTree, Context, TreeWalker) ->
      {AstInfoList, TreeWalker2} = lists:mapfoldl(
  				   fun
  				       ({'autoescape', {identifier, _, OnOrOff}, Contents}, TreeWalkerAcc) ->
  						       body_ast(Contents, Context#dtl_context{auto_escape = OnOrOff}, 
  								TreeWalkerAcc);
  				       ({'block', {identifier, _, Name}, Contents}, TreeWalkerAcc) ->
  						       Block = case dict:find(Name, Context#dtl_context.block_dict) of
  								   {ok, ChildBlock} -> ChildBlock;
  								   _ -> Contents
  							       end,
  						       body_ast(Block, Context, TreeWalkerAcc);
  				       ({'blocktrans', Args, Contents}, TreeWalkerAcc) ->
  						       blocktrans_ast(Args, Contents, Context, TreeWalkerAcc);
  				       ({'call', {identifier, _, Name}}, TreeWalkerAcc) ->
  						       call_ast(Name, TreeWalkerAcc);
  				       ({'call', {identifier, _, Name}, With}, TreeWalkerAcc) ->
  						       call_with_ast(Name, With, Context, TreeWalkerAcc);
  				       ({'comment', _Contents}, TreeWalkerAcc) ->
  						       empty_ast(TreeWalkerAcc);
  				       ({'cycle', Names}, TreeWalkerAcc) ->
  						       cycle_ast(Names, Context, TreeWalkerAcc);
  				       ({'cycle_compat', Names}, TreeWalkerAcc) ->
  						       cycle_compat_ast(Names, Context, TreeWalkerAcc);
  				       ({'date', 'now', {string_literal, _Pos, FormatString}}, TreeWalkerAcc) ->
  						       now_ast(FormatString, Context, TreeWalkerAcc);
  				       ({'filter', FilterList, Contents}, TreeWalkerAcc) ->
  						       filter_tag_ast(FilterList, Contents, Context, TreeWalkerAcc);
  				       ({'firstof', Vars}, TreeWalkerAcc) ->
  						       firstof_ast(Vars, Context, TreeWalkerAcc);
  				       ({'for', {'in', IteratorList, Variable, Reversed}, Contents}, TreeWalkerAcc) ->
  						       {EmptyAstInfo, TreeWalker1} = empty_ast(TreeWalkerAcc),
  						       for_loop_ast(IteratorList, Variable, Reversed, Contents, EmptyAstInfo, Context, TreeWalker1);
  				       ({'for', {'in', IteratorList, Variable, Reversed}, Contents, EmptyPartContents}, TreeWalkerAcc) ->
  						       {EmptyAstInfo, TreeWalker1} = body_ast(EmptyPartContents, Context, TreeWalkerAcc),
  						       for_loop_ast(IteratorList, Variable, Reversed, Contents, EmptyAstInfo, Context, TreeWalker1);
  				       ({'if', Expression, Contents, Elif}, TreeWalkerAcc) ->
  						       {IfAstInfo, TreeWalker1} = body_ast(Contents, Context, TreeWalkerAcc),
  						       {ElifAstInfo, TreeWalker2} = body_ast(Elif, Context, TreeWalker1),
  						       ifelse_ast(Expression, IfAstInfo, ElifAstInfo, Context, TreeWalker2);
  				       ({'if', Expression, Contents}, TreeWalkerAcc) ->
  						       {IfAstInfo, TreeWalker1} = body_ast(Contents, Context, TreeWalkerAcc),
  						       {ElseAstInfo, TreeWalker2} = empty_ast(TreeWalker1),
  						       ifelse_ast(Expression, IfAstInfo, ElseAstInfo, Context, TreeWalker2);
  				       ({'ifchanged', '$undefined', Contents}, TreeWalkerAcc) ->
  						       {IfAstInfo, TreeWalker1} = body_ast(Contents, Context, TreeWalkerAcc),
  						       {ElseAstInfo, TreeWalker2} = empty_ast(TreeWalker1),
  						       ifchanged_contents_ast(Contents, IfAstInfo, ElseAstInfo, Context, TreeWalker2);
  				       ({'ifchanged', Values, Contents}, TreeWalkerAcc) ->
  						       {IfAstInfo, TreeWalker1} = body_ast(Contents, Context, TreeWalkerAcc),
  						       {ElseAstInfo, TreeWalker2} = empty_ast(TreeWalker1),
  						       ifchanged_values_ast(Values, IfAstInfo, ElseAstInfo, Context, TreeWalker2);
  				       ({'ifchangedelse', '$undefined', IfContents, ElseContents}, TreeWalkerAcc) ->
  						       {IfAstInfo, TreeWalker1} = body_ast(IfContents, Context, TreeWalkerAcc),
  						       {ElseAstInfo, TreeWalker2} = body_ast(ElseContents, Context, TreeWalker1),
  						       ifchanged_contents_ast(IfContents, IfAstInfo, ElseAstInfo, Context, TreeWalker2);
  				       ({'ifchangedelse', Values, IfContents, ElseContents}, TreeWalkerAcc) ->
  						       {IfAstInfo, TreeWalker1} = body_ast(IfContents, Context, TreeWalkerAcc),
  						       {ElseAstInfo, TreeWalker2} = body_ast(ElseContents, Context, TreeWalker1),
  						       ifchanged_values_ast(Values, IfAstInfo, ElseAstInfo, Context, TreeWalker2);
  				       ({'ifelse', Expression, IfContents, ElseContents}, TreeWalkerAcc) ->
  						       {IfAstInfo, TreeWalker1} = body_ast(IfContents, Context, TreeWalkerAcc),
  						       {ElseAstInfo, TreeWalker2} = body_ast(ElseContents, Context, TreeWalker1),
  						       ifelse_ast(Expression, IfAstInfo, ElseAstInfo, Context, TreeWalker2);
  				       ({'ifequal', [Arg1, Arg2], Contents}, TreeWalkerAcc) ->
  						       {IfAstInfo, TreeWalker1} = body_ast(Contents, Context, TreeWalkerAcc),
  						       {ElseAstInfo, TreeWalker2} = empty_ast(TreeWalker1),
  						       ifelse_ast({'expr', "eq", Arg1, Arg2}, IfAstInfo, ElseAstInfo, Context, TreeWalker2);
  				       ({'ifequalelse', [Arg1, Arg2], IfContents, ElseContents}, TreeWalkerAcc) ->
  						       {IfAstInfo, TreeWalker1} = body_ast(IfContents, Context, TreeWalkerAcc), 
  						       {ElseAstInfo, TreeWalker2} = body_ast(ElseContents, Context,TreeWalker1),
  						       ifelse_ast({'expr', "eq", Arg1, Arg2}, IfAstInfo, ElseAstInfo, Context, TreeWalker2);                
  				       ({'ifnotequal', [Arg1, Arg2], Contents}, TreeWalkerAcc) ->
  						       {IfAstInfo, TreeWalker1} = body_ast(Contents, Context, TreeWalkerAcc),
  						       {ElseAstInfo, TreeWalker2} = empty_ast(TreeWalker1),
  						       ifelse_ast({'expr', "ne", Arg1, Arg2}, IfAstInfo, ElseAstInfo, Context, TreeWalker2);
  				       ({'ifnotequalelse', [Arg1, Arg2], IfContents, ElseContents}, TreeWalkerAcc) ->
  						       {IfAstInfo, TreeWalker1} = body_ast(IfContents, Context, TreeWalkerAcc),
  						       {ElseAstInfo, TreeWalker2} = body_ast(ElseContents, Context, TreeWalker1),
  						       ifelse_ast({'expr', "ne", Arg1, Arg2}, IfAstInfo, ElseAstInfo, Context, TreeWalker2);                    
  				       ({'include', {string_literal, _, File}, Args}, TreeWalkerAcc) ->
  						       include_ast(unescape_string_literal(File), Args, Context#dtl_context.local_scopes, Context, TreeWalkerAcc);
  				       ({'include_only', {string_literal, _, File}, Args}, TreeWalkerAcc) ->
  						       include_ast(unescape_string_literal(File), Args, [], Context, TreeWalkerAcc);
  				       ({'regroup', {ListVariable, Grouper, {identifier, _, NewVariable}}, Contents}, TreeWalkerAcc) ->
  						       regroup_ast(ListVariable, Grouper, NewVariable, Contents, Context, TreeWalkerAcc);
  				       ({'spaceless', Contents}, TreeWalkerAcc) ->
  						       spaceless_ast(Contents, Context, TreeWalkerAcc);
  				       ({'ssi', Arg}, TreeWalkerAcc) ->
  						       ssi_ast(Arg, Context, TreeWalkerAcc);
  				       ({'ssi_parsed', {string_literal, _, FileName}}, TreeWalkerAcc) ->
  						       include_ast(unescape_string_literal(FileName), [], Context#dtl_context.local_scopes, Context, TreeWalkerAcc);
  				       ({'string', _Pos, String}, TreeWalkerAcc) -> 
  						       string_ast(String, Context, TreeWalkerAcc);
  				       ({'tag', {identifier, _, Name}, Args}, TreeWalkerAcc) ->
  						       tag_ast(Name, Args, Context, TreeWalkerAcc);            
  				       ({'templatetag', {_, _, TagName}}, TreeWalkerAcc) ->
  						       templatetag_ast(TagName, Context, TreeWalkerAcc);
  				       ({'trans', Value}, TreeWalkerAcc) ->
  						       translated_ast(Value, Context, TreeWalkerAcc);
  				       ({'widthratio', Numerator, Denominator, Scale}, TreeWalkerAcc) ->
  						       widthratio_ast(Numerator, Denominator, Scale, Context, TreeWalkerAcc);
  				       ({'with', Args, Contents}, TreeWalkerAcc) ->
  						       with_ast(Args, Contents, Context, TreeWalkerAcc);
  				       (ValueToken, TreeWalkerAcc) -> 
  						       {{ValueAst,ValueInfo},ValueTreeWalker} = value_ast(ValueToken, true, true, Context, TreeWalkerAcc),
  						       {{format(ValueAst, Context, ValueTreeWalker),ValueInfo},ValueTreeWalker}
  					       end, TreeWalker, DjangoParseTree),   
      {AstList, {Info, TreeWalker3}} = lists:mapfoldl(
  				       fun({Ast, Info}, {InfoAcc, TreeWalkerAcc}) -> 
  					       PresetVars = lists:foldl(fun
  									    (X, Acc) ->
  									       case proplists:lookup(X, Context#dtl_context.vars) of
  										   none ->
  										       Acc;
  										   Val ->
  										       [erl_syntax:abstract(Val) | Acc]
  									       end
  								       end, [], Info#ast_info.var_names),
  					       case PresetVars of
  						   [] ->
  						       {Ast, {merge_info(Info, InfoAcc), TreeWalkerAcc}};
  						   _ ->
  						       Counter = TreeWalkerAcc#treewalker.counter,
  						       Name = lists:concat([pre_render, Counter]),
  						       Ast1 = erl_syntax:application(none, erl_syntax:atom(Name),
  										     [erl_syntax:list(PresetVars)]),
  						       PreRenderAst = erl_syntax:function(erl_syntax:atom(Name),
  											  [erl_syntax:clause([erl_syntax:variable("_Variables")], none, [Ast])]),
  						       PreRenderAsts = Info#ast_info.pre_render_asts,
  						       Info1 = Info#ast_info{pre_render_asts = [PreRenderAst | PreRenderAsts]},     
  						       {Ast1, {merge_info(Info1, InfoAcc), TreeWalkerAcc#treewalker{counter = Counter + 1}}}
  					       end
  				       end, {#ast_info{}, TreeWalker2}, AstInfoList),
      {{erl_syntax:list(AstList), Info}, TreeWalker3}.
  
  
  