class RawTokenFormatter(Formatter):
Format tokens as a raw representation for storing token streams.
The format is tokentype<TAB>repr(tokenstring)\n. The output can later
be converted to a token stream with the RawTokenLexer
, described in the
:doc:`lexer list <lexers>`.
Only two options are accepted:
compress
error_color
If set to a color name, highlight error tokens using that color. If set but with no value, defaults to 'red'.
Method | __init__ |
Undocumented |
Method | format |
Format tokensource, an iterable of (tokentype, tokenstring) tuples and write it into outfile. |
Class Variable | aliases |
Undocumented |
Class Variable | filenames |
Undocumented |
Class Variable | name |
Undocumented |
Class Variable | unicodeoutput |
Undocumented |
Instance Variable | compress |
Undocumented |
Instance Variable | encoding |
Undocumented |
Instance Variable | error_color |
Undocumented |
Inherited from Formatter
:
Method | get_style_defs |
Return the style definitions for the current style as a string. |
Instance Variable | full |
Undocumented |
Instance Variable | options |
Undocumented |
Instance Variable | style |
Undocumented |
Instance Variable | title |
Undocumented |
pygments.formatter.Formatter.format