Locally add prismjs
This commit is contained in:
parent
35af792c6a
commit
6aa044cf9b
701 changed files with 35787 additions and 0 deletions
23
node_modules/prismjs/components/prism-openqasm.js
generated
vendored
Normal file
23
node_modules/prismjs/components/prism-openqasm.js
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
// https://qiskit.github.io/openqasm/grammar/index.html
|
||||
|
||||
Prism.languages.openqasm = {
|
||||
'comment': /\/\*[\s\S]*?\*\/|\/\/.*/,
|
||||
'string': {
|
||||
pattern: /"[^"\r\n\t]*"|'[^'\r\n\t]*'/,
|
||||
greedy: true
|
||||
},
|
||||
|
||||
'keyword': /\b(?:CX|OPENQASM|U|barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while)\b|#pragma\b/,
|
||||
'class-name': /\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/,
|
||||
'function': /\b(?:cos|exp|ln|popcount|rotl|rotr|sin|sqrt|tan)\b(?=\s*\()/,
|
||||
|
||||
'constant': /\b(?:euler|pi|tau)\b|π|𝜏|ℇ/,
|
||||
'number': {
|
||||
pattern: /(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|µs|ms|s)?/i,
|
||||
lookbehind: true
|
||||
},
|
||||
'operator': /->|>>=?|<<=?|&&|\|\||\+\+|--|[!=<>&|~^+\-*/%]=?|@/,
|
||||
'punctuation': /[(){}\[\];,:.]/
|
||||
};
|
||||
|
||||
Prism.languages.qasm = Prism.languages.openqasm;
|
Loading…
Add table
Add a link
Reference in a new issue