@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,260 @@
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/liquid/liquid.ts
29
+ var EMPTY_ELEMENTS = [
30
+ "area",
31
+ "base",
32
+ "br",
33
+ "col",
34
+ "embed",
35
+ "hr",
36
+ "img",
37
+ "input",
38
+ "keygen",
39
+ "link",
40
+ "menuitem",
41
+ "meta",
42
+ "param",
43
+ "source",
44
+ "track",
45
+ "wbr"
46
+ ];
47
+ var conf = {
48
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
49
+ brackets: [
50
+ ["<!--", "-->"],
51
+ ["<", ">"],
52
+ ["{{", "}}"],
53
+ ["{%", "%}"],
54
+ ["{", "}"],
55
+ ["(", ")"]
56
+ ],
57
+ autoClosingPairs: [
58
+ { open: "{", close: "}" },
59
+ { open: "%", close: "%" },
60
+ { open: "[", close: "]" },
61
+ { open: "(", close: ")" },
62
+ { open: '"', close: '"' },
63
+ { open: "'", close: "'" }
64
+ ],
65
+ surroundingPairs: [
66
+ { open: "<", close: ">" },
67
+ { open: '"', close: '"' },
68
+ { open: "'", close: "'" }
69
+ ],
70
+ onEnterRules: [
71
+ {
72
+ beforeText: new RegExp(
73
+ `<(?!(?:${EMPTY_ELEMENTS.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,
74
+ "i"
75
+ ),
76
+ afterText: /^<\/(\w[\w\d]*)\s*>$/i,
77
+ action: {
78
+ indentAction: monaco_editor_core_exports.languages.IndentAction.IndentOutdent
79
+ }
80
+ },
81
+ {
82
+ beforeText: new RegExp(
83
+ `<(?!(?:${EMPTY_ELEMENTS.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,
84
+ "i"
85
+ ),
86
+ action: { indentAction: monaco_editor_core_exports.languages.IndentAction.Indent }
87
+ }
88
+ ]
89
+ };
90
+ var language = {
91
+ defaultToken: "",
92
+ tokenPostfix: "",
93
+ builtinTags: [
94
+ "if",
95
+ "else",
96
+ "elseif",
97
+ "endif",
98
+ "render",
99
+ "assign",
100
+ "capture",
101
+ "endcapture",
102
+ "case",
103
+ "endcase",
104
+ "comment",
105
+ "endcomment",
106
+ "cycle",
107
+ "decrement",
108
+ "for",
109
+ "endfor",
110
+ "include",
111
+ "increment",
112
+ "layout",
113
+ "raw",
114
+ "endraw",
115
+ "render",
116
+ "tablerow",
117
+ "endtablerow",
118
+ "unless",
119
+ "endunless"
120
+ ],
121
+ builtinFilters: [
122
+ "abs",
123
+ "append",
124
+ "at_least",
125
+ "at_most",
126
+ "capitalize",
127
+ "ceil",
128
+ "compact",
129
+ "date",
130
+ "default",
131
+ "divided_by",
132
+ "downcase",
133
+ "escape",
134
+ "escape_once",
135
+ "first",
136
+ "floor",
137
+ "join",
138
+ "json",
139
+ "last",
140
+ "lstrip",
141
+ "map",
142
+ "minus",
143
+ "modulo",
144
+ "newline_to_br",
145
+ "plus",
146
+ "prepend",
147
+ "remove",
148
+ "remove_first",
149
+ "replace",
150
+ "replace_first",
151
+ "reverse",
152
+ "round",
153
+ "rstrip",
154
+ "size",
155
+ "slice",
156
+ "sort",
157
+ "sort_natural",
158
+ "split",
159
+ "strip",
160
+ "strip_html",
161
+ "strip_newlines",
162
+ "times",
163
+ "truncate",
164
+ "truncatewords",
165
+ "uniq",
166
+ "upcase",
167
+ "url_decode",
168
+ "url_encode",
169
+ "where"
170
+ ],
171
+ constants: ["true", "false"],
172
+ operators: ["==", "!=", ">", "<", ">=", "<="],
173
+ symbol: /[=><!]+/,
174
+ identifier: /[a-zA-Z_][\w]*/,
175
+ tokenizer: {
176
+ root: [
177
+ [/\{\%\s*comment\s*\%\}/, "comment.start.liquid", "@comment"],
178
+ [/\{\{/, { token: "@rematch", switchTo: "@liquidState.root" }],
179
+ [/\{\%/, { token: "@rematch", switchTo: "@liquidState.root" }],
180
+ [/(<)([\w\-]+)(\/>)/, ["delimiter.html", "tag.html", "delimiter.html"]],
181
+ [/(<)([:\w]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
182
+ [/(<\/)([\w\-]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
183
+ [/</, "delimiter.html"],
184
+ [/\{/, "delimiter.html"],
185
+ [/[^<{]+/]
186
+ // text
187
+ ],
188
+ comment: [
189
+ [/\{\%\s*endcomment\s*\%\}/, "comment.end.liquid", "@pop"],
190
+ [/./, "comment.content.liquid"]
191
+ ],
192
+ otherTag: [
193
+ [
194
+ /\{\{/,
195
+ {
196
+ token: "@rematch",
197
+ switchTo: "@liquidState.otherTag"
198
+ }
199
+ ],
200
+ [
201
+ /\{\%/,
202
+ {
203
+ token: "@rematch",
204
+ switchTo: "@liquidState.otherTag"
205
+ }
206
+ ],
207
+ [/\/?>/, "delimiter.html", "@pop"],
208
+ [/"([^"]*)"/, "attribute.value"],
209
+ [/'([^']*)'/, "attribute.value"],
210
+ [/[\w\-]+/, "attribute.name"],
211
+ [/=/, "delimiter"],
212
+ [/[ \t\r\n]+/]
213
+ // whitespace
214
+ ],
215
+ liquidState: [
216
+ [/\{\{/, "delimiter.output.liquid"],
217
+ [/\}\}/, { token: "delimiter.output.liquid", switchTo: "@$S2.$S3" }],
218
+ [/\{\%/, "delimiter.tag.liquid"],
219
+ [/raw\s*\%\}/, "delimiter.tag.liquid", "@liquidRaw"],
220
+ [/\%\}/, { token: "delimiter.tag.liquid", switchTo: "@$S2.$S3" }],
221
+ { include: "liquidRoot" }
222
+ ],
223
+ liquidRaw: [
224
+ [/^(?!\{\%\s*endraw\s*\%\}).+/],
225
+ [/\{\%/, "delimiter.tag.liquid"],
226
+ [/@identifier/],
227
+ [/\%\}/, { token: "delimiter.tag.liquid", next: "@root" }]
228
+ ],
229
+ liquidRoot: [
230
+ [/\d+(\.\d+)?/, "number.liquid"],
231
+ [/"[^"]*"/, "string.liquid"],
232
+ [/'[^']*'/, "string.liquid"],
233
+ [/\s+/],
234
+ [
235
+ /@symbol/,
236
+ {
237
+ cases: {
238
+ "@operators": "operator.liquid",
239
+ "@default": ""
240
+ }
241
+ }
242
+ ],
243
+ [/\./],
244
+ [
245
+ /@identifier/,
246
+ {
247
+ cases: {
248
+ "@constants": "keyword.liquid",
249
+ "@builtinFilters": "predefined.liquid",
250
+ "@builtinTags": "predefined.liquid",
251
+ "@default": "variable.liquid"
252
+ }
253
+ }
254
+ ],
255
+ [/[^}|%]/, "variable.liquid"]
256
+ ]
257
+ }
258
+ };
259
+
260
+ 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: "lua",
12
+ extensions: [".lua"],
13
+ aliases: ["Lua", "lua"],
14
+ loader: () => {
15
+ {
16
+ return import('./lua.js');
17
+ }
18
+ }
19
+ });
package/lua/lua.js ADDED
@@ -0,0 +1,170 @@
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/lua/lua.ts
10
+ var conf = {
11
+ comments: {
12
+ lineComment: "--",
13
+ blockComment: ["--[[", "]]"]
14
+ },
15
+ brackets: [
16
+ ["{", "}"],
17
+ ["[", "]"],
18
+ ["(", ")"]
19
+ ],
20
+ autoClosingPairs: [
21
+ { open: "{", close: "}" },
22
+ { open: "[", close: "]" },
23
+ { open: "(", close: ")" },
24
+ { open: '"', close: '"' },
25
+ { open: "'", close: "'" }
26
+ ],
27
+ surroundingPairs: [
28
+ { open: "{", close: "}" },
29
+ { open: "[", close: "]" },
30
+ { open: "(", close: ")" },
31
+ { open: '"', close: '"' },
32
+ { open: "'", close: "'" }
33
+ ]
34
+ };
35
+ var language = {
36
+ defaultToken: "",
37
+ tokenPostfix: ".lua",
38
+ keywords: [
39
+ "and",
40
+ "break",
41
+ "do",
42
+ "else",
43
+ "elseif",
44
+ "end",
45
+ "false",
46
+ "for",
47
+ "function",
48
+ "goto",
49
+ "if",
50
+ "in",
51
+ "local",
52
+ "nil",
53
+ "not",
54
+ "or",
55
+ "repeat",
56
+ "return",
57
+ "then",
58
+ "true",
59
+ "until",
60
+ "while"
61
+ ],
62
+ brackets: [
63
+ { token: "delimiter.bracket", open: "{", close: "}" },
64
+ { token: "delimiter.array", open: "[", close: "]" },
65
+ { token: "delimiter.parenthesis", open: "(", close: ")" }
66
+ ],
67
+ operators: [
68
+ "+",
69
+ "-",
70
+ "*",
71
+ "/",
72
+ "%",
73
+ "^",
74
+ "#",
75
+ "==",
76
+ "~=",
77
+ "<=",
78
+ ">=",
79
+ "<",
80
+ ">",
81
+ "=",
82
+ ";",
83
+ ":",
84
+ ",",
85
+ ".",
86
+ "..",
87
+ "..."
88
+ ],
89
+ // we include these common regular expressions
90
+ symbols: /[=><!~?:&|+\-*\/\^%]+/,
91
+ escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
92
+ // The main tokenizer for our languages
93
+ tokenizer: {
94
+ root: [
95
+ // identifiers and keywords
96
+ [
97
+ /[a-zA-Z_]\w*/,
98
+ {
99
+ cases: {
100
+ "@keywords": { token: "keyword.$0" },
101
+ "@default": "identifier"
102
+ }
103
+ }
104
+ ],
105
+ // whitespace
106
+ { include: "@whitespace" },
107
+ // keys
108
+ [/(,)(\s*)([a-zA-Z_]\w*)(\s*)(:)(?!:)/, ["delimiter", "", "key", "", "delimiter"]],
109
+ [/({)(\s*)([a-zA-Z_]\w*)(\s*)(:)(?!:)/, ["@brackets", "", "key", "", "delimiter"]],
110
+ // delimiters and operators
111
+ [/[{}()\[\]]/, "@brackets"],
112
+ [
113
+ /@symbols/,
114
+ {
115
+ cases: {
116
+ "@operators": "delimiter",
117
+ "@default": ""
118
+ }
119
+ }
120
+ ],
121
+ // numbers
122
+ [/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
123
+ [/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, "number.hex"],
124
+ [/\d+?/, "number"],
125
+ // delimiter: after number because of .\d floats
126
+ [/[;,.]/, "delimiter"],
127
+ // strings: recover on non-terminated strings
128
+ [/"([^"\\]|\\.)*$/, "string.invalid"],
129
+ // non-teminated string
130
+ [/'([^'\\]|\\.)*$/, "string.invalid"],
131
+ // non-teminated string
132
+ [/"/, "string", '@string."'],
133
+ [/'/, "string", "@string.'"]
134
+ ],
135
+ whitespace: [
136
+ [/[ \t\r\n]+/, ""],
137
+ [/--\[([=]*)\[/, "comment", "@comment.$1"],
138
+ [/--.*$/, "comment"]
139
+ ],
140
+ comment: [
141
+ [/[^\]]+/, "comment"],
142
+ [
143
+ /\]([=]*)\]/,
144
+ {
145
+ cases: {
146
+ "$1==$S2": { token: "comment", next: "@pop" },
147
+ "@default": "comment"
148
+ }
149
+ }
150
+ ],
151
+ [/./, "comment"]
152
+ ],
153
+ string: [
154
+ [/[^\\"']+/, "string"],
155
+ [/@escapes/, "string.escape"],
156
+ [/\\./, "string.escape.invalid"],
157
+ [
158
+ /["']/,
159
+ {
160
+ cases: {
161
+ "$#==$S2": { token: "string", next: "@pop" },
162
+ "@default": "string"
163
+ }
164
+ }
165
+ ]
166
+ ]
167
+ }
168
+ };
169
+
170
+ 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: "m3",
12
+ extensions: [".m3", ".i3", ".mg", ".ig"],
13
+ aliases: ["Modula-3", "Modula3", "modula3", "m3"],
14
+ loader: () => {
15
+ {
16
+ return import('./m3.js');
17
+ }
18
+ }
19
+ });
package/m3/m3.js ADDED
@@ -0,0 +1,218 @@
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/m3/m3.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: "*)" },
24
+ { open: "<*", close: "*>" },
25
+ { open: "'", close: "'", notIn: ["string", "comment"] },
26
+ { open: '"', close: '"', notIn: ["string", "comment"] }
27
+ ]
28
+ };
29
+ var language = {
30
+ defaultToken: "",
31
+ tokenPostfix: ".m3",
32
+ brackets: [
33
+ { token: "delimiter.curly", open: "{", close: "}" },
34
+ { token: "delimiter.parenthesis", open: "(", close: ")" },
35
+ { token: "delimiter.square", open: "[", close: "]" }
36
+ ],
37
+ keywords: [
38
+ "AND",
39
+ "ANY",
40
+ "ARRAY",
41
+ "AS",
42
+ "BEGIN",
43
+ "BITS",
44
+ "BRANDED",
45
+ "BY",
46
+ "CASE",
47
+ "CONST",
48
+ "DIV",
49
+ "DO",
50
+ "ELSE",
51
+ "ELSIF",
52
+ "END",
53
+ "EVAL",
54
+ "EXCEPT",
55
+ "EXCEPTION",
56
+ "EXIT",
57
+ "EXPORTS",
58
+ "FINALLY",
59
+ "FOR",
60
+ "FROM",
61
+ "GENERIC",
62
+ "IF",
63
+ "IMPORT",
64
+ "IN",
65
+ "INTERFACE",
66
+ "LOCK",
67
+ "LOOP",
68
+ "METHODS",
69
+ "MOD",
70
+ "MODULE",
71
+ "NOT",
72
+ "OBJECT",
73
+ "OF",
74
+ "OR",
75
+ "OVERRIDES",
76
+ "PROCEDURE",
77
+ "RAISE",
78
+ "RAISES",
79
+ "READONLY",
80
+ "RECORD",
81
+ "REF",
82
+ "REPEAT",
83
+ "RETURN",
84
+ "REVEAL",
85
+ "SET",
86
+ "THEN",
87
+ "TO",
88
+ "TRY",
89
+ "TYPE",
90
+ "TYPECASE",
91
+ "UNSAFE",
92
+ "UNTIL",
93
+ "UNTRACED",
94
+ "VALUE",
95
+ "VAR",
96
+ "WHILE",
97
+ "WITH"
98
+ ],
99
+ reservedConstNames: [
100
+ "ABS",
101
+ "ADR",
102
+ "ADRSIZE",
103
+ "BITSIZE",
104
+ "BYTESIZE",
105
+ "CEILING",
106
+ "DEC",
107
+ "DISPOSE",
108
+ "FALSE",
109
+ "FIRST",
110
+ "FLOAT",
111
+ "FLOOR",
112
+ "INC",
113
+ "ISTYPE",
114
+ "LAST",
115
+ "LOOPHOLE",
116
+ "MAX",
117
+ "MIN",
118
+ "NARROW",
119
+ "NEW",
120
+ "NIL",
121
+ "NUMBER",
122
+ "ORD",
123
+ "ROUND",
124
+ "SUBARRAY",
125
+ "TRUE",
126
+ "TRUNC",
127
+ "TYPECODE",
128
+ "VAL"
129
+ ],
130
+ reservedTypeNames: [
131
+ "ADDRESS",
132
+ "ANY",
133
+ "BOOLEAN",
134
+ "CARDINAL",
135
+ "CHAR",
136
+ "EXTENDED",
137
+ "INTEGER",
138
+ "LONGCARD",
139
+ "LONGINT",
140
+ "LONGREAL",
141
+ "MUTEX",
142
+ "NULL",
143
+ "REAL",
144
+ "REFANY",
145
+ "ROOT",
146
+ "TEXT"
147
+ ],
148
+ operators: ["+", "-", "*", "/", "&", "^", "."],
149
+ relations: ["=", "#", "<", "<=", ">", ">=", "<:", ":"],
150
+ delimiters: ["|", "..", "=>", ",", ";", ":="],
151
+ symbols: /[>=<#.,:;+\-*/&^]+/,
152
+ escapes: /\\(?:[\\fnrt"']|[0-7]{3})/,
153
+ tokenizer: {
154
+ root: [
155
+ // Identifiers and keywords
156
+ [/_\w*/, "invalid"],
157
+ [
158
+ /[a-zA-Z][a-zA-Z0-9_]*/,
159
+ {
160
+ cases: {
161
+ "@keywords": { token: "keyword.$0" },
162
+ "@reservedConstNames": { token: "constant.reserved.$0" },
163
+ "@reservedTypeNames": { token: "type.reserved.$0" },
164
+ "@default": "identifier"
165
+ }
166
+ }
167
+ ],
168
+ // Whitespace
169
+ { include: "@whitespace" },
170
+ [/[{}()\[\]]/, "@brackets"],
171
+ // Integer- and real literals
172
+ [/[0-9]+\.[0-9]+(?:[DdEeXx][\+\-]?[0-9]+)?/, "number.float"],
173
+ [/[0-9]+(?:\_[0-9a-fA-F]+)?L?/, "number"],
174
+ // Operators, relations, and delimiters
175
+ [
176
+ /@symbols/,
177
+ {
178
+ cases: {
179
+ "@operators": "operators",
180
+ "@relations": "operators",
181
+ "@delimiters": "delimiter",
182
+ "@default": "invalid"
183
+ }
184
+ }
185
+ ],
186
+ // Character literals
187
+ [/'[^\\']'/, "string.char"],
188
+ [/(')(@escapes)(')/, ["string.char", "string.escape", "string.char"]],
189
+ [/'/, "invalid"],
190
+ // Text literals
191
+ [/"([^"\\]|\\.)*$/, "invalid"],
192
+ [/"/, "string.text", "@text"]
193
+ ],
194
+ text: [
195
+ [/[^\\"]+/, "string.text"],
196
+ [/@escapes/, "string.escape"],
197
+ [/\\./, "invalid"],
198
+ [/"/, "string.text", "@pop"]
199
+ ],
200
+ comment: [
201
+ [/\(\*/, "comment", "@push"],
202
+ [/\*\)/, "comment", "@pop"],
203
+ [/./, "comment"]
204
+ ],
205
+ pragma: [
206
+ [/<\*/, "keyword.pragma", "@push"],
207
+ [/\*>/, "keyword.pragma", "@pop"],
208
+ [/./, "keyword.pragma"]
209
+ ],
210
+ whitespace: [
211
+ [/[ \t\r\n]+/, "white"],
212
+ [/\(\*/, "comment", "@comment"],
213
+ [/<\*/, "keyword.pragma", "@pragma"]
214
+ ]
215
+ }
216
+ };
217
+
218
+ 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: "markdown",
12
+ extensions: [".md", ".markdown", ".mdown", ".mkdn", ".mkd", ".mdwn", ".mdtxt", ".mdtext"],
13
+ aliases: ["Markdown", "markdown"],
14
+ loader: () => {
15
+ {
16
+ return import('./markdown.js');
17
+ }
18
+ }
19
+ });