# OpenQASMLexer¶

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

A pygments lexer for OpenQasm.

Attributes

Methods

 OpenQASMLexer.add_filter(filter_, **options) Add a new stream filter to this lexer. 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. Split text into (tokentype, text) pairs.