qsharp-R5FH7GVM.js 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. import "./chunk-2LSFTFF7.js";
  2. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/qsharp/qsharp.js
  3. var conf = {
  4. comments: {
  5. lineComment: "//"
  6. },
  7. brackets: [
  8. ["{", "}"],
  9. ["[", "]"],
  10. ["(", ")"]
  11. ],
  12. autoClosingPairs: [
  13. { open: "{", close: "}" },
  14. { open: "[", close: "]" },
  15. { open: "(", close: ")" },
  16. { open: '"', close: '"', notIn: ["string", "comment"] }
  17. ],
  18. surroundingPairs: [
  19. { open: "{", close: "}" },
  20. { open: "[", close: "]" },
  21. { open: "(", close: ")" },
  22. { open: '"', close: '"' }
  23. ]
  24. };
  25. var language = {
  26. keywords: [
  27. "namespace",
  28. "open",
  29. "as",
  30. "operation",
  31. "function",
  32. "body",
  33. "adjoint",
  34. "newtype",
  35. "controlled",
  36. "if",
  37. "elif",
  38. "else",
  39. "repeat",
  40. "until",
  41. "fixup",
  42. "for",
  43. "in",
  44. "while",
  45. "return",
  46. "fail",
  47. "within",
  48. "apply",
  49. "Adjoint",
  50. "Controlled",
  51. "Adj",
  52. "Ctl",
  53. "is",
  54. "self",
  55. "auto",
  56. "distribute",
  57. "invert",
  58. "intrinsic",
  59. "let",
  60. "set",
  61. "w/",
  62. "new",
  63. "not",
  64. "and",
  65. "or",
  66. "use",
  67. "borrow",
  68. "using",
  69. "borrowing",
  70. "mutable",
  71. "internal"
  72. ],
  73. typeKeywords: [
  74. "Unit",
  75. "Int",
  76. "BigInt",
  77. "Double",
  78. "Bool",
  79. "String",
  80. "Qubit",
  81. "Result",
  82. "Pauli",
  83. "Range"
  84. ],
  85. invalidKeywords: [
  86. "abstract",
  87. "base",
  88. "bool",
  89. "break",
  90. "byte",
  91. "case",
  92. "catch",
  93. "char",
  94. "checked",
  95. "class",
  96. "const",
  97. "continue",
  98. "decimal",
  99. "default",
  100. "delegate",
  101. "do",
  102. "double",
  103. "enum",
  104. "event",
  105. "explicit",
  106. "extern",
  107. "finally",
  108. "fixed",
  109. "float",
  110. "foreach",
  111. "goto",
  112. "implicit",
  113. "int",
  114. "interface",
  115. "lock",
  116. "long",
  117. "null",
  118. "object",
  119. "operator",
  120. "out",
  121. "override",
  122. "params",
  123. "private",
  124. "protected",
  125. "public",
  126. "readonly",
  127. "ref",
  128. "sbyte",
  129. "sealed",
  130. "short",
  131. "sizeof",
  132. "stackalloc",
  133. "static",
  134. "string",
  135. "struct",
  136. "switch",
  137. "this",
  138. "throw",
  139. "try",
  140. "typeof",
  141. "unit",
  142. "ulong",
  143. "unchecked",
  144. "unsafe",
  145. "ushort",
  146. "virtual",
  147. "void",
  148. "volatile"
  149. ],
  150. constants: ["true", "false", "PauliI", "PauliX", "PauliY", "PauliZ", "One", "Zero"],
  151. builtin: [
  152. "X",
  153. "Y",
  154. "Z",
  155. "H",
  156. "HY",
  157. "S",
  158. "T",
  159. "SWAP",
  160. "CNOT",
  161. "CCNOT",
  162. "MultiX",
  163. "R",
  164. "RFrac",
  165. "Rx",
  166. "Ry",
  167. "Rz",
  168. "R1",
  169. "R1Frac",
  170. "Exp",
  171. "ExpFrac",
  172. "Measure",
  173. "M",
  174. "MultiM",
  175. "Message",
  176. "Length",
  177. "Assert",
  178. "AssertProb",
  179. "AssertEqual"
  180. ],
  181. operators: [
  182. "and=",
  183. "<-",
  184. "->",
  185. "*",
  186. "*=",
  187. "@",
  188. "!",
  189. "^",
  190. "^=",
  191. ":",
  192. "::",
  193. "..",
  194. "==",
  195. "...",
  196. "=",
  197. "=>",
  198. ">",
  199. ">=",
  200. "<",
  201. "<=",
  202. "-",
  203. "-=",
  204. "!=",
  205. "or=",
  206. "%",
  207. "%=",
  208. "|",
  209. "+",
  210. "+=",
  211. "?",
  212. "/",
  213. "/=",
  214. "&&&",
  215. "&&&=",
  216. "^^^",
  217. "^^^=",
  218. ">>>",
  219. ">>>=",
  220. "<<<",
  221. "<<<=",
  222. "|||",
  223. "|||=",
  224. "~~~",
  225. "_",
  226. "w/",
  227. "w/="
  228. ],
  229. namespaceFollows: ["namespace", "open"],
  230. symbols: /[=><!~?:&|+\-*\/\^%@._]+/,
  231. escapes: /\\[\s\S]/,
  232. tokenizer: {
  233. root: [
  234. [
  235. /[a-zA-Z_$][\w$]*/,
  236. {
  237. cases: {
  238. "@namespaceFollows": {
  239. token: "keyword.$0",
  240. next: "@namespace"
  241. },
  242. "@typeKeywords": "type",
  243. "@keywords": "keyword",
  244. "@constants": "constant",
  245. "@builtin": "keyword",
  246. "@invalidKeywords": "invalid",
  247. "@default": "identifier"
  248. }
  249. }
  250. ],
  251. { include: "@whitespace" },
  252. [/[{}()\[\]]/, "@brackets"],
  253. [/@symbols/, { cases: { "@operators": "operator", "@default": "" } }],
  254. [/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
  255. [/\d+/, "number"],
  256. [/[;,.]/, "delimiter"],
  257. [/"/, { token: "string.quote", bracket: "@open", next: "@string" }]
  258. ],
  259. string: [
  260. [/[^\\"]+/, "string"],
  261. [/@escapes/, "string.escape"],
  262. [/"/, { token: "string.quote", bracket: "@close", next: "@pop" }]
  263. ],
  264. namespace: [
  265. { include: "@whitespace" },
  266. [/[A-Za-z]\w*/, "namespace"],
  267. [/[\.=]/, "delimiter"],
  268. ["", "", "@pop"]
  269. ],
  270. whitespace: [
  271. [/[ \t\r\n]+/, "white"],
  272. [/(\/\/).*/, "comment"]
  273. ]
  274. }
  275. };
  276. export {
  277. conf,
  278. language
  279. };
  280. /*! Bundled license information:
  281. monaco-editor/esm/vs/basic-languages/qsharp/qsharp.js:
  282. (*!-----------------------------------------------------------------------------
  283. * Copyright (c) Microsoft Corporation. All rights reserved.
  284. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  285. * Released under the MIT license
  286. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  287. *-----------------------------------------------------------------------------*)
  288. */
  289. //# sourceMappingURL=qsharp-R5FH7GVM.js.map