lua-ZUORWUPJ.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. import "./chunk-2LSFTFF7.js";
  2. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/lua/lua.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. ],
  20. surroundingPairs: [
  21. { open: "{", close: "}" },
  22. { open: "[", close: "]" },
  23. { open: "(", close: ")" },
  24. { open: '"', close: '"' },
  25. { open: "'", close: "'" }
  26. ]
  27. };
  28. var language = {
  29. defaultToken: "",
  30. tokenPostfix: ".lua",
  31. keywords: [
  32. "and",
  33. "break",
  34. "do",
  35. "else",
  36. "elseif",
  37. "end",
  38. "false",
  39. "for",
  40. "function",
  41. "goto",
  42. "if",
  43. "in",
  44. "local",
  45. "nil",
  46. "not",
  47. "or",
  48. "repeat",
  49. "return",
  50. "then",
  51. "true",
  52. "until",
  53. "while"
  54. ],
  55. brackets: [
  56. { token: "delimiter.bracket", open: "{", close: "}" },
  57. { token: "delimiter.array", open: "[", close: "]" },
  58. { token: "delimiter.parenthesis", open: "(", close: ")" }
  59. ],
  60. operators: [
  61. "+",
  62. "-",
  63. "*",
  64. "/",
  65. "%",
  66. "^",
  67. "#",
  68. "==",
  69. "~=",
  70. "<=",
  71. ">=",
  72. "<",
  73. ">",
  74. "=",
  75. ";",
  76. ":",
  77. ",",
  78. ".",
  79. "..",
  80. "..."
  81. ],
  82. symbols: /[=><!~?:&|+\-*\/\^%]+/,
  83. escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
  84. tokenizer: {
  85. root: [
  86. [
  87. /[a-zA-Z_]\w*/,
  88. {
  89. cases: {
  90. "@keywords": { token: "keyword.$0" },
  91. "@default": "identifier"
  92. }
  93. }
  94. ],
  95. { include: "@whitespace" },
  96. [/(,)(\s*)([a-zA-Z_]\w*)(\s*)(:)(?!:)/, ["delimiter", "", "key", "", "delimiter"]],
  97. [/({)(\s*)([a-zA-Z_]\w*)(\s*)(:)(?!:)/, ["@brackets", "", "key", "", "delimiter"]],
  98. [/[{}()\[\]]/, "@brackets"],
  99. [
  100. /@symbols/,
  101. {
  102. cases: {
  103. "@operators": "delimiter",
  104. "@default": ""
  105. }
  106. }
  107. ],
  108. [/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
  109. [/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, "number.hex"],
  110. [/\d+?/, "number"],
  111. [/[;,.]/, "delimiter"],
  112. [/"([^"\\]|\\.)*$/, "string.invalid"],
  113. [/'([^'\\]|\\.)*$/, "string.invalid"],
  114. [/"/, "string", '@string."'],
  115. [/'/, "string", "@string.'"]
  116. ],
  117. whitespace: [
  118. [/[ \t\r\n]+/, ""],
  119. [/--\[([=]*)\[/, "comment", "@comment.$1"],
  120. [/--.*$/, "comment"]
  121. ],
  122. comment: [
  123. [/[^\]]+/, "comment"],
  124. [
  125. /\]([=]*)\]/,
  126. {
  127. cases: {
  128. "$1==$S2": { token: "comment", next: "@pop" },
  129. "@default": "comment"
  130. }
  131. }
  132. ],
  133. [/./, "comment"]
  134. ],
  135. string: [
  136. [/[^\\"']+/, "string"],
  137. [/@escapes/, "string.escape"],
  138. [/\\./, "string.escape.invalid"],
  139. [
  140. /["']/,
  141. {
  142. cases: {
  143. "$#==$S2": { token: "string", next: "@pop" },
  144. "@default": "string"
  145. }
  146. }
  147. ]
  148. ]
  149. }
  150. };
  151. export {
  152. conf,
  153. language
  154. };
  155. /*! Bundled license information:
  156. monaco-editor/esm/vs/basic-languages/lua/lua.js:
  157. (*!-----------------------------------------------------------------------------
  158. * Copyright (c) Microsoft Corporation. All rights reserved.
  159. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  160. * Released under the MIT license
  161. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  162. *-----------------------------------------------------------------------------*)
  163. */
  164. //# sourceMappingURL=lua-ZUORWUPJ.js.map