class documentation

class NameHighlightFilter(Filter):

View In Hierarchy

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.
Method __init__ Undocumented
Method filter Undocumented
Instance Variable names Undocumented
Instance Variable tokentype Undocumented

Inherited from Filter:

Instance Variable options Undocumented
def __init__(self, **options):

Undocumented

def filter(self, lexer, stream):

Undocumented

names =

Undocumented

tokentype =

Undocumented