code: private void checkForTokens( String content, int startOffset, int endOffset )
    {
      while( startOffset <= endOffset )
      {
        // skip the delimiters to find the start of a new token
        while( isDelimiter( content.substring( startOffset, startOffset + 1 ) ) )
        {
          if( isError( startOffset ) )
          {
            setCharacterAttributes( startOffset, 1, _error, true );
          }
          else if( isWarning( startOffset ) )
          {
            setCharacterAttributes( startOffset, 1, _warning, true );
          }
  
          if( startOffset < endOffset )
          {
            startOffset++;
          }
          else
          {
            return;
          }
        }
        // Extract and process the entire token
        if( isQuoteDelimiter( content.substring( startOffset, startOffset + 1 ) ) )
        {
          startOffset = getQuoteToken( content, startOffset, endOffset );
        }
        else if( isCharQuoteDelimiter( content.substring( startOffset, startOffset + 1 ) ) )
        {
          startOffset = getQuoteToken( content, startOffset, endOffset );
        }
        else
        {
          startOffset = getOtherToken( content, startOffset, endOffset );
        }
      }
    }
docs: /*
  Parse the line for tokens to highlight