anchor.diff:    Kind: TATEditorBracketKind;
     MaxDistance: integer;
     FromX, FromY: integer;
  -  out FoundX, FoundY: integer);
  +  out FoundX, FoundY: integer;
  +  GetTokenKind: TATEditorGetTokenKind);
   var
     St: TATStrings;
     S: atString;
     IndexX, IndexY, IndexXBegin, IndexXEnd: integer;
     Level: integer;
  +  TokenKind: TATFinderTokenKind;
     ch: atChar;
   begin
     FoundX:= -1;
     FoundY:= -1;
     Level:= 0;
     St:= Ed.Strings;
  +  TokenKind:= GetTokenKind(Ed, FromX, FromY);
   
     if Kind=bracketOpening then
     begin
  
positive.code:       exit;
  
    EditorBracket_FindPair(Ed, CharFrom, CharTo, Kind,
      MaxDistance, PosX, PosY, FoundX, FoundY);
    if FoundY<0 then exit;
  
    case Action of
  
negative.code:       for IndexX:= IndexXEnd downto IndexXBegin do
        begin
          ch:= S[IndexX+1];
          if (ch=CharFrom) and (GetTokenKind(Ed, IndexX, IndexY)=TokenKind) then
            Inc(Level)
          else
          if (ch=CharTo) and (GetTokenKind(Ed, IndexX, IndexY)=TokenKind) then
          begin
            if Level>0 then
              Dec(Level)
  