OpenQASMLexer¶
- class OpenQASMLexer(*args, **kwds)[source]¶
A pygments lexer for OpenQasm.
Attributes
Secondary file name globs
Shortcuts for the lexer
File name globs
Flags for compiling the regular expressions.
MIME types
Name of the lexer
Priority, should multiple lexers match and no content is provided
Dict of
{'state': [(regex, tokentype, new_state), ...], ...}
Methods
OpenQASMLexer.add_filter
(filter_, **options)Add a new stream filter to this lexer.
Has to return a float between
0
and1
that indicates if a lexer wants to highlight this text.OpenQASMLexer.get_tokens
(text[, unfiltered])Return an iterable of (tokentype, value) pairs generated from text.
OpenQASMLexer.get_tokens_unprocessed
(text[, …])Split
text
into (tokentype, text) pairs.