@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,237 @@
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/markdown/markdown.ts
10
+ var conf = {
11
+ comments: {
12
+ blockComment: ["<!--", "-->"]
13
+ },
14
+ brackets: [
15
+ ["{", "}"],
16
+ ["[", "]"],
17
+ ["(", ")"]
18
+ ],
19
+ autoClosingPairs: [
20
+ { open: "{", close: "}" },
21
+ { open: "[", close: "]" },
22
+ { open: "(", close: ")" },
23
+ { open: "<", close: ">", notIn: ["string"] }
24
+ ],
25
+ surroundingPairs: [
26
+ { open: "(", close: ")" },
27
+ { open: "[", close: "]" },
28
+ { open: "`", close: "`" }
29
+ ],
30
+ folding: {
31
+ markers: {
32
+ start: new RegExp("^\\s*<!--\\s*#?region\\b.*-->"),
33
+ end: new RegExp("^\\s*<!--\\s*#?endregion\\b.*-->")
34
+ }
35
+ }
36
+ };
37
+ var language = {
38
+ defaultToken: "",
39
+ tokenPostfix: ".md",
40
+ // escape codes
41
+ control: /[\\`*_\[\]{}()#+\-\.!]/,
42
+ noncontrol: /[^\\`*_\[\]{}()#+\-\.!]/,
43
+ escapes: /\\(?:@control)/,
44
+ // escape codes for javascript/CSS strings
45
+ jsescapes: /\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,
46
+ // non matched elements
47
+ empty: [
48
+ "area",
49
+ "base",
50
+ "basefont",
51
+ "br",
52
+ "col",
53
+ "frame",
54
+ "hr",
55
+ "img",
56
+ "input",
57
+ "isindex",
58
+ "link",
59
+ "meta",
60
+ "param"
61
+ ],
62
+ tokenizer: {
63
+ root: [
64
+ // markdown tables
65
+ [/^\s*\|/, "@rematch", "@table_header"],
66
+ // headers (with #)
67
+ [/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/, ["white", "keyword", "keyword", "keyword"]],
68
+ // headers (with =)
69
+ [/^\s*(=+|\-+)\s*$/, "keyword"],
70
+ // headers (with ***)
71
+ [/^\s*((\*[ ]?)+)\s*$/, "meta.separator"],
72
+ // quote
73
+ [/^\s*>+/, "comment"],
74
+ // list (starting with * or number)
75
+ [/^\s*([\*\-+:]|\d+\.)\s/, "keyword"],
76
+ // code block (4 spaces indent)
77
+ [/^(\t|[ ]{4})[^ ].*$/, "string"],
78
+ // code block (3 tilde)
79
+ [/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/, { token: "string", next: "@codeblock" }],
80
+ // github style code blocks (with backticks and language)
81
+ [
82
+ /^\s*```\s*((?:\w|[\/\-#])+).*$/,
83
+ { token: "string", next: "@codeblockgh", nextEmbedded: "$1" }
84
+ ],
85
+ // github style code blocks (with backticks but no language)
86
+ [/^\s*```\s*$/, { token: "string", next: "@codeblock" }],
87
+ // markup within lines
88
+ { include: "@linecontent" }
89
+ ],
90
+ table_header: [
91
+ { include: "@table_common" },
92
+ [/[^\|]+/, "keyword.table.header"]
93
+ // table header
94
+ ],
95
+ table_body: [{ include: "@table_common" }, { include: "@linecontent" }],
96
+ table_common: [
97
+ [/\s*[\-:]+\s*/, { token: "keyword", switchTo: "table_body" }],
98
+ // header-divider
99
+ [/^\s*\|/, "keyword.table.left"],
100
+ // opening |
101
+ [/^\s*[^\|]/, "@rematch", "@pop"],
102
+ // exiting
103
+ [/^\s*$/, "@rematch", "@pop"],
104
+ // exiting
105
+ [
106
+ /\|/,
107
+ {
108
+ cases: {
109
+ "@eos": "keyword.table.right",
110
+ // closing |
111
+ "@default": "keyword.table.middle"
112
+ // inner |
113
+ }
114
+ }
115
+ ]
116
+ ],
117
+ codeblock: [
118
+ [/^\s*~~~\s*$/, { token: "string", next: "@pop" }],
119
+ [/^\s*```\s*$/, { token: "string", next: "@pop" }],
120
+ [/.*$/, "variable.source"]
121
+ ],
122
+ // github style code blocks
123
+ codeblockgh: [
124
+ [/```\s*$/, { token: "string", next: "@pop", nextEmbedded: "@pop" }],
125
+ [/[^`]+/, "variable.source"]
126
+ ],
127
+ linecontent: [
128
+ // escapes
129
+ [/&\w+;/, "string.escape"],
130
+ [/@escapes/, "escape"],
131
+ // various markup
132
+ [/\b__([^\\_]|@escapes|_(?!_))+__\b/, "strong"],
133
+ [/\*\*([^\\*]|@escapes|\*(?!\*))+\*\*/, "strong"],
134
+ [/\b_[^_]+_\b/, "emphasis"],
135
+ [/\*([^\\*]|@escapes)+\*/, "emphasis"],
136
+ [/`([^\\`]|@escapes)+`/, "variable"],
137
+ // links
138
+ [/\{+[^}]+\}+/, "string.target"],
139
+ [/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/, ["string.link", "", "string.link"]],
140
+ [/(!?\[)((?:[^\]\\]|@escapes)*)(\])/, "string.link"],
141
+ // or html
142
+ { include: "html" }
143
+ ],
144
+ // Note: it is tempting to rather switch to the real HTML mode instead of building our own here
145
+ // but currently there is a limitation in Monarch that prevents us from doing it: The opening
146
+ // '<' would start the HTML mode, however there is no way to jump 1 character back to let the
147
+ // HTML mode also tokenize the opening angle bracket. Thus, even though we could jump to HTML,
148
+ // we cannot correctly tokenize it in that mode yet.
149
+ html: [
150
+ // html tags
151
+ [/<(\w+)\/>/, "tag"],
152
+ [
153
+ /<(\w+)(\-|\w)*/,
154
+ {
155
+ cases: {
156
+ "@empty": { token: "tag", next: "@tag.$1" },
157
+ "@default": { token: "tag", next: "@tag.$1" }
158
+ }
159
+ }
160
+ ],
161
+ [/<\/(\w+)(\-|\w)*\s*>/, { token: "tag" }],
162
+ [/<!--/, "comment", "@comment"]
163
+ ],
164
+ comment: [
165
+ [/[^<\-]+/, "comment.content"],
166
+ [/-->/, "comment", "@pop"],
167
+ [/<!--/, "comment.content.invalid"],
168
+ [/[<\-]/, "comment.content"]
169
+ ],
170
+ // Almost full HTML tag matching, complete with embedded scripts & styles
171
+ tag: [
172
+ [/[ \t\r\n]+/, "white"],
173
+ [
174
+ /(type)(\s*=\s*)(")([^"]+)(")/,
175
+ [
176
+ "attribute.name.html",
177
+ "delimiter.html",
178
+ "string.html",
179
+ { token: "string.html", switchTo: "@tag.$S2.$4" },
180
+ "string.html"
181
+ ]
182
+ ],
183
+ [
184
+ /(type)(\s*=\s*)(')([^']+)(')/,
185
+ [
186
+ "attribute.name.html",
187
+ "delimiter.html",
188
+ "string.html",
189
+ { token: "string.html", switchTo: "@tag.$S2.$4" },
190
+ "string.html"
191
+ ]
192
+ ],
193
+ [/(\w+)(\s*=\s*)("[^"]*"|'[^']*')/, ["attribute.name.html", "delimiter.html", "string.html"]],
194
+ [/\w+/, "attribute.name.html"],
195
+ [/\/>/, "tag", "@pop"],
196
+ [
197
+ />/,
198
+ {
199
+ cases: {
200
+ "$S2==style": {
201
+ token: "tag",
202
+ switchTo: "embeddedStyle",
203
+ nextEmbedded: "text/css"
204
+ },
205
+ "$S2==script": {
206
+ cases: {
207
+ $S3: {
208
+ token: "tag",
209
+ switchTo: "embeddedScript",
210
+ nextEmbedded: "$S3"
211
+ },
212
+ "@default": {
213
+ token: "tag",
214
+ switchTo: "embeddedScript",
215
+ nextEmbedded: "text/javascript"
216
+ }
217
+ }
218
+ },
219
+ "@default": { token: "tag", next: "@pop" }
220
+ }
221
+ }
222
+ ]
223
+ ],
224
+ embeddedStyle: [
225
+ [/[^<]+/, ""],
226
+ [/<\/style\s*>/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
227
+ [/</, ""]
228
+ ],
229
+ embeddedScript: [
230
+ [/[^<]+/, ""],
231
+ [/<\/script\s*>/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
232
+ [/</, ""]
233
+ ]
234
+ }
235
+ };
236
+
237
+ 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: "mdx",
12
+ extensions: [".mdx"],
13
+ aliases: ["MDX", "mdx"],
14
+ loader: () => {
15
+ {
16
+ return import('./mdx.js');
17
+ }
18
+ }
19
+ });
package/mdx/mdx.js ADDED
@@ -0,0 +1,184 @@
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/mdx/mdx.ts
29
+ var conf = {
30
+ comments: {
31
+ blockComment: ["{/*", "*/}"]
32
+ },
33
+ brackets: [["{", "}"]],
34
+ autoClosingPairs: [
35
+ { open: '"', close: '"' },
36
+ { open: "'", close: "'" },
37
+ { open: "\u201C", close: "\u201D" },
38
+ { open: "\u2018", close: "\u2019" },
39
+ { open: "`", close: "`" },
40
+ { open: "{", close: "}" },
41
+ { open: "(", close: ")" },
42
+ { open: "_", close: "_" },
43
+ { open: "**", close: "**" },
44
+ { open: "<", close: ">" }
45
+ ],
46
+ onEnterRules: [
47
+ {
48
+ beforeText: /^\s*- .+/,
49
+ action: { indentAction: monaco_editor_core_exports.languages.IndentAction.None, appendText: "- " }
50
+ },
51
+ {
52
+ beforeText: /^\s*\+ .+/,
53
+ action: { indentAction: monaco_editor_core_exports.languages.IndentAction.None, appendText: "+ " }
54
+ },
55
+ {
56
+ beforeText: /^\s*\* .+/,
57
+ action: { indentAction: monaco_editor_core_exports.languages.IndentAction.None, appendText: "* " }
58
+ },
59
+ {
60
+ beforeText: /^> /,
61
+ action: { indentAction: monaco_editor_core_exports.languages.IndentAction.None, appendText: "> " }
62
+ },
63
+ {
64
+ beforeText: /<\w+/,
65
+ action: { indentAction: monaco_editor_core_exports.languages.IndentAction.Indent }
66
+ },
67
+ {
68
+ beforeText: /\s+>\s*$/,
69
+ action: { indentAction: monaco_editor_core_exports.languages.IndentAction.Indent }
70
+ },
71
+ {
72
+ beforeText: /<\/\w+>/,
73
+ action: { indentAction: monaco_editor_core_exports.languages.IndentAction.Outdent }
74
+ },
75
+ ...Array.from({ length: 100 }, (_, index) => ({
76
+ beforeText: new RegExp(`^${index}\\. .+`),
77
+ action: { indentAction: monaco_editor_core_exports.languages.IndentAction.None, appendText: `${index + 1}. ` }
78
+ }))
79
+ ]
80
+ };
81
+ var language = {
82
+ defaultToken: "",
83
+ tokenPostfix: ".mdx",
84
+ control: /[!#()*+.[\\\]_`{}\-]/,
85
+ escapes: /\\@control/,
86
+ tokenizer: {
87
+ root: [
88
+ [/^---$/, { token: "meta.content", next: "@frontmatter", nextEmbedded: "yaml" }],
89
+ [/^\s*import/, { token: "keyword", next: "@import", nextEmbedded: "js" }],
90
+ [/^\s*export/, { token: "keyword", next: "@export", nextEmbedded: "js" }],
91
+ [/<\w+/, { token: "type.identifier", next: "@jsx" }],
92
+ [/<\/?\w+>/, "type.identifier"],
93
+ [
94
+ /^(\s*)(>*\s*)(#{1,6}\s)/,
95
+ [{ token: "white" }, { token: "comment" }, { token: "keyword", next: "@header" }]
96
+ ],
97
+ [/^(\s*)(>*\s*)([*+-])(\s+)/, ["white", "comment", "keyword", "white"]],
98
+ [/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/, ["white", "comment", "number", "white"]],
99
+ [/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/, ["white", "comment", "number", "white"]],
100
+ [/^(\s*)(>*\s*)(-{3,}|\*{3,}|_{3,})$/, ["white", "comment", "keyword"]],
101
+ [/`{3,}(\s.*)?$/, { token: "string", next: "@codeblock_backtick" }],
102
+ [/~{3,}(\s.*)?$/, { token: "string", next: "@codeblock_tilde" }],
103
+ [
104
+ /`{3,}(\S+).*$/,
105
+ { token: "string", next: "@codeblock_highlight_backtick", nextEmbedded: "$1" }
106
+ ],
107
+ [
108
+ /~{3,}(\S+).*$/,
109
+ { token: "string", next: "@codeblock_highlight_tilde", nextEmbedded: "$1" }
110
+ ],
111
+ [/^(\s*)(-{4,})$/, ["white", "comment"]],
112
+ [/^(\s*)(>+)/, ["white", "comment"]],
113
+ { include: "content" }
114
+ ],
115
+ content: [
116
+ [
117
+ /(\[)(.+)(]\()(.+)(\s+".*")(\))/,
118
+ ["", "string.link", "", "type.identifier", "string.link", ""]
119
+ ],
120
+ [/(\[)(.+)(]\()(.+)(\))/, ["", "type.identifier", "", "string.link", ""]],
121
+ [/(\[)(.+)(]\[)(.+)(])/, ["", "type.identifier", "", "type.identifier", ""]],
122
+ [/(\[)(.+)(]:\s+)(\S*)/, ["", "type.identifier", "", "string.link"]],
123
+ [/(\[)(.+)(])/, ["", "type.identifier", ""]],
124
+ [/`.*`/, "variable.source"],
125
+ [/_/, { token: "emphasis", next: "@emphasis_underscore" }],
126
+ [/\*(?!\*)/, { token: "emphasis", next: "@emphasis_asterisk" }],
127
+ [/\*\*/, { token: "strong", next: "@strong" }],
128
+ [/{/, { token: "delimiter.bracket", next: "@expression", nextEmbedded: "js" }]
129
+ ],
130
+ import: [[/'\s*(;|$)/, { token: "string", next: "@pop", nextEmbedded: "@pop" }]],
131
+ expression: [
132
+ [/{/, { token: "delimiter.bracket", next: "@expression" }],
133
+ [/}/, { token: "delimiter.bracket", next: "@pop", nextEmbedded: "@pop" }]
134
+ ],
135
+ export: [[/^\s*$/, { token: "delimiter.bracket", next: "@pop", nextEmbedded: "@pop" }]],
136
+ jsx: [
137
+ [/\s+/, ""],
138
+ [/(\w+)(=)("(?:[^"\\]|\\.)*")/, ["attribute.name", "operator", "string"]],
139
+ [/(\w+)(=)('(?:[^'\\]|\\.)*')/, ["attribute.name", "operator", "string"]],
140
+ [/(\w+(?=\s|>|={|$))/, ["attribute.name"]],
141
+ [/={/, { token: "delimiter.bracket", next: "@expression", nextEmbedded: "js" }],
142
+ [/>/, { token: "type.identifier", next: "@pop" }]
143
+ ],
144
+ header: [
145
+ [/.$/, { token: "keyword", next: "@pop" }],
146
+ { include: "content" },
147
+ [/./, { token: "keyword" }]
148
+ ],
149
+ strong: [
150
+ [/\*\*/, { token: "strong", next: "@pop" }],
151
+ { include: "content" },
152
+ [/./, { token: "strong" }]
153
+ ],
154
+ emphasis_underscore: [
155
+ [/_/, { token: "emphasis", next: "@pop" }],
156
+ { include: "content" },
157
+ [/./, { token: "emphasis" }]
158
+ ],
159
+ emphasis_asterisk: [
160
+ [/\*(?!\*)/, { token: "emphasis", next: "@pop" }],
161
+ { include: "content" },
162
+ [/./, { token: "emphasis" }]
163
+ ],
164
+ frontmatter: [[/^---$/, { token: "meta.content", nextEmbedded: "@pop", next: "@pop" }]],
165
+ codeblock_highlight_backtick: [
166
+ [/\s*`{3,}\s*$/, { token: "string", next: "@pop", nextEmbedded: "@pop" }],
167
+ [/.*$/, "variable.source"]
168
+ ],
169
+ codeblock_highlight_tilde: [
170
+ [/\s*~{3,}\s*$/, { token: "string", next: "@pop", nextEmbedded: "@pop" }],
171
+ [/.*$/, "variable.source"]
172
+ ],
173
+ codeblock_backtick: [
174
+ [/\s*`{3,}\s*$/, { token: "string", next: "@pop" }],
175
+ [/.*$/, "variable.source"]
176
+ ],
177
+ codeblock_tilde: [
178
+ [/\s*~{3,}\s*$/, { token: "string", next: "@pop" }],
179
+ [/.*$/, "variable.source"]
180
+ ]
181
+ }
182
+ };
183
+
184
+ export { conf, language };
@@ -0,0 +1,20 @@
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: "mips",
12
+ extensions: [".s"],
13
+ aliases: ["MIPS", "MIPS-V"],
14
+ mimetypes: ["text/x-mips", "text/mips", "text/plaintext"],
15
+ loader: () => {
16
+ {
17
+ return import('./mips.js');
18
+ }
19
+ }
20
+ });
package/mips/mips.js ADDED
@@ -0,0 +1,206 @@
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/mips/mips.ts
10
+ var conf = {
11
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
12
+ comments: {
13
+ blockComment: ["###", "###"],
14
+ lineComment: "#"
15
+ },
16
+ folding: {
17
+ markers: {
18
+ start: new RegExp("^\\s*#region\\b"),
19
+ end: new RegExp("^\\s*#endregion\\b")
20
+ }
21
+ }
22
+ };
23
+ var language = {
24
+ defaultToken: "",
25
+ ignoreCase: false,
26
+ tokenPostfix: ".mips",
27
+ regEx: /\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,
28
+ keywords: [
29
+ ".data",
30
+ ".text",
31
+ "syscall",
32
+ "trap",
33
+ "add",
34
+ "addu",
35
+ "addi",
36
+ "addiu",
37
+ "and",
38
+ "andi",
39
+ "div",
40
+ "divu",
41
+ "mult",
42
+ "multu",
43
+ "nor",
44
+ "or",
45
+ "ori",
46
+ "sll",
47
+ "slv",
48
+ "sra",
49
+ "srav",
50
+ "srl",
51
+ "srlv",
52
+ "sub",
53
+ "subu",
54
+ "xor",
55
+ "xori",
56
+ "lhi",
57
+ "lho",
58
+ "lhi",
59
+ "llo",
60
+ "slt",
61
+ "slti",
62
+ "sltu",
63
+ "sltiu",
64
+ "beq",
65
+ "bgtz",
66
+ "blez",
67
+ "bne",
68
+ "j",
69
+ "jal",
70
+ "jalr",
71
+ "jr",
72
+ "lb",
73
+ "lbu",
74
+ "lh",
75
+ "lhu",
76
+ "lw",
77
+ "li",
78
+ "la",
79
+ "sb",
80
+ "sh",
81
+ "sw",
82
+ "mfhi",
83
+ "mflo",
84
+ "mthi",
85
+ "mtlo",
86
+ "move"
87
+ ],
88
+ // we include these common regular expressions
89
+ symbols: /[\.,\:]+/,
90
+ escapes: /\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
91
+ // The main tokenizer for our languages
92
+ tokenizer: {
93
+ root: [
94
+ // identifiers and keywords
95
+ [/\$[a-zA-Z_]\w*/, "variable.predefined"],
96
+ [
97
+ /[.a-zA-Z_]\w*/,
98
+ {
99
+ cases: {
100
+ this: "variable.predefined",
101
+ "@keywords": { token: "keyword.$0" },
102
+ "@default": ""
103
+ }
104
+ }
105
+ ],
106
+ // whitespace
107
+ [/[ \t\r\n]+/, ""],
108
+ // Comments
109
+ [/#.*$/, "comment"],
110
+ // regular expressions
111
+ ["///", { token: "regexp", next: "@hereregexp" }],
112
+ [/^(\s*)(@regEx)/, ["", "regexp"]],
113
+ [/(\,)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
114
+ [/(\:)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
115
+ // delimiters
116
+ [/@symbols/, "delimiter"],
117
+ // numbers
118
+ [/\d+[eE]([\-+]?\d+)?/, "number.float"],
119
+ [/\d+\.\d+([eE][\-+]?\d+)?/, "number.float"],
120
+ [/0[xX][0-9a-fA-F]+/, "number.hex"],
121
+ [/0[0-7]+(?!\d)/, "number.octal"],
122
+ [/\d+/, "number"],
123
+ // delimiter: after number because of .\d floats
124
+ [/[,.]/, "delimiter"],
125
+ // strings:
126
+ [/"""/, "string", '@herestring."""'],
127
+ [/'''/, "string", "@herestring.'''"],
128
+ [
129
+ /"/,
130
+ {
131
+ cases: {
132
+ "@eos": "string",
133
+ "@default": { token: "string", next: '@string."' }
134
+ }
135
+ }
136
+ ],
137
+ [
138
+ /'/,
139
+ {
140
+ cases: {
141
+ "@eos": "string",
142
+ "@default": { token: "string", next: "@string.'" }
143
+ }
144
+ }
145
+ ]
146
+ ],
147
+ string: [
148
+ [/[^"'\#\\]+/, "string"],
149
+ [/@escapes/, "string.escape"],
150
+ [/\./, "string.escape.invalid"],
151
+ [/\./, "string.escape.invalid"],
152
+ [
153
+ /#{/,
154
+ {
155
+ cases: {
156
+ '$S2=="': {
157
+ token: "string",
158
+ next: "root.interpolatedstring"
159
+ },
160
+ "@default": "string"
161
+ }
162
+ }
163
+ ],
164
+ [
165
+ /["']/,
166
+ {
167
+ cases: {
168
+ "$#==$S2": { token: "string", next: "@pop" },
169
+ "@default": "string"
170
+ }
171
+ }
172
+ ],
173
+ [/#/, "string"]
174
+ ],
175
+ herestring: [
176
+ [
177
+ /("""|''')/,
178
+ {
179
+ cases: {
180
+ "$1==$S2": { token: "string", next: "@pop" },
181
+ "@default": "string"
182
+ }
183
+ }
184
+ ],
185
+ [/[^#\\'"]+/, "string"],
186
+ [/['"]+/, "string"],
187
+ [/@escapes/, "string.escape"],
188
+ [/\./, "string.escape.invalid"],
189
+ [/#{/, { token: "string.quote", next: "root.interpolatedstring" }],
190
+ [/#/, "string"]
191
+ ],
192
+ comment: [
193
+ [/[^#]+/, "comment"],
194
+ [/#/, "comment"]
195
+ ],
196
+ hereregexp: [
197
+ [/[^\\\/#]+/, "regexp"],
198
+ [/\\./, "regexp"],
199
+ [/#.*$/, "comment"],
200
+ ["///[igm]*", { token: "regexp", next: "@pop" }],
201
+ [/\//, "regexp"]
202
+ ]
203
+ }
204
+ };
205
+
206
+ 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: "msdax",
12
+ extensions: [".dax", ".msdax"],
13
+ aliases: ["DAX", "MSDAX"],
14
+ loader: () => {
15
+ {
16
+ return import('./msdax.js');
17
+ }
18
+ }
19
+ });