original_docstring: 
          Actually colorize the selected range.
  
          This is called whenever a pattern matcher succeed.
          
docstring: Actually colorize the selected range.
  This is called whenever a pattern matcher succeed.
docstring_tokens: Actually colorize the selected range . This is called whenever a pattern matcher succeed .
code: def colorRangeWithTag(self, s, i, j, tag, delegate='', exclude_match=False):
          """
          Actually colorize the selected range.
  
          This is called whenever a pattern matcher succeed.
          """
          trace = 'coloring' in g.app.debug and not g.unitTesting
              # setTag does most tracing.
          if not self.inColorState():
              # Do *not* check x.flag here. It won't work.
              if trace:
                  g.trace('not in color state')
              return
          self.delegate_name = delegate
          if delegate:
              if trace:
                  if len(repr(s[i:j])) <= 20:
                      s2 = repr(s[i:j])
                  else:
                      s2 = repr(s[i : i + 17 - 2] + '...')
                  kind_s = f"{delegate}:{tag}"
                  print(
                      f"\ncolorRangeWithTag: {kind_s:25} {i:3} {j:3} "
                      f"{s2:>20} {self.matcher_name}\n")
              self.modeStack.append(self.modeBunch)
              self.init_mode(delegate)
              while 0 <= i < j and i < len(s):
                  progress = i
                  assert j >= 0, j
                  for f in self.rulesDict.get(s[i], []):
                      n = f(self, s, i)
                      if n is None:
                          g.trace('Can not happen: delegate matcher returns None')
                      elif n > 0:
                          self.matcher_name = f.__name__
                          i += n
                          break
                  else:
                      # Use the default chars for everything else.
                      # Use the *delegate's* default characters if possible.
                      default_tag = self.attributesDict.get('default')
                      self.setTag(default_tag or tag, s, i, i + 1)
                      i += 1
                  assert i > progress
              bunch = self.modeStack.pop()
              self.initModeFromBunch(bunch)
          elif not exclude_match:
              self.setTag(tag, s, i, j)
          if tag != 'url':
              # Allow UNL's and URL's *everywhere*.
              j = min(j, len(s))
              while i < j:
                  ch = s[i].lower()
                  if ch == 'u':
                      n = self.match_unl(s, i)
                      i += max(1, n)
                  elif ch in 'fh':  # file|ftp|http|https
                      n = self.match_any_url(s, i)
                      i += max(1, n)
                  else:
                      i += 1
code_tokens: def colorRangeWithTag ( self , s , i , j , tag , delegate = '' , exclude_match = False ) : trace = 'coloring' in g . app . debug and not g . unitTesting if not self . inColorState ( ) : if trace : g . trace ( 'not in color state' ) return self . delegate_name = delegate if delegate : if trace : if len ( repr ( s [ i : j ] ) ) <= 20 : s2 = repr ( s [ i : j ] ) else : s2 = repr ( s [ i : i + 17 - 2 ] + '...' ) kind_s = f"{delegate}:{tag}" print ( f"\ncolorRangeWithTag: {kind_s:25} {i:3} {j:3} " f"{s2:>20} {self.matcher_name}\n" ) self . modeStack . append ( self . modeBunch ) self . init_mode ( delegate ) while 0 <= i < j and i < len ( s ) : progress = i assert j >= 0 , j for f in self . rulesDict . get ( s [ i ] , [ ] ) : n = f ( self , s , i ) if n is None : g . trace ( 'Can not happen: delegate matcher returns None' ) elif n > 0 : self . matcher_name = f . __name__ i += n break else : default_tag = self . attributesDict . get ( 'default' ) self . setTag ( default_tag or tag , s , i , i + 1 ) i += 1 assert i > progress bunch = self . modeStack . pop ( ) self . initModeFromBunch ( bunch ) elif not exclude_match : self . setTag ( tag , s , i , j ) if tag != 'url' : j = min ( j , len ( s ) ) while i < j : ch = s [ i ] . lower ( ) if ch == 'u' : n = self . match_unl ( s , i ) i += max ( 1 , n ) elif ch in 'fh' : n = self . match_any_url ( s , i ) i += max ( 1 , n ) else : i += 1
short_docstring: Actually colorize the selected range.
short_docstring_tokens: Actually colorize the selected range .
comment: """
          Actually colorize the selected range.
  
          This is called whenever a pattern matcher succeed.
          """$SEP$# setTag does most tracing.$SEP$# Do *not* check x.flag here. It won't work.$SEP$# Use the default chars for everything else.$SEP$# Use the *delegate's* default characters if possible.$SEP$# Allow UNL's and URL's *everywhere*.$SEP$# file|ftp|http|https