; OpenQASM highlighting. Captures in the common names; an editor maps them to ; its theme. (line_comment) @comment (block_comment) @comment (pragma) @keyword.directive (annotation) @attribute [ "OPENQASM" "include" "defcalgrammar" "gate" "opaque" "def" "extern" "cal" "defcal" "let" "const" "input" "output" "readonly" "mutable" "#dim" "if" "else" "for" "in" "while" "switch" "case" "default" "return" "break" "continue" "end" "box" "durationof" "measure" "reset" "barrier" "delay" "gphase" "inv" "pow" "ctrl" "negctrl" ] @keyword [ "qubit" "qreg" "creg" "bit" "int" "uint" "float" "angle" "bool" "complex" "array" "duration" "stretch" ] @type (boolean_literal) @boolean [ (integer_literal) (imaginary_literal) (timing_literal) ] @number (float_literal) @number.float (string) @string (calibration_text) @string.special (hardware_qubit) @variable.builtin ((identifier) @constant.builtin (#any-of? @constant.builtin "pi" "π" "tau" "τ" "euler" "ℯ")) (gate_definition name: (identifier) @function) (opaque_declaration name: (identifier) @function) (subroutine_definition name: (identifier) @function) (extern_declaration name: (identifier) @function) (calibration_definition target: (identifier) @function) (gate_call name: (identifier) @function.call) (call_expression function: (identifier) @function.call) (gate_parameters (identifier) @variable.parameter) (parameter name: (identifier) @variable.parameter) (const_declaration name: (identifier) @constant) [ "=" "+=" "-=" "*=" "/=" "%=" "&=" "|=" "^=" "~=" "<<=" ">>=" "**=" "+" "-" "*" "/" "%" "**" "==" "!=" "<" ">" "<=" ">=" "&&" "||" "!" "~" "&" "|" "^" "<<" ">>" "++" "->" "@" ] @operator [ "(" ")" "[" "]" "{" "}" ] @punctuation.bracket [ ";" "," ":" ] @punctuation.delimiter