Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
pygments.filters.NameHighlightFilter Class Reference
Inheritance diagram for pygments.filters.NameHighlightFilter:
Inheritance graph
[legend]
Collaboration diagram for pygments.filters.NameHighlightFilter:
Collaboration graph
[legend]

Public Member Functions

 __init__ (self, **options)
 
 filter (self, lexer, stream)
 

Public Attributes

 names
 
 tokentype
 
- Public Attributes inherited from pygments.filter.Filter
 options
 

Detailed Description

Highlight a normal Name (and Name.*) token with a different token type.

Example::

    filter = NameHighlightFilter(
        names=['foo', 'bar', 'baz'],
        tokentype=Name.Function,
    )

This would highlight the names "foo", "bar" and "baz"
as functions. `Name.Function` is the default token type.

Options accepted:

`names` : list of strings
  A list of names that should be given the different token type.
  There is no default.
`tokentype` : TokenType or string
  A token type or a string containing a token type name that is
  used for highlighting the strings in `names`.  The default is
  `Name.Function`.

Constructor & Destructor Documentation

◆ __init__()

pygments.filters.NameHighlightFilter.__init__ (   self,
**  options 
)

Reimplemented from pygments.filter.Filter.

Member Function Documentation

◆ filter()

pygments.filters.NameHighlightFilter.filter (   self,
  lexer,
  stream 
)

Reimplemented from pygments.filter.Filter.


The documentation for this class was generated from the following file: