Python pygments.token.Operator.Word() Examples
The following are 1
code examples of pygments.token.Operator.Word().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
pygments.token.Operator
, or try the search function
.
Example #1
Source File: test_idris.py From pygments with BSD 2-Clause "Simplified" License | 5 votes |
def test_reserved_word(lexer): fragment = u'namespace Foobar\n links : String\n links = "abc"' tokens = [ (Keyword.Reserved, u'namespace'), (Text, u' '), (Keyword.Type, u'Foobar'), (Text, u'\n'), (Text, u' '), (Name.Function, u'links'), (Text, u' '), (Operator.Word, u':'), (Text, u' '), (Keyword.Type, u'String'), (Text, u'\n'), (Text, u' '), (Text, u' '), (Text, u'links'), (Text, u' '), (Operator.Word, u'='), (Text, u' '), (Literal.String, u'"'), (Literal.String, u'abc'), (Literal.String, u'"'), (Text, u'\n') ] assert list(lexer.get_tokens(fragment)) == tokens