anchor.diff:      end.
   
   	
  +is_whitespace({whitespace, _, _}) ->
  +    true;
  +is_whitespace(_) ->
  +    false.
  +
   is_whitespace_or_comment({whitespace, _, _}) ->
       true;
   is_whitespace_or_comment({comment, _, _}) ->
  
positive.code: 	 get_client_files/2, file_format/1, tokenize/3,
  	 concat_toks/1, test_framework_used/1,
  	 get_modules_by_file/1]).
  
  -export([add_category/1]).
  
  
  -include("../include/wrangler.hrl").
  
  
negative.code: 	     {functions, F(functions)}, {rules, F(rules)}],
      [{A,V}||{A, V}<-NewInfo, V=/=[]].
  	     
  
  annotate_bindings(FName, AST, Info, Ms, TabWidth) ->
      Toks = tokenize(FName, true, TabWidth),
      AnnAST0 = refac_syntax_lib:annotate_bindings(add_token_and_ranges(AST, Toks), ordsets:new(), Ms),
      refac_annotate_ast:add_fun_define_locations(AnnAST0, Info).
  
    
  %% Attach tokens to each form in the AST, and also add 
  %% range information to each node in the AST.
  %%-spec add_tokens(syntaxTree(), [token()]) -> syntaxTree(). 		 
  add_token_and_ranges(SyntaxTree, Toks) ->
      Fs = refac_syntax:form_list_elements(SyntaxTree),
      NewFs = do_add_token_and_ranges(Toks, Fs),
      SyntaxTree1= rewrite(SyntaxTree, refac_syntax:form_list(NewFs)),
      add_range_to_body(SyntaxTree1, NewFs, "", "").
  
  %% do it backwards starting from the last form. 
  %% all the white spaces after a form belong to the next form if
  %% there is one. 
  
  do_add_token_and_ranges(Toks, Fs) ->
      do_add_token_and_ranges(lists:reverse(Toks), lists:reverse(Fs), []).
  
  do_add_token_and_ranges(_, [], NewFs) ->
      NewFs;
  do_add_token_and_ranges(Toks, _Forms=[F| Fs], NewFs) ->
      {FormToks0, RemToks} = get_form_tokens(Toks, F, Fs), 
      FormToks = lists:reverse(FormToks0),
      F1 = refac_syntax:add_ann({toks, FormToks}, F),
      F2 = add_category(add_range(F1, FormToks)),
      do_add_token_and_ranges(RemToks, Fs, [F2| NewFs]).
  
  get_form_tokens(Toks, F, Fs) ->
      case refac_syntax:type(F) of
  	comment ->
  	    get_comment_form_toks(Toks, F, Fs);
  	_ ->
  	    get_non_comment_form_toks(Toks, F, Fs) 
      end.
  
  %% stand-alone comments.
  get_comment_form_toks(Toks, _F, Fs) when Fs==[] ->
      {Toks,[]};
  get_comment_form_toks(Toks, F, _Fs) ->
      StartPos =start_pos(F),
      {Ts1,Ts2} = lists:splitwith(
  		  fun(T) ->
  			  token_loc(T)>=StartPos 
  		  end, Toks),
      {Ts21, Ts22} = lists:splitwith(fun(T) ->
  					   is_whitespace(T)
  				   end, Ts2),
      {Ts1++Ts21, Ts22}.
   
  get_non_comment_form_toks(Toks, _F, Fs) when Fs==[] ->
      {Toks, []};
  get_non_comment_form_toks(Toks, F, _Fs) ->
      StartPos = start_pos(F),
      {Ts1, Ts2} = lists:splitwith(
  		   fun(T) ->
  			   token_loc(T)>=StartPos
  		   end, Toks),
      {Ts21, Ts22} = lists:splitwith(
  		     fun(T) ->
  			     element(1, T) /=dot andalso
  				 element(1,T)/=comment
  		     end, Ts2),
      {Ts1++Ts21, Ts22}.
  
  start_pos(F) ->
      case refac_syntax:type(F) of 
  	error_marker ->
  	    case F of
  		{error, {_, {{Line, Col}, {_Line1, _Col1}}}} ->
  		    {Line, Col};
  		_ ->
  		    refac_syntax:get_pos(F)
  	    end;
  	_ ->
  	    case refac_syntax:get_precomments(F) of
  		[] ->
  		    refac_syntax:get_pos(F);
  		[Com| _Tl] ->
  		    refac_syntax:get_pos(Com)
  	    end
      end.
  
  %%-spec add_range(syntaxTree(), [token()]) -> syntaxTree(). 
  add_range(AST, Toks) ->
  