@codingame/monaco-vscode-standalone-languages 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/_.contribution.js +74 -0
  2. package/abap/abap.contribution.js +19 -0
  3. package/abap/abap.js +1406 -0
  4. package/apex/apex.contribution.js +20 -0
  5. package/apex/apex.js +338 -0
  6. package/azcli/azcli.contribution.js +19 -0
  7. package/azcli/azcli.js +76 -0
  8. package/bat/bat.contribution.js +19 -0
  9. package/bat/bat.js +108 -0
  10. package/bicep/bicep.contribution.js +19 -0
  11. package/bicep/bicep.js +117 -0
  12. package/cameligo/cameligo.contribution.js +19 -0
  13. package/cameligo/cameligo.js +182 -0
  14. package/clojure/clojure.contribution.js +19 -0
  15. package/clojure/clojure.js +769 -0
  16. package/coffee/coffee.contribution.js +20 -0
  17. package/coffee/coffee.js +240 -0
  18. package/cpp/cpp.contribution.js +29 -0
  19. package/cpp/cpp.js +409 -0
  20. package/csharp/csharp.contribution.js +19 -0
  21. package/csharp/csharp.js +334 -0
  22. package/csp/csp.contribution.js +19 -0
  23. package/csp/csp.js +61 -0
  24. package/css/css.contribution.js +20 -0
  25. package/css/css.js +193 -0
  26. package/cypher/cypher.contribution.js +19 -0
  27. package/cypher/cypher.js +271 -0
  28. package/dart/dart.contribution.js +20 -0
  29. package/dart/dart.js +289 -0
  30. package/dockerfile/dockerfile.contribution.js +20 -0
  31. package/dockerfile/dockerfile.js +138 -0
  32. package/ecl/ecl.contribution.js +19 -0
  33. package/ecl/ecl.js +464 -0
  34. package/elixir/elixir.contribution.js +19 -0
  35. package/elixir/elixir.js +577 -0
  36. package/flow9/flow9.contribution.js +19 -0
  37. package/flow9/flow9.js +150 -0
  38. package/freemarker2/freemarker2.contribution.js +73 -0
  39. package/freemarker2/freemarker2.js +1016 -0
  40. package/fsharp/fsharp.contribution.js +19 -0
  41. package/fsharp/fsharp.js +225 -0
  42. package/go/go.contribution.js +19 -0
  43. package/go/go.js +226 -0
  44. package/graphql/graphql.contribution.js +20 -0
  45. package/graphql/graphql.js +159 -0
  46. package/handlebars/handlebars.contribution.js +20 -0
  47. package/handlebars/handlebars.js +439 -0
  48. package/hcl/hcl.contribution.js +19 -0
  49. package/hcl/hcl.js +191 -0
  50. package/html/html.contribution.js +20 -0
  51. package/html/html.js +328 -0
  52. package/index.js +81 -0
  53. package/ini/ini.contribution.js +20 -0
  54. package/ini/ini.js +79 -0
  55. package/java/java.contribution.js +20 -0
  56. package/java/java.js +240 -0
  57. package/javascript/javascript.contribution.js +22 -0
  58. package/javascript/javascript.js +77 -0
  59. package/julia/julia.contribution.js +19 -0
  60. package/julia/julia.js +519 -0
  61. package/kotlin/kotlin.contribution.js +20 -0
  62. package/kotlin/kotlin.js +261 -0
  63. package/less/less.contribution.js +20 -0
  64. package/less/less.js +169 -0
  65. package/lexon/lexon.contribution.js +19 -0
  66. package/lexon/lexon.js +165 -0
  67. package/liquid/liquid.contribution.js +20 -0
  68. package/liquid/liquid.js +260 -0
  69. package/lua/lua.contribution.js +19 -0
  70. package/lua/lua.js +170 -0
  71. package/m3/m3.contribution.js +19 -0
  72. package/m3/m3.js +218 -0
  73. package/markdown/markdown.contribution.js +19 -0
  74. package/markdown/markdown.js +237 -0
  75. package/mdx/mdx.contribution.js +19 -0
  76. package/mdx/mdx.js +184 -0
  77. package/mips/mips.contribution.js +20 -0
  78. package/mips/mips.js +206 -0
  79. package/msdax/msdax.contribution.js +19 -0
  80. package/msdax/msdax.js +383 -0
  81. package/mysql/mysql.contribution.js +19 -0
  82. package/mysql/mysql.js +886 -0
  83. package/objective-c/objective-c.contribution.js +19 -0
  84. package/objective-c/objective-c.js +191 -0
  85. package/package.json +23 -0
  86. package/pascal/pascal.contribution.js +20 -0
  87. package/pascal/pascal.js +259 -0
  88. package/pascaligo/pascaligo.contribution.js +19 -0
  89. package/pascaligo/pascaligo.js +172 -0
  90. package/perl/perl.contribution.js +19 -0
  91. package/perl/perl.js +634 -0
  92. package/pgsql/pgsql.contribution.js +19 -0
  93. package/pgsql/pgsql.js +859 -0
  94. package/php/php.contribution.js +20 -0
  95. package/php/php.js +508 -0
  96. package/pla/pla.contribution.js +18 -0
  97. package/pla/pla.js +145 -0
  98. package/postiats/postiats.contribution.js +19 -0
  99. package/postiats/postiats.js +915 -0
  100. package/powerquery/powerquery.contribution.js +19 -0
  101. package/powerquery/powerquery.js +898 -0
  102. package/powershell/powershell.contribution.js +19 -0
  103. package/powershell/powershell.js +247 -0
  104. package/protobuf/protobuf.contribution.js +19 -0
  105. package/protobuf/protobuf.js +428 -0
  106. package/pug/pug.contribution.js +19 -0
  107. package/pug/pug.js +410 -0
  108. package/python/python.contribution.js +20 -0
  109. package/python/python.js +295 -0
  110. package/qsharp/qsharp.contribution.js +19 -0
  111. package/qsharp/qsharp.js +293 -0
  112. package/r/r.contribution.js +19 -0
  113. package/r/r.js +251 -0
  114. package/razor/razor.contribution.js +20 -0
  115. package/razor/razor.js +570 -0
  116. package/redis/redis.contribution.js +19 -0
  117. package/redis/redis.js +310 -0
  118. package/redshift/redshift.contribution.js +19 -0
  119. package/redshift/redshift.js +817 -0
  120. package/restructuredtext/restructuredtext.contribution.js +19 -0
  121. package/restructuredtext/restructuredtext.js +182 -0
  122. package/ruby/ruby.contribution.js +20 -0
  123. package/ruby/ruby.js +519 -0
  124. package/rust/rust.contribution.js +19 -0
  125. package/rust/rust.js +351 -0
  126. package/sb/sb.contribution.js +19 -0
  127. package/sb/sb.js +123 -0
  128. package/scala/scala.contribution.js +20 -0
  129. package/scala/scala.js +378 -0
  130. package/scheme/scheme.contribution.js +19 -0
  131. package/scheme/scheme.js +116 -0
  132. package/scss/scss.contribution.js +20 -0
  133. package/scss/scss.js +268 -0
  134. package/shell/shell.contribution.js +19 -0
  135. package/shell/shell.js +229 -0
  136. package/solidity/solidity.contribution.js +19 -0
  137. package/solidity/solidity.js +1375 -0
  138. package/sophia/sophia.contribution.js +19 -0
  139. package/sophia/sophia.js +207 -0
  140. package/sparql/sparql.contribution.js +19 -0
  141. package/sparql/sparql.js +209 -0
  142. package/sql/sql.contribution.js +19 -0
  143. package/sql/sql.js +861 -0
  144. package/st/st.contribution.js +19 -0
  145. package/st/st.js +424 -0
  146. package/swift/swift.contribution.js +20 -0
  147. package/swift/swift.js +320 -0
  148. package/systemverilog/systemverilog.contribution.js +29 -0
  149. package/systemverilog/systemverilog.js +584 -0
  150. package/tcl/tcl.contribution.js +19 -0
  151. package/tcl/tcl.js +240 -0
  152. package/twig/twig.contribution.js +20 -0
  153. package/twig/twig.js +400 -0
  154. package/typescript/typescript.contribution.js +20 -0
  155. package/typescript/typescript.js +362 -0
  156. package/vb/vb.contribution.js +19 -0
  157. package/vb/vb.js +380 -0
  158. package/wgsl/wgsl.contribution.js +19 -0
  159. package/wgsl/wgsl.js +461 -0
  160. package/xml/xml.contribution.js +39 -0
  161. package/xml/xml.js +114 -0
  162. package/yaml/yaml.contribution.js +20 -0
  163. package/yaml/yaml.js +225 -0
@@ -0,0 +1,295 @@
1
+ import * as monaco_editor_core_star from 'monaco-editor';
2
+
3
+ /*!-----------------------------------------------------------------------------
4
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5
+ * Version: 0.47.0(undefined)
6
+ * Released under the MIT license
7
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
8
+ *-----------------------------------------------------------------------------*/
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from))
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
+ }
20
+ return to;
21
+ };
22
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
23
+
24
+ // src/fillers/monaco-editor-core.ts
25
+ var monaco_editor_core_exports = {};
26
+ __reExport(monaco_editor_core_exports, monaco_editor_core_star);
27
+
28
+ // src/basic-languages/python/python.ts
29
+ var conf = {
30
+ comments: {
31
+ lineComment: "#",
32
+ blockComment: ["'''", "'''"]
33
+ },
34
+ brackets: [
35
+ ["{", "}"],
36
+ ["[", "]"],
37
+ ["(", ")"]
38
+ ],
39
+ autoClosingPairs: [
40
+ { open: "{", close: "}" },
41
+ { open: "[", close: "]" },
42
+ { open: "(", close: ")" },
43
+ { open: '"', close: '"', notIn: ["string"] },
44
+ { open: "'", close: "'", notIn: ["string", "comment"] }
45
+ ],
46
+ surroundingPairs: [
47
+ { open: "{", close: "}" },
48
+ { open: "[", close: "]" },
49
+ { open: "(", close: ")" },
50
+ { open: '"', close: '"' },
51
+ { open: "'", close: "'" }
52
+ ],
53
+ onEnterRules: [
54
+ {
55
+ beforeText: new RegExp(
56
+ "^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"
57
+ ),
58
+ action: { indentAction: monaco_editor_core_exports.languages.IndentAction.Indent }
59
+ }
60
+ ],
61
+ folding: {
62
+ offSide: true,
63
+ markers: {
64
+ start: new RegExp("^\\s*#region\\b"),
65
+ end: new RegExp("^\\s*#endregion\\b")
66
+ }
67
+ }
68
+ };
69
+ var language = {
70
+ defaultToken: "",
71
+ tokenPostfix: ".python",
72
+ keywords: [
73
+ // This section is the result of running
74
+ // `import keyword; for k in sorted(keyword.kwlist + keyword.softkwlist): print(" '" + k + "',")`
75
+ // in a Python REPL,
76
+ // though note that the output from Python 3 is not a strict superset of the
77
+ // output from Python 2.
78
+ "False",
79
+ // promoted to keyword.kwlist in Python 3
80
+ "None",
81
+ // promoted to keyword.kwlist in Python 3
82
+ "True",
83
+ // promoted to keyword.kwlist in Python 3
84
+ "_",
85
+ // new in Python 3.10
86
+ "and",
87
+ "as",
88
+ "assert",
89
+ "async",
90
+ // new in Python 3
91
+ "await",
92
+ // new in Python 3
93
+ "break",
94
+ "case",
95
+ // new in Python 3.10
96
+ "class",
97
+ "continue",
98
+ "def",
99
+ "del",
100
+ "elif",
101
+ "else",
102
+ "except",
103
+ "exec",
104
+ // Python 2, but not 3.
105
+ "finally",
106
+ "for",
107
+ "from",
108
+ "global",
109
+ "if",
110
+ "import",
111
+ "in",
112
+ "is",
113
+ "lambda",
114
+ "match",
115
+ // new in Python 3.10
116
+ "nonlocal",
117
+ // new in Python 3
118
+ "not",
119
+ "or",
120
+ "pass",
121
+ "print",
122
+ // Python 2, but not 3.
123
+ "raise",
124
+ "return",
125
+ "try",
126
+ "type",
127
+ // new in Python 3.12
128
+ "while",
129
+ "with",
130
+ "yield",
131
+ "int",
132
+ "float",
133
+ "long",
134
+ "complex",
135
+ "hex",
136
+ "abs",
137
+ "all",
138
+ "any",
139
+ "apply",
140
+ "basestring",
141
+ "bin",
142
+ "bool",
143
+ "buffer",
144
+ "bytearray",
145
+ "callable",
146
+ "chr",
147
+ "classmethod",
148
+ "cmp",
149
+ "coerce",
150
+ "compile",
151
+ "complex",
152
+ "delattr",
153
+ "dict",
154
+ "dir",
155
+ "divmod",
156
+ "enumerate",
157
+ "eval",
158
+ "execfile",
159
+ "file",
160
+ "filter",
161
+ "format",
162
+ "frozenset",
163
+ "getattr",
164
+ "globals",
165
+ "hasattr",
166
+ "hash",
167
+ "help",
168
+ "id",
169
+ "input",
170
+ "intern",
171
+ "isinstance",
172
+ "issubclass",
173
+ "iter",
174
+ "len",
175
+ "locals",
176
+ "list",
177
+ "map",
178
+ "max",
179
+ "memoryview",
180
+ "min",
181
+ "next",
182
+ "object",
183
+ "oct",
184
+ "open",
185
+ "ord",
186
+ "pow",
187
+ "print",
188
+ "property",
189
+ "reversed",
190
+ "range",
191
+ "raw_input",
192
+ "reduce",
193
+ "reload",
194
+ "repr",
195
+ "reversed",
196
+ "round",
197
+ "self",
198
+ "set",
199
+ "setattr",
200
+ "slice",
201
+ "sorted",
202
+ "staticmethod",
203
+ "str",
204
+ "sum",
205
+ "super",
206
+ "tuple",
207
+ "type",
208
+ "unichr",
209
+ "unicode",
210
+ "vars",
211
+ "xrange",
212
+ "zip",
213
+ "__dict__",
214
+ "__methods__",
215
+ "__members__",
216
+ "__class__",
217
+ "__bases__",
218
+ "__name__",
219
+ "__mro__",
220
+ "__subclasses__",
221
+ "__init__",
222
+ "__import__"
223
+ ],
224
+ brackets: [
225
+ { open: "{", close: "}", token: "delimiter.curly" },
226
+ { open: "[", close: "]", token: "delimiter.bracket" },
227
+ { open: "(", close: ")", token: "delimiter.parenthesis" }
228
+ ],
229
+ tokenizer: {
230
+ root: [
231
+ { include: "@whitespace" },
232
+ { include: "@numbers" },
233
+ { include: "@strings" },
234
+ [/[,:;]/, "delimiter"],
235
+ [/[{}\[\]()]/, "@brackets"],
236
+ [/@[a-zA-Z_]\w*/, "tag"],
237
+ [
238
+ /[a-zA-Z_]\w*/,
239
+ {
240
+ cases: {
241
+ "@keywords": "keyword",
242
+ "@default": "identifier"
243
+ }
244
+ }
245
+ ]
246
+ ],
247
+ // Deal with white space, including single and multi-line comments
248
+ whitespace: [
249
+ [/\s+/, "white"],
250
+ [/(^#.*$)/, "comment"],
251
+ [/'''/, "string", "@endDocString"],
252
+ [/"""/, "string", "@endDblDocString"]
253
+ ],
254
+ endDocString: [
255
+ [/[^']+/, "string"],
256
+ [/\\'/, "string"],
257
+ [/'''/, "string", "@popall"],
258
+ [/'/, "string"]
259
+ ],
260
+ endDblDocString: [
261
+ [/[^"]+/, "string"],
262
+ [/\\"/, "string"],
263
+ [/"""/, "string", "@popall"],
264
+ [/"/, "string"]
265
+ ],
266
+ // Recognize hex, negatives, decimals, imaginaries, longs, and scientific notation
267
+ numbers: [
268
+ [/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/, "number.hex"],
269
+ [/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/, "number"]
270
+ ],
271
+ // Recognize strings, including those broken across lines with \ (but not without)
272
+ strings: [
273
+ [/'$/, "string.escape", "@popall"],
274
+ [/'/, "string.escape", "@stringBody"],
275
+ [/"$/, "string.escape", "@popall"],
276
+ [/"/, "string.escape", "@dblStringBody"]
277
+ ],
278
+ stringBody: [
279
+ [/[^\\']+$/, "string", "@popall"],
280
+ [/[^\\']+/, "string"],
281
+ [/\\./, "string"],
282
+ [/'/, "string.escape", "@popall"],
283
+ [/\\$/, "string"]
284
+ ],
285
+ dblStringBody: [
286
+ [/[^\\"]+$/, "string", "@popall"],
287
+ [/[^\\"]+/, "string"],
288
+ [/\\./, "string"],
289
+ [/"/, "string.escape", "@popall"],
290
+ [/\\$/, "string"]
291
+ ]
292
+ }
293
+ };
294
+
295
+ export { conf, language };
@@ -0,0 +1,19 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ /*!-----------------------------------------------------------------------------
4
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5
+ * Version: 0.47.0(undefined)
6
+ * Released under the MIT license
7
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
8
+ *-----------------------------------------------------------------------------*/
9
+
10
+ registerLanguage({
11
+ id: "qsharp",
12
+ extensions: [".qs"],
13
+ aliases: ["Q#", "qsharp"],
14
+ loader: () => {
15
+ {
16
+ return import('./qsharp.js');
17
+ }
18
+ }
19
+ });
@@ -0,0 +1,293 @@
1
+ /*!-----------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Version: 0.47.0(undefined)
4
+ * Released under the MIT license
5
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
6
+ *-----------------------------------------------------------------------------*/
7
+
8
+
9
+ // src/basic-languages/qsharp/qsharp.ts
10
+ var conf = {
11
+ comments: {
12
+ lineComment: "//"
13
+ },
14
+ brackets: [
15
+ ["{", "}"],
16
+ ["[", "]"],
17
+ ["(", ")"]
18
+ ],
19
+ autoClosingPairs: [
20
+ { open: "{", close: "}" },
21
+ { open: "[", close: "]" },
22
+ { open: "(", close: ")" },
23
+ { open: '"', close: '"', notIn: ["string", "comment"] }
24
+ ],
25
+ surroundingPairs: [
26
+ { open: "{", close: "}" },
27
+ { open: "[", close: "]" },
28
+ { open: "(", close: ")" },
29
+ { open: '"', close: '"' }
30
+ ]
31
+ };
32
+ var language = {
33
+ // Set defaultToken to invalid to see what you do not tokenize yet
34
+ keywords: [
35
+ "namespace",
36
+ "open",
37
+ "as",
38
+ "operation",
39
+ "function",
40
+ "body",
41
+ "adjoint",
42
+ "newtype",
43
+ "controlled",
44
+ "if",
45
+ "elif",
46
+ "else",
47
+ "repeat",
48
+ "until",
49
+ "fixup",
50
+ "for",
51
+ "in",
52
+ "while",
53
+ "return",
54
+ "fail",
55
+ "within",
56
+ "apply",
57
+ "Adjoint",
58
+ "Controlled",
59
+ "Adj",
60
+ "Ctl",
61
+ "is",
62
+ "self",
63
+ "auto",
64
+ "distribute",
65
+ "invert",
66
+ "intrinsic",
67
+ "let",
68
+ "set",
69
+ "w/",
70
+ "new",
71
+ "not",
72
+ "and",
73
+ "or",
74
+ "use",
75
+ "borrow",
76
+ "using",
77
+ "borrowing",
78
+ "mutable",
79
+ "internal"
80
+ ],
81
+ typeKeywords: [
82
+ "Unit",
83
+ "Int",
84
+ "BigInt",
85
+ "Double",
86
+ "Bool",
87
+ "String",
88
+ "Qubit",
89
+ "Result",
90
+ "Pauli",
91
+ "Range"
92
+ ],
93
+ invalidKeywords: [
94
+ "abstract",
95
+ "base",
96
+ "bool",
97
+ "break",
98
+ "byte",
99
+ "case",
100
+ "catch",
101
+ "char",
102
+ "checked",
103
+ "class",
104
+ "const",
105
+ "continue",
106
+ "decimal",
107
+ "default",
108
+ "delegate",
109
+ "do",
110
+ "double",
111
+ "enum",
112
+ "event",
113
+ "explicit",
114
+ "extern",
115
+ "finally",
116
+ "fixed",
117
+ "float",
118
+ "foreach",
119
+ "goto",
120
+ "implicit",
121
+ "int",
122
+ "interface",
123
+ "lock",
124
+ "long",
125
+ "null",
126
+ "object",
127
+ "operator",
128
+ "out",
129
+ "override",
130
+ "params",
131
+ "private",
132
+ "protected",
133
+ "public",
134
+ "readonly",
135
+ "ref",
136
+ "sbyte",
137
+ "sealed",
138
+ "short",
139
+ "sizeof",
140
+ "stackalloc",
141
+ "static",
142
+ "string",
143
+ "struct",
144
+ "switch",
145
+ "this",
146
+ "throw",
147
+ "try",
148
+ "typeof",
149
+ "unit",
150
+ "ulong",
151
+ "unchecked",
152
+ "unsafe",
153
+ "ushort",
154
+ "virtual",
155
+ "void",
156
+ "volatile"
157
+ ],
158
+ constants: ["true", "false", "PauliI", "PauliX", "PauliY", "PauliZ", "One", "Zero"],
159
+ builtin: [
160
+ "X",
161
+ "Y",
162
+ "Z",
163
+ "H",
164
+ "HY",
165
+ "S",
166
+ "T",
167
+ "SWAP",
168
+ "CNOT",
169
+ "CCNOT",
170
+ "MultiX",
171
+ "R",
172
+ "RFrac",
173
+ "Rx",
174
+ "Ry",
175
+ "Rz",
176
+ "R1",
177
+ "R1Frac",
178
+ "Exp",
179
+ "ExpFrac",
180
+ "Measure",
181
+ "M",
182
+ "MultiM",
183
+ "Message",
184
+ "Length",
185
+ "Assert",
186
+ "AssertProb",
187
+ "AssertEqual"
188
+ ],
189
+ operators: [
190
+ "and=",
191
+ "<-",
192
+ "->",
193
+ "*",
194
+ "*=",
195
+ "@",
196
+ "!",
197
+ "^",
198
+ "^=",
199
+ ":",
200
+ "::",
201
+ "..",
202
+ "==",
203
+ "...",
204
+ "=",
205
+ "=>",
206
+ ">",
207
+ ">=",
208
+ "<",
209
+ "<=",
210
+ "-",
211
+ "-=",
212
+ "!=",
213
+ "or=",
214
+ "%",
215
+ "%=",
216
+ "|",
217
+ "+",
218
+ "+=",
219
+ "?",
220
+ "/",
221
+ "/=",
222
+ "&&&",
223
+ "&&&=",
224
+ "^^^",
225
+ "^^^=",
226
+ ">>>",
227
+ ">>>=",
228
+ "<<<",
229
+ "<<<=",
230
+ "|||",
231
+ "|||=",
232
+ "~~~",
233
+ "_",
234
+ "w/",
235
+ "w/="
236
+ ],
237
+ namespaceFollows: ["namespace", "open"],
238
+ symbols: /[=><!~?:&|+\-*\/\^%@._]+/,
239
+ escapes: /\\[\s\S]/,
240
+ // The main tokenizer for our languages
241
+ tokenizer: {
242
+ root: [
243
+ // identifiers and keywords
244
+ [
245
+ /[a-zA-Z_$][\w$]*/,
246
+ {
247
+ cases: {
248
+ "@namespaceFollows": {
249
+ token: "keyword.$0",
250
+ next: "@namespace"
251
+ },
252
+ "@typeKeywords": "type",
253
+ "@keywords": "keyword",
254
+ "@constants": "constant",
255
+ "@builtin": "keyword",
256
+ "@invalidKeywords": "invalid",
257
+ "@default": "identifier"
258
+ }
259
+ }
260
+ ],
261
+ // whitespace
262
+ { include: "@whitespace" },
263
+ // delimiters and operators
264
+ [/[{}()\[\]]/, "@brackets"],
265
+ [/@symbols/, { cases: { "@operators": "operator", "@default": "" } }],
266
+ // numbers
267
+ [/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
268
+ [/\d+/, "number"],
269
+ // delimiter: after number because of .\d floats
270
+ [/[;,.]/, "delimiter"],
271
+ // strings
272
+ //[/"([^"\\]|\\.)*$/, 'string.invalid' ], // non-teminated string
273
+ [/"/, { token: "string.quote", bracket: "@open", next: "@string" }]
274
+ ],
275
+ string: [
276
+ [/[^\\"]+/, "string"],
277
+ [/@escapes/, "string.escape"],
278
+ [/"/, { token: "string.quote", bracket: "@close", next: "@pop" }]
279
+ ],
280
+ namespace: [
281
+ { include: "@whitespace" },
282
+ [/[A-Za-z]\w*/, "namespace"],
283
+ [/[\.=]/, "delimiter"],
284
+ ["", "", "@pop"]
285
+ ],
286
+ whitespace: [
287
+ [/[ \t\r\n]+/, "white"],
288
+ [/(\/\/).*/, "comment"]
289
+ ]
290
+ }
291
+ };
292
+
293
+ export { conf, language };
@@ -0,0 +1,19 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ /*!-----------------------------------------------------------------------------
4
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5
+ * Version: 0.47.0(undefined)
6
+ * Released under the MIT license
7
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
8
+ *-----------------------------------------------------------------------------*/
9
+
10
+ registerLanguage({
11
+ id: "r",
12
+ extensions: [".r", ".rhistory", ".rmd", ".rprofile", ".rt"],
13
+ aliases: ["R", "r"],
14
+ loader: () => {
15
+ {
16
+ return import('./r.js');
17
+ }
18
+ }
19
+ });