OpenQASMLexer

class OpenQASMLexer(*args, **kwds)[source]

A pygments lexer for OpenQasm.

Attributes

OpenQASMLexer.alias_filenames

OpenQASMLexer.aliases

OpenQASMLexer.filenames

OpenQASMLexer.flags

OpenQASMLexer.gates

OpenQASMLexer.mimetypes

OpenQASMLexer.name

OpenQASMLexer.priority

OpenQASMLexer.tokens

Methods

OpenQASMLexer.add_filter(filter_, **options)

Add a new stream filter to this lexer.

OpenQASMLexer.analyse_text(text)

Has to return a float between 0 and 1 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.