pug-XYSXUFII.js 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. import "./chunk-2LSFTFF7.js";
  2. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/pug/pug.js
  3. var conf = {
  4. comments: {
  5. lineComment: "//"
  6. },
  7. brackets: [
  8. ["{", "}"],
  9. ["[", "]"],
  10. ["(", ")"]
  11. ],
  12. autoClosingPairs: [
  13. { open: '"', close: '"', notIn: ["string", "comment"] },
  14. { open: "'", close: "'", notIn: ["string", "comment"] },
  15. { open: "{", close: "}", notIn: ["string", "comment"] },
  16. { open: "[", close: "]", notIn: ["string", "comment"] },
  17. { open: "(", close: ")", notIn: ["string", "comment"] }
  18. ],
  19. folding: {
  20. offSide: true
  21. }
  22. };
  23. var language = {
  24. defaultToken: "",
  25. tokenPostfix: ".pug",
  26. ignoreCase: true,
  27. brackets: [
  28. { token: "delimiter.curly", open: "{", close: "}" },
  29. { token: "delimiter.array", open: "[", close: "]" },
  30. { token: "delimiter.parenthesis", open: "(", close: ")" }
  31. ],
  32. keywords: [
  33. "append",
  34. "block",
  35. "case",
  36. "default",
  37. "doctype",
  38. "each",
  39. "else",
  40. "extends",
  41. "for",
  42. "if",
  43. "in",
  44. "include",
  45. "mixin",
  46. "typeof",
  47. "unless",
  48. "var",
  49. "when"
  50. ],
  51. tags: [
  52. "a",
  53. "abbr",
  54. "acronym",
  55. "address",
  56. "area",
  57. "article",
  58. "aside",
  59. "audio",
  60. "b",
  61. "base",
  62. "basefont",
  63. "bdi",
  64. "bdo",
  65. "blockquote",
  66. "body",
  67. "br",
  68. "button",
  69. "canvas",
  70. "caption",
  71. "center",
  72. "cite",
  73. "code",
  74. "col",
  75. "colgroup",
  76. "command",
  77. "datalist",
  78. "dd",
  79. "del",
  80. "details",
  81. "dfn",
  82. "div",
  83. "dl",
  84. "dt",
  85. "em",
  86. "embed",
  87. "fieldset",
  88. "figcaption",
  89. "figure",
  90. "font",
  91. "footer",
  92. "form",
  93. "frame",
  94. "frameset",
  95. "h1",
  96. "h2",
  97. "h3",
  98. "h4",
  99. "h5",
  100. "h6",
  101. "head",
  102. "header",
  103. "hgroup",
  104. "hr",
  105. "html",
  106. "i",
  107. "iframe",
  108. "img",
  109. "input",
  110. "ins",
  111. "keygen",
  112. "kbd",
  113. "label",
  114. "li",
  115. "link",
  116. "map",
  117. "mark",
  118. "menu",
  119. "meta",
  120. "meter",
  121. "nav",
  122. "noframes",
  123. "noscript",
  124. "object",
  125. "ol",
  126. "optgroup",
  127. "option",
  128. "output",
  129. "p",
  130. "param",
  131. "pre",
  132. "progress",
  133. "q",
  134. "rp",
  135. "rt",
  136. "ruby",
  137. "s",
  138. "samp",
  139. "script",
  140. "section",
  141. "select",
  142. "small",
  143. "source",
  144. "span",
  145. "strike",
  146. "strong",
  147. "style",
  148. "sub",
  149. "summary",
  150. "sup",
  151. "table",
  152. "tbody",
  153. "td",
  154. "textarea",
  155. "tfoot",
  156. "th",
  157. "thead",
  158. "time",
  159. "title",
  160. "tr",
  161. "tracks",
  162. "tt",
  163. "u",
  164. "ul",
  165. "video",
  166. "wbr"
  167. ],
  168. symbols: /[\+\-\*\%\&\|\!\=\/\.\,\:]+/,
  169. escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
  170. tokenizer: {
  171. root: [
  172. [
  173. /^(\s*)([a-zA-Z_-][\w-]*)/,
  174. {
  175. cases: {
  176. "$2@tags": {
  177. cases: {
  178. "@eos": ["", "tag"],
  179. "@default": ["", { token: "tag", next: "@tag.$1" }]
  180. }
  181. },
  182. "$2@keywords": ["", { token: "keyword.$2" }],
  183. "@default": ["", ""]
  184. }
  185. }
  186. ],
  187. [
  188. /^(\s*)(#[a-zA-Z_-][\w-]*)/,
  189. {
  190. cases: {
  191. "@eos": ["", "tag.id"],
  192. "@default": ["", { token: "tag.id", next: "@tag.$1" }]
  193. }
  194. }
  195. ],
  196. [
  197. /^(\s*)(\.[a-zA-Z_-][\w-]*)/,
  198. {
  199. cases: {
  200. "@eos": ["", "tag.class"],
  201. "@default": ["", { token: "tag.class", next: "@tag.$1" }]
  202. }
  203. }
  204. ],
  205. [/^(\s*)(\|.*)$/, ""],
  206. { include: "@whitespace" },
  207. [
  208. /[a-zA-Z_$][\w$]*/,
  209. {
  210. cases: {
  211. "@keywords": { token: "keyword.$0" },
  212. "@default": ""
  213. }
  214. }
  215. ],
  216. [/[{}()\[\]]/, "@brackets"],
  217. [/@symbols/, "delimiter"],
  218. [/\d+\.\d+([eE][\-+]?\d+)?/, "number.float"],
  219. [/\d+/, "number"],
  220. [/"/, "string", '@string."'],
  221. [/'/, "string", "@string.'"]
  222. ],
  223. tag: [
  224. [/(\.)(\s*$)/, [{ token: "delimiter", next: "@blockText.$S2." }, ""]],
  225. [/\s+/, { token: "", next: "@simpleText" }],
  226. [
  227. /#[a-zA-Z_-][\w-]*/,
  228. {
  229. cases: {
  230. "@eos": { token: "tag.id", next: "@pop" },
  231. "@default": "tag.id"
  232. }
  233. }
  234. ],
  235. [
  236. /\.[a-zA-Z_-][\w-]*/,
  237. {
  238. cases: {
  239. "@eos": { token: "tag.class", next: "@pop" },
  240. "@default": "tag.class"
  241. }
  242. }
  243. ],
  244. [/\(/, { token: "delimiter.parenthesis", next: "@attributeList" }]
  245. ],
  246. simpleText: [
  247. [/[^#]+$/, { token: "", next: "@popall" }],
  248. [/[^#]+/, { token: "" }],
  249. [
  250. /(#{)([^}]*)(})/,
  251. {
  252. cases: {
  253. "@eos": [
  254. "interpolation.delimiter",
  255. "interpolation",
  256. {
  257. token: "interpolation.delimiter",
  258. next: "@popall"
  259. }
  260. ],
  261. "@default": ["interpolation.delimiter", "interpolation", "interpolation.delimiter"]
  262. }
  263. }
  264. ],
  265. [/#$/, { token: "", next: "@popall" }],
  266. [/#/, ""]
  267. ],
  268. attributeList: [
  269. [/\s+/, ""],
  270. [
  271. /(\w+)(\s*=\s*)("|')/,
  272. ["attribute.name", "delimiter", { token: "attribute.value", next: "@value.$3" }]
  273. ],
  274. [/\w+/, "attribute.name"],
  275. [
  276. /,/,
  277. {
  278. cases: {
  279. "@eos": {
  280. token: "attribute.delimiter",
  281. next: "@popall"
  282. },
  283. "@default": "attribute.delimiter"
  284. }
  285. }
  286. ],
  287. [/\)$/, { token: "delimiter.parenthesis", next: "@popall" }],
  288. [/\)/, { token: "delimiter.parenthesis", next: "@pop" }]
  289. ],
  290. whitespace: [
  291. [/^(\s*)(\/\/.*)$/, { token: "comment", next: "@blockText.$1.comment" }],
  292. [/[ \t\r\n]+/, ""],
  293. [/<!--/, { token: "comment", next: "@comment" }]
  294. ],
  295. blockText: [
  296. [
  297. /^\s+.*$/,
  298. {
  299. cases: {
  300. "($S2\\s+.*$)": { token: "$S3" },
  301. "@default": { token: "@rematch", next: "@popall" }
  302. }
  303. }
  304. ],
  305. [/./, { token: "@rematch", next: "@popall" }]
  306. ],
  307. comment: [
  308. [/[^<\-]+/, "comment.content"],
  309. [/-->/, { token: "comment", next: "@pop" }],
  310. [/<!--/, "comment.content.invalid"],
  311. [/[<\-]/, "comment.content"]
  312. ],
  313. string: [
  314. [
  315. /[^\\"'#]+/,
  316. {
  317. cases: {
  318. "@eos": { token: "string", next: "@popall" },
  319. "@default": "string"
  320. }
  321. }
  322. ],
  323. [
  324. /@escapes/,
  325. {
  326. cases: {
  327. "@eos": { token: "string.escape", next: "@popall" },
  328. "@default": "string.escape"
  329. }
  330. }
  331. ],
  332. [
  333. /\\./,
  334. {
  335. cases: {
  336. "@eos": {
  337. token: "string.escape.invalid",
  338. next: "@popall"
  339. },
  340. "@default": "string.escape.invalid"
  341. }
  342. }
  343. ],
  344. [/(#{)([^}]*)(})/, ["interpolation.delimiter", "interpolation", "interpolation.delimiter"]],
  345. [/#/, "string"],
  346. [
  347. /["']/,
  348. {
  349. cases: {
  350. "$#==$S2": { token: "string", next: "@pop" },
  351. "@default": { token: "string" }
  352. }
  353. }
  354. ]
  355. ],
  356. value: [
  357. [
  358. /[^\\"']+/,
  359. {
  360. cases: {
  361. "@eos": { token: "attribute.value", next: "@popall" },
  362. "@default": "attribute.value"
  363. }
  364. }
  365. ],
  366. [
  367. /\\./,
  368. {
  369. cases: {
  370. "@eos": { token: "attribute.value", next: "@popall" },
  371. "@default": "attribute.value"
  372. }
  373. }
  374. ],
  375. [
  376. /["']/,
  377. {
  378. cases: {
  379. "$#==$S2": { token: "attribute.value", next: "@pop" },
  380. "@default": { token: "attribute.value" }
  381. }
  382. }
  383. ]
  384. ]
  385. }
  386. };
  387. export {
  388. conf,
  389. language
  390. };
  391. /*! Bundled license information:
  392. monaco-editor/esm/vs/basic-languages/pug/pug.js:
  393. (*!-----------------------------------------------------------------------------
  394. * Copyright (c) Microsoft Corporation. All rights reserved.
  395. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  396. * Released under the MIT license
  397. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  398. *-----------------------------------------------------------------------------*)
  399. */
  400. //# sourceMappingURL=pug-XYSXUFII.js.map