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