parameters: (d, offset, tokenlist, it)
docstring: Iterate over command syntax. # comment markers are not special, and escaped newlines are included
      in the output text.
docstring_summary: Iterate over command syntax. # comment markers are not special, and escaped newlines are included
      in the output text.
docstring_tokens: Iterate over command syntax . # comment markers are not special and escaped newlines are included in the output text .
function: def itercommandchars(d, offset, tokenlist, it):
      """
      Iterate over command syntax. # comment markers are not special, and escaped newlines are included
      in the output text.
      """
  
      assert offset >= d.lstart and offset <= d.lend, "offset %i should be between %i and %i" % (offset, d.lstart, d.lend)
  
      if offset == d.lend:
          return
  
      s = d.s
      for m in it:
          mstart, mend = m.span(0)
          token = s[mstart:mend]
          starttext = s[offset:mstart].replace('\n\t', '\n')
  
          if token in tokenlist or (token[0] == '$' and '$' in tokenlist):
              yield starttext, token, mstart, mend
          else:
              yield starttext + token, None, None, mend
          offset = mend
  
      yield s[offset:d.lend].replace('\n\t', '\n'), None, None, None
function_tokens: def itercommandchars ( d , offset , tokenlist , it ) : assert offset >= d . lstart and offset <= d . lend , "offset %i should be between %i and %i" % ( offset , d . lstart , d . lend ) if offset == d . lend : return s = d . s for m in it : mstart , mend = m . span ( 0 ) token = s [ mstart : mend ] starttext = s [ offset : mstart ] . replace ( '\n\t' , '\n' ) if token in tokenlist or ( token [ 0 ] == '$' and '$' in tokenlist ) : yield starttext , token , mstart , mend else : yield starttext + token , None , None , mend offset = mend yield s [ offset : d . lend ] . replace ( '\n\t' , '\n' ) , None , None , None