r-KREHUK5J.js 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. import "./chunk-2LSFTFF7.js";
  2. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/r/r.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: '"' }
  17. ],
  18. surroundingPairs: [
  19. { open: "{", close: "}" },
  20. { open: "[", close: "]" },
  21. { open: "(", close: ")" },
  22. { open: '"', close: '"' }
  23. ]
  24. };
  25. var language = {
  26. defaultToken: "",
  27. tokenPostfix: ".r",
  28. roxygen: [
  29. "@alias",
  30. "@aliases",
  31. "@assignee",
  32. "@author",
  33. "@backref",
  34. "@callGraph",
  35. "@callGraphDepth",
  36. "@callGraphPrimitives",
  37. "@concept",
  38. "@describeIn",
  39. "@description",
  40. "@details",
  41. "@docType",
  42. "@encoding",
  43. "@evalNamespace",
  44. "@evalRd",
  45. "@example",
  46. "@examples",
  47. "@export",
  48. "@exportClass",
  49. "@exportMethod",
  50. "@exportPattern",
  51. "@family",
  52. "@field",
  53. "@formals",
  54. "@format",
  55. "@import",
  56. "@importClassesFrom",
  57. "@importFrom",
  58. "@importMethodsFrom",
  59. "@include",
  60. "@inherit",
  61. "@inheritDotParams",
  62. "@inheritParams",
  63. "@inheritSection",
  64. "@keywords",
  65. "@md",
  66. "@method",
  67. "@name",
  68. "@noMd",
  69. "@noRd",
  70. "@note",
  71. "@param",
  72. "@rawNamespace",
  73. "@rawRd",
  74. "@rdname",
  75. "@references",
  76. "@return",
  77. "@S3method",
  78. "@section",
  79. "@seealso",
  80. "@setClass",
  81. "@slot",
  82. "@source",
  83. "@template",
  84. "@templateVar",
  85. "@title",
  86. "@TODO",
  87. "@usage",
  88. "@useDynLib"
  89. ],
  90. constants: [
  91. "NULL",
  92. "FALSE",
  93. "TRUE",
  94. "NA",
  95. "Inf",
  96. "NaN",
  97. "NA_integer_",
  98. "NA_real_",
  99. "NA_complex_",
  100. "NA_character_",
  101. "T",
  102. "F",
  103. "LETTERS",
  104. "letters",
  105. "month.abb",
  106. "month.name",
  107. "pi",
  108. "R.version.string"
  109. ],
  110. keywords: [
  111. "break",
  112. "next",
  113. "return",
  114. "if",
  115. "else",
  116. "for",
  117. "in",
  118. "repeat",
  119. "while",
  120. "array",
  121. "category",
  122. "character",
  123. "complex",
  124. "double",
  125. "function",
  126. "integer",
  127. "list",
  128. "logical",
  129. "matrix",
  130. "numeric",
  131. "vector",
  132. "data.frame",
  133. "factor",
  134. "library",
  135. "require",
  136. "attach",
  137. "detach",
  138. "source"
  139. ],
  140. special: ["\\n", "\\r", "\\t", "\\b", "\\a", "\\f", "\\v", "\\'", '\\"', "\\\\"],
  141. brackets: [
  142. { open: "{", close: "}", token: "delimiter.curly" },
  143. { open: "[", close: "]", token: "delimiter.bracket" },
  144. { open: "(", close: ")", token: "delimiter.parenthesis" }
  145. ],
  146. tokenizer: {
  147. root: [
  148. { include: "@numbers" },
  149. { include: "@strings" },
  150. [/[{}\[\]()]/, "@brackets"],
  151. { include: "@operators" },
  152. [/#'$/, "comment.doc"],
  153. [/#'/, "comment.doc", "@roxygen"],
  154. [/(^#.*$)/, "comment"],
  155. [/\s+/, "white"],
  156. [/[,:;]/, "delimiter"],
  157. [/@[a-zA-Z]\w*/, "tag"],
  158. [
  159. /[a-zA-Z]\w*/,
  160. {
  161. cases: {
  162. "@keywords": "keyword",
  163. "@constants": "constant",
  164. "@default": "identifier"
  165. }
  166. }
  167. ]
  168. ],
  169. roxygen: [
  170. [
  171. /@\w+/,
  172. {
  173. cases: {
  174. "@roxygen": "tag",
  175. "@eos": { token: "comment.doc", next: "@pop" },
  176. "@default": "comment.doc"
  177. }
  178. }
  179. ],
  180. [
  181. /\s+/,
  182. {
  183. cases: {
  184. "@eos": { token: "comment.doc", next: "@pop" },
  185. "@default": "comment.doc"
  186. }
  187. }
  188. ],
  189. [/.*/, { token: "comment.doc", next: "@pop" }]
  190. ],
  191. numbers: [
  192. [/0[xX][0-9a-fA-F]+/, "number.hex"],
  193. [/-?(\d*\.)?\d+([eE][+\-]?\d+)?/, "number"]
  194. ],
  195. operators: [
  196. [/<{1,2}-/, "operator"],
  197. [/->{1,2}/, "operator"],
  198. [/%[^%\s]+%/, "operator"],
  199. [/\*\*/, "operator"],
  200. [/%%/, "operator"],
  201. [/&&/, "operator"],
  202. [/\|\|/, "operator"],
  203. [/<</, "operator"],
  204. [/>>/, "operator"],
  205. [/[-+=&|!<>^~*/:$]/, "operator"]
  206. ],
  207. strings: [
  208. [/'/, "string.escape", "@stringBody"],
  209. [/"/, "string.escape", "@dblStringBody"]
  210. ],
  211. stringBody: [
  212. [
  213. /\\./,
  214. {
  215. cases: {
  216. "@special": "string",
  217. "@default": "error-token"
  218. }
  219. }
  220. ],
  221. [/'/, "string.escape", "@popall"],
  222. [/./, "string"]
  223. ],
  224. dblStringBody: [
  225. [
  226. /\\./,
  227. {
  228. cases: {
  229. "@special": "string",
  230. "@default": "error-token"
  231. }
  232. }
  233. ],
  234. [/"/, "string.escape", "@popall"],
  235. [/./, "string"]
  236. ]
  237. }
  238. };
  239. export {
  240. conf,
  241. language
  242. };
  243. /*! Bundled license information:
  244. monaco-editor/esm/vs/basic-languages/r/r.js:
  245. (*!-----------------------------------------------------------------------------
  246. * Copyright (c) Microsoft Corporation. All rights reserved.
  247. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  248. * Released under the MIT license
  249. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  250. *-----------------------------------------------------------------------------*)
  251. */
  252. //# sourceMappingURL=r-KREHUK5J.js.map