swift-UAPFXUZJ.js 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. import "./chunk-2LSFTFF7.js";
  2. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/swift/swift.js
  3. var conf = {
  4. comments: {
  5. lineComment: "//",
  6. blockComment: ["/*", "*/"]
  7. },
  8. brackets: [
  9. ["{", "}"],
  10. ["[", "]"],
  11. ["(", ")"]
  12. ],
  13. autoClosingPairs: [
  14. { open: "{", close: "}" },
  15. { open: "[", close: "]" },
  16. { open: "(", close: ")" },
  17. { open: '"', close: '"' },
  18. { open: "'", close: "'" },
  19. { open: "`", close: "`" }
  20. ],
  21. surroundingPairs: [
  22. { open: "{", close: "}" },
  23. { open: "[", close: "]" },
  24. { open: "(", close: ")" },
  25. { open: '"', close: '"' },
  26. { open: "'", close: "'" },
  27. { open: "`", close: "`" }
  28. ]
  29. };
  30. var language = {
  31. defaultToken: "",
  32. tokenPostfix: ".swift",
  33. identifier: /[a-zA-Z_][\w$]*/,
  34. attributes: [
  35. "@GKInspectable",
  36. "@IBAction",
  37. "@IBDesignable",
  38. "@IBInspectable",
  39. "@IBOutlet",
  40. "@IBSegueAction",
  41. "@NSApplicationMain",
  42. "@NSCopying",
  43. "@NSManaged",
  44. "@Sendable",
  45. "@UIApplicationMain",
  46. "@autoclosure",
  47. "@actorIndependent",
  48. "@asyncHandler",
  49. "@available",
  50. "@convention",
  51. "@derivative",
  52. "@differentiable",
  53. "@discardableResult",
  54. "@dynamicCallable",
  55. "@dynamicMemberLookup",
  56. "@escaping",
  57. "@frozen",
  58. "@globalActor",
  59. "@inlinable",
  60. "@inline",
  61. "@main",
  62. "@noDerivative",
  63. "@nonobjc",
  64. "@noreturn",
  65. "@objc",
  66. "@objcMembers",
  67. "@preconcurrency",
  68. "@propertyWrapper",
  69. "@requires_stored_property_inits",
  70. "@resultBuilder",
  71. "@testable",
  72. "@unchecked",
  73. "@unknown",
  74. "@usableFromInline",
  75. "@warn_unqualified_access"
  76. ],
  77. accessmodifiers: ["open", "public", "internal", "fileprivate", "private"],
  78. keywords: [
  79. "#available",
  80. "#colorLiteral",
  81. "#column",
  82. "#dsohandle",
  83. "#else",
  84. "#elseif",
  85. "#endif",
  86. "#error",
  87. "#file",
  88. "#fileID",
  89. "#fileLiteral",
  90. "#filePath",
  91. "#function",
  92. "#if",
  93. "#imageLiteral",
  94. "#keyPath",
  95. "#line",
  96. "#selector",
  97. "#sourceLocation",
  98. "#warning",
  99. "Any",
  100. "Protocol",
  101. "Self",
  102. "Type",
  103. "actor",
  104. "as",
  105. "assignment",
  106. "associatedtype",
  107. "associativity",
  108. "async",
  109. "await",
  110. "break",
  111. "case",
  112. "catch",
  113. "class",
  114. "continue",
  115. "convenience",
  116. "default",
  117. "defer",
  118. "deinit",
  119. "didSet",
  120. "do",
  121. "dynamic",
  122. "dynamicType",
  123. "else",
  124. "enum",
  125. "extension",
  126. "fallthrough",
  127. "false",
  128. "fileprivate",
  129. "final",
  130. "for",
  131. "func",
  132. "get",
  133. "guard",
  134. "higherThan",
  135. "if",
  136. "import",
  137. "in",
  138. "indirect",
  139. "infix",
  140. "init",
  141. "inout",
  142. "internal",
  143. "is",
  144. "isolated",
  145. "lazy",
  146. "left",
  147. "let",
  148. "lowerThan",
  149. "mutating",
  150. "nil",
  151. "none",
  152. "nonisolated",
  153. "nonmutating",
  154. "open",
  155. "operator",
  156. "optional",
  157. "override",
  158. "postfix",
  159. "precedence",
  160. "precedencegroup",
  161. "prefix",
  162. "private",
  163. "protocol",
  164. "public",
  165. "repeat",
  166. "required",
  167. "rethrows",
  168. "return",
  169. "right",
  170. "safe",
  171. "self",
  172. "set",
  173. "some",
  174. "static",
  175. "struct",
  176. "subscript",
  177. "super",
  178. "switch",
  179. "throw",
  180. "throws",
  181. "true",
  182. "try",
  183. "typealias",
  184. "unowned",
  185. "unsafe",
  186. "var",
  187. "weak",
  188. "where",
  189. "while",
  190. "willSet",
  191. "__consuming",
  192. "__owned"
  193. ],
  194. symbols: /[=(){}\[\].,:;@#\_&\-<>`?!+*\\\/]/,
  195. operatorstart: /[\/=\-+!*%<>&|^~?\u00A1-\u00A7\u00A9\u00AB\u00AC\u00AE\u00B0-\u00B1\u00B6\u00BB\u00BF\u00D7\u00F7\u2016-\u2017\u2020-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u23FF\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3030]/,
  196. operatorend: /[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE00-\uFE0F\uFE20-\uFE2F\uE0100-\uE01EF]/,
  197. operators: /(@operatorstart)((@operatorstart)|(@operatorend))*/,
  198. escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
  199. tokenizer: {
  200. root: [
  201. { include: "@whitespace" },
  202. { include: "@comment" },
  203. { include: "@attribute" },
  204. { include: "@literal" },
  205. { include: "@keyword" },
  206. { include: "@invokedmethod" },
  207. { include: "@symbol" }
  208. ],
  209. whitespace: [
  210. [/\s+/, "white"],
  211. [/"""/, "string.quote", "@endDblDocString"]
  212. ],
  213. endDblDocString: [
  214. [/[^"]+/, "string"],
  215. [/\\"/, "string"],
  216. [/"""/, "string.quote", "@popall"],
  217. [/"/, "string"]
  218. ],
  219. symbol: [
  220. [/[{}()\[\]]/, "@brackets"],
  221. [/[<>](?!@symbols)/, "@brackets"],
  222. [/[.]/, "delimiter"],
  223. [/@operators/, "operator"],
  224. [/@symbols/, "operator"]
  225. ],
  226. comment: [
  227. [/\/\/\/.*$/, "comment.doc"],
  228. [/\/\*\*/, "comment.doc", "@commentdocbody"],
  229. [/\/\/.*$/, "comment"],
  230. [/\/\*/, "comment", "@commentbody"]
  231. ],
  232. commentdocbody: [
  233. [/\/\*/, "comment", "@commentbody"],
  234. [/\*\//, "comment.doc", "@pop"],
  235. [/\:[a-zA-Z]+\:/, "comment.doc.param"],
  236. [/./, "comment.doc"]
  237. ],
  238. commentbody: [
  239. [/\/\*/, "comment", "@commentbody"],
  240. [/\*\//, "comment", "@pop"],
  241. [/./, "comment"]
  242. ],
  243. attribute: [
  244. [
  245. /@@@identifier/,
  246. {
  247. cases: {
  248. "@attributes": "keyword.control",
  249. "@default": ""
  250. }
  251. }
  252. ]
  253. ],
  254. literal: [
  255. [/"/, { token: "string.quote", next: "@stringlit" }],
  256. [/0[b]([01]_?)+/, "number.binary"],
  257. [/0[o]([0-7]_?)+/, "number.octal"],
  258. [/0[x]([0-9a-fA-F]_?)+([pP][\-+](\d_?)+)?/, "number.hex"],
  259. [/(\d_?)*\.(\d_?)+([eE][\-+]?(\d_?)+)?/, "number.float"],
  260. [/(\d_?)+/, "number"]
  261. ],
  262. stringlit: [
  263. [/\\\(/, { token: "operator", next: "@interpolatedexpression" }],
  264. [/@escapes/, "string"],
  265. [/\\./, "string.escape.invalid"],
  266. [/"/, { token: "string.quote", next: "@pop" }],
  267. [/./, "string"]
  268. ],
  269. interpolatedexpression: [
  270. [/\(/, { token: "operator", next: "@interpolatedexpression" }],
  271. [/\)/, { token: "operator", next: "@pop" }],
  272. { include: "@literal" },
  273. { include: "@keyword" },
  274. { include: "@symbol" }
  275. ],
  276. keyword: [
  277. [/`/, { token: "operator", next: "@escapedkeyword" }],
  278. [
  279. /@identifier/,
  280. {
  281. cases: {
  282. "@keywords": "keyword",
  283. "[A-Z][a-zA-Z0-9$]*": "type.identifier",
  284. "@default": "identifier"
  285. }
  286. }
  287. ]
  288. ],
  289. escapedkeyword: [
  290. [/`/, { token: "operator", next: "@pop" }],
  291. [/./, "identifier"]
  292. ],
  293. invokedmethod: [
  294. [
  295. /([.])(@identifier)/,
  296. {
  297. cases: {
  298. $2: ["delimeter", "type.identifier"],
  299. "@default": ""
  300. }
  301. }
  302. ]
  303. ]
  304. }
  305. };
  306. export {
  307. conf,
  308. language
  309. };
  310. /*! Bundled license information:
  311. monaco-editor/esm/vs/basic-languages/swift/swift.js:
  312. (*!-----------------------------------------------------------------------------
  313. * Copyright (c) Microsoft Corporation. All rights reserved.
  314. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  315. * Released under the MIT license
  316. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  317. *-----------------------------------------------------------------------------*)
  318. monaco-editor/esm/vs/basic-languages/swift/swift.js:
  319. (*!---------------------------------------------------------------------------------------------
  320. * Copyright (C) David Owens II, owensd.io. All rights reserved.
  321. *--------------------------------------------------------------------------------------------*)
  322. */
  323. //# sourceMappingURL=swift-UAPFXUZJ.js.map