@codingame/monaco-vscode-standalone-languages 23.1.1 → 23.2.1

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/index.js +48 -82
  2. package/package.json +2 -2
  3. package/_.contribution.js +0 -74
  4. package/abap/abap.contribution.js +0 -19
  5. package/abap/abap.js +0 -1406
  6. package/apex/apex.contribution.js +0 -20
  7. package/apex/apex.js +0 -338
  8. package/azcli/azcli.contribution.js +0 -19
  9. package/azcli/azcli.js +0 -76
  10. package/bat/bat.contribution.js +0 -19
  11. package/bat/bat.js +0 -108
  12. package/bicep/bicep.contribution.js +0 -19
  13. package/bicep/bicep.js +0 -117
  14. package/cameligo/cameligo.contribution.js +0 -19
  15. package/cameligo/cameligo.js +0 -182
  16. package/clojure/clojure.contribution.js +0 -19
  17. package/clojure/clojure.js +0 -769
  18. package/coffee/coffee.contribution.js +0 -20
  19. package/coffee/coffee.js +0 -240
  20. package/cpp/cpp.contribution.js +0 -29
  21. package/cpp/cpp.js +0 -397
  22. package/csharp/csharp.contribution.js +0 -19
  23. package/csharp/csharp.js +0 -334
  24. package/csp/csp.contribution.js +0 -19
  25. package/csp/csp.js +0 -61
  26. package/css/css.contribution.js +0 -20
  27. package/css/css.js +0 -193
  28. package/cypher/cypher.contribution.js +0 -19
  29. package/cypher/cypher.js +0 -271
  30. package/dart/dart.contribution.js +0 -20
  31. package/dart/dart.js +0 -289
  32. package/dockerfile/dockerfile.contribution.js +0 -20
  33. package/dockerfile/dockerfile.js +0 -138
  34. package/ecl/ecl.contribution.js +0 -19
  35. package/ecl/ecl.js +0 -464
  36. package/elixir/elixir.contribution.js +0 -19
  37. package/elixir/elixir.js +0 -577
  38. package/flow9/flow9.contribution.js +0 -19
  39. package/flow9/flow9.js +0 -150
  40. package/freemarker2/freemarker2.contribution.js +0 -73
  41. package/freemarker2/freemarker2.js +0 -1016
  42. package/fsharp/fsharp.contribution.js +0 -19
  43. package/fsharp/fsharp.js +0 -225
  44. package/go/go.contribution.js +0 -19
  45. package/go/go.js +0 -226
  46. package/graphql/graphql.contribution.js +0 -20
  47. package/graphql/graphql.js +0 -159
  48. package/handlebars/handlebars.contribution.js +0 -20
  49. package/handlebars/handlebars.js +0 -439
  50. package/hcl/hcl.contribution.js +0 -19
  51. package/hcl/hcl.js +0 -191
  52. package/html/html.contribution.js +0 -20
  53. package/html/html.js +0 -328
  54. package/ini/ini.contribution.js +0 -20
  55. package/ini/ini.js +0 -79
  56. package/java/java.contribution.js +0 -20
  57. package/java/java.js +0 -240
  58. package/javascript/javascript.contribution.js +0 -22
  59. package/javascript/javascript.js +0 -77
  60. package/julia/julia.contribution.js +0 -19
  61. package/julia/julia.js +0 -519
  62. package/kotlin/kotlin.contribution.js +0 -20
  63. package/kotlin/kotlin.js +0 -261
  64. package/less/less.contribution.js +0 -20
  65. package/less/less.js +0 -169
  66. package/lexon/lexon.contribution.js +0 -19
  67. package/lexon/lexon.js +0 -165
  68. package/liquid/liquid.contribution.js +0 -20
  69. package/liquid/liquid.js +0 -260
  70. package/lua/lua.contribution.js +0 -19
  71. package/lua/lua.js +0 -170
  72. package/m3/m3.contribution.js +0 -19
  73. package/m3/m3.js +0 -218
  74. package/markdown/markdown.contribution.js +0 -19
  75. package/markdown/markdown.js +0 -237
  76. package/mdx/mdx.contribution.js +0 -19
  77. package/mdx/mdx.js +0 -184
  78. package/mips/mips.contribution.js +0 -20
  79. package/mips/mips.js +0 -206
  80. package/msdax/msdax.contribution.js +0 -19
  81. package/msdax/msdax.js +0 -383
  82. package/mysql/mysql.contribution.js +0 -19
  83. package/mysql/mysql.js +0 -886
  84. package/objective-c/objective-c.contribution.js +0 -19
  85. package/objective-c/objective-c.js +0 -191
  86. package/pascal/pascal.contribution.js +0 -20
  87. package/pascal/pascal.js +0 -259
  88. package/pascaligo/pascaligo.contribution.js +0 -19
  89. package/pascaligo/pascaligo.js +0 -172
  90. package/perl/perl.contribution.js +0 -19
  91. package/perl/perl.js +0 -634
  92. package/pgsql/pgsql.contribution.js +0 -19
  93. package/pgsql/pgsql.js +0 -859
  94. package/php/php.contribution.js +0 -20
  95. package/php/php.js +0 -508
  96. package/pla/pla.contribution.js +0 -18
  97. package/pla/pla.js +0 -145
  98. package/postiats/postiats.contribution.js +0 -19
  99. package/postiats/postiats.js +0 -915
  100. package/powerquery/powerquery.contribution.js +0 -19
  101. package/powerquery/powerquery.js +0 -898
  102. package/powershell/powershell.contribution.js +0 -19
  103. package/powershell/powershell.js +0 -247
  104. package/protobuf/protobuf.contribution.js +0 -19
  105. package/protobuf/protobuf.js +0 -428
  106. package/pug/pug.contribution.js +0 -19
  107. package/pug/pug.js +0 -410
  108. package/python/python.contribution.js +0 -20
  109. package/python/python.js +0 -320
  110. package/qsharp/qsharp.contribution.js +0 -19
  111. package/qsharp/qsharp.js +0 -309
  112. package/r/r.contribution.js +0 -19
  113. package/r/r.js +0 -251
  114. package/razor/razor.contribution.js +0 -20
  115. package/razor/razor.js +0 -570
  116. package/redis/redis.contribution.js +0 -19
  117. package/redis/redis.js +0 -310
  118. package/redshift/redshift.contribution.js +0 -19
  119. package/redshift/redshift.js +0 -817
  120. package/restructuredtext/restructuredtext.contribution.js +0 -19
  121. package/restructuredtext/restructuredtext.js +0 -182
  122. package/ruby/ruby.contribution.js +0 -20
  123. package/ruby/ruby.js +0 -519
  124. package/rust/rust.contribution.js +0 -19
  125. package/rust/rust.js +0 -351
  126. package/sb/sb.contribution.js +0 -19
  127. package/sb/sb.js +0 -123
  128. package/scala/scala.contribution.js +0 -20
  129. package/scala/scala.js +0 -378
  130. package/scheme/scheme.contribution.js +0 -19
  131. package/scheme/scheme.js +0 -116
  132. package/scss/scss.contribution.js +0 -20
  133. package/scss/scss.js +0 -268
  134. package/shell/shell.contribution.js +0 -19
  135. package/shell/shell.js +0 -229
  136. package/solidity/solidity.contribution.js +0 -19
  137. package/solidity/solidity.js +0 -1375
  138. package/sophia/sophia.contribution.js +0 -19
  139. package/sophia/sophia.js +0 -207
  140. package/sparql/sparql.contribution.js +0 -19
  141. package/sparql/sparql.js +0 -209
  142. package/sql/sql.contribution.js +0 -19
  143. package/sql/sql.js +0 -861
  144. package/st/st.contribution.js +0 -19
  145. package/st/st.js +0 -424
  146. package/swift/swift.contribution.js +0 -20
  147. package/swift/swift.js +0 -320
  148. package/systemverilog/systemverilog.contribution.js +0 -29
  149. package/systemverilog/systemverilog.js +0 -584
  150. package/tcl/tcl.contribution.js +0 -19
  151. package/tcl/tcl.js +0 -240
  152. package/twig/twig.contribution.js +0 -20
  153. package/twig/twig.js +0 -400
  154. package/typescript/typescript.contribution.js +0 -20
  155. package/typescript/typescript.js +0 -362
  156. package/typespec/typespec.contribution.js +0 -19
  157. package/typespec/typespec.js +0 -135
  158. package/vb/vb.contribution.js +0 -19
  159. package/vb/vb.js +0 -380
  160. package/wgsl/wgsl.contribution.js +0 -19
  161. package/wgsl/wgsl.js +0 -461
  162. package/xml/xml.contribution.js +0 -39
  163. package/xml/xml.js +0 -114
  164. package/yaml/yaml.contribution.js +0 -20
  165. package/yaml/yaml.js +0 -225
package/elixir/elixir.js DELETED
@@ -1,577 +0,0 @@
1
- /*!-----------------------------------------------------------------------------
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Version: 0.54.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/elixir/elixir.ts
10
- var conf = {
11
- comments: {
12
- lineComment: "#"
13
- },
14
- brackets: [
15
- ["{", "}"],
16
- ["[", "]"],
17
- ["(", ")"]
18
- ],
19
- surroundingPairs: [
20
- { open: "{", close: "}" },
21
- { open: "[", close: "]" },
22
- { open: "(", close: ")" },
23
- { open: "'", close: "'" },
24
- { open: '"', close: '"' }
25
- ],
26
- autoClosingPairs: [
27
- { open: "'", close: "'", notIn: ["string", "comment"] },
28
- { open: '"', close: '"', notIn: ["comment"] },
29
- { open: '"""', close: '"""' },
30
- { open: "`", close: "`", notIn: ["string", "comment"] },
31
- { open: "(", close: ")" },
32
- { open: "{", close: "}" },
33
- { open: "[", close: "]" },
34
- { open: "<<", close: ">>" }
35
- ],
36
- indentationRules: {
37
- increaseIndentPattern: /^\s*(after|else|catch|rescue|fn|[^#]*(do|<\-|\->|\{|\[|\=))\s*$/,
38
- decreaseIndentPattern: /^\s*((\}|\])\s*$|(after|else|catch|rescue|end)\b)/
39
- }
40
- };
41
- var language = {
42
- defaultToken: "source",
43
- tokenPostfix: ".elixir",
44
- brackets: [
45
- { open: "[", close: "]", token: "delimiter.square" },
46
- { open: "(", close: ")", token: "delimiter.parenthesis" },
47
- { open: "{", close: "}", token: "delimiter.curly" },
48
- { open: "<<", close: ">>", token: "delimiter.angle.special" }
49
- ],
50
- // Below are lists/regexps to which we reference later.
51
- declarationKeywords: [
52
- "def",
53
- "defp",
54
- "defn",
55
- "defnp",
56
- "defguard",
57
- "defguardp",
58
- "defmacro",
59
- "defmacrop",
60
- "defdelegate",
61
- "defcallback",
62
- "defmacrocallback",
63
- "defmodule",
64
- "defprotocol",
65
- "defexception",
66
- "defimpl",
67
- "defstruct"
68
- ],
69
- operatorKeywords: ["and", "in", "not", "or", "when"],
70
- namespaceKeywords: ["alias", "import", "require", "use"],
71
- otherKeywords: [
72
- "after",
73
- "case",
74
- "catch",
75
- "cond",
76
- "do",
77
- "else",
78
- "end",
79
- "fn",
80
- "for",
81
- "if",
82
- "quote",
83
- "raise",
84
- "receive",
85
- "rescue",
86
- "super",
87
- "throw",
88
- "try",
89
- "unless",
90
- "unquote_splicing",
91
- "unquote",
92
- "with"
93
- ],
94
- constants: ["true", "false", "nil"],
95
- nameBuiltin: ["__MODULE__", "__DIR__", "__ENV__", "__CALLER__", "__STACKTRACE__"],
96
- // Matches any of the operator names:
97
- // <<< >>> ||| &&& ^^^ ~~~ === !== ~>> <~> |~> <|> == != <= >= && || \\ <> ++ -- |> =~ -> <- ~> <~ :: .. = < > + - * / | . ^ & !
98
- operator: /-[->]?|!={0,2}|\*{1,2}|\/|\\\\|&{1,3}|\.\.?|\^(?:\^\^)?|\+\+?|<(?:-|<<|=|>|\|>|~>?)?|=~|={1,3}|>(?:=|>>)?|\|~>|\|>|\|{1,3}|~>>?|~~~|::/,
99
- // See https://hexdocs.pm/elixir/syntax-reference.html#variables
100
- variableName: /[a-z_][a-zA-Z0-9_]*[?!]?/,
101
- // See https://hexdocs.pm/elixir/syntax-reference.html#atoms
102
- atomName: /[a-zA-Z_][a-zA-Z0-9_@]*[?!]?|@specialAtomName|@operator/,
103
- specialAtomName: /\.\.\.|<<>>|%\{\}|%|\{\}/,
104
- aliasPart: /[A-Z][a-zA-Z0-9_]*/,
105
- moduleName: /@aliasPart(?:\.@aliasPart)*/,
106
- // Sigil pairs are: """ """, ''' ''', " ", ' ', / /, | |, < >, { }, [ ], ( )
107
- sigilSymmetricDelimiter: /"""|'''|"|'|\/|\|/,
108
- sigilStartDelimiter: /@sigilSymmetricDelimiter|<|\{|\[|\(/,
109
- sigilEndDelimiter: /@sigilSymmetricDelimiter|>|\}|\]|\)/,
110
- sigilModifiers: /[a-zA-Z0-9]*/,
111
- decimal: /\d(?:_?\d)*/,
112
- hex: /[0-9a-fA-F](_?[0-9a-fA-F])*/,
113
- octal: /[0-7](_?[0-7])*/,
114
- binary: /[01](_?[01])*/,
115
- // See https://hexdocs.pm/elixir/master/String.html#module-escape-characters
116
- escape: /\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2}|\\./,
117
- // The keys below correspond to tokenizer states.
118
- // We start from the root state and match against its rules
119
- // until we explicitly transition into another state.
120
- // The `include` simply brings in all operations from the given state
121
- // and is useful for improving readability.
122
- tokenizer: {
123
- root: [
124
- { include: "@whitespace" },
125
- { include: "@comments" },
126
- // Keywords start as either an identifier or a string,
127
- // but end with a : so it's important to match this first.
128
- { include: "@keywordsShorthand" },
129
- { include: "@numbers" },
130
- { include: "@identifiers" },
131
- { include: "@strings" },
132
- { include: "@atoms" },
133
- { include: "@sigils" },
134
- { include: "@attributes" },
135
- { include: "@symbols" }
136
- ],
137
- // Whitespace
138
- whitespace: [[/\s+/, "white"]],
139
- // Comments
140
- comments: [[/(#)(.*)/, ["comment.punctuation", "comment"]]],
141
- // Keyword list shorthand
142
- keywordsShorthand: [
143
- [/(@atomName)(:)(\s+)/, ["constant", "constant.punctuation", "white"]],
144
- // Use positive look-ahead to ensure the string is followed by :
145
- // and should be considered a keyword.
146
- [
147
- /"(?=([^"]|#\{.*?\}|\\")*":)/,
148
- { token: "constant.delimiter", next: "@doubleQuotedStringKeyword" }
149
- ],
150
- [
151
- /'(?=([^']|#\{.*?\}|\\')*':)/,
152
- { token: "constant.delimiter", next: "@singleQuotedStringKeyword" }
153
- ]
154
- ],
155
- doubleQuotedStringKeyword: [
156
- [/":/, { token: "constant.delimiter", next: "@pop" }],
157
- { include: "@stringConstantContentInterpol" }
158
- ],
159
- singleQuotedStringKeyword: [
160
- [/':/, { token: "constant.delimiter", next: "@pop" }],
161
- { include: "@stringConstantContentInterpol" }
162
- ],
163
- // Numbers
164
- numbers: [
165
- [/0b@binary/, "number.binary"],
166
- [/0o@octal/, "number.octal"],
167
- [/0x@hex/, "number.hex"],
168
- [/@decimal\.@decimal([eE]-?@decimal)?/, "number.float"],
169
- [/@decimal/, "number"]
170
- ],
171
- // Identifiers
172
- identifiers: [
173
- // Tokenize identifier name in function-like definitions.
174
- // Note: given `def a + b, do: nil`, `a` is not a function name,
175
- // so we use negative look-ahead to ensure there's no operator.
176
- [
177
- /\b(defp?|defnp?|defmacrop?|defguardp?|defdelegate)(\s+)(@variableName)(?!\s+@operator)/,
178
- [
179
- "keyword.declaration",
180
- "white",
181
- {
182
- cases: {
183
- unquote: "keyword",
184
- "@default": "function"
185
- }
186
- }
187
- ]
188
- ],
189
- // Tokenize function calls
190
- [
191
- // In-scope call - an identifier followed by ( or .(
192
- /(@variableName)(?=\s*\.?\s*\()/,
193
- {
194
- cases: {
195
- // Tokenize as keyword in cases like `if(..., do: ..., else: ...)`
196
- "@declarationKeywords": "keyword.declaration",
197
- "@namespaceKeywords": "keyword",
198
- "@otherKeywords": "keyword",
199
- "@default": "function.call"
200
- }
201
- }
202
- ],
203
- [
204
- // Referencing function in a module
205
- /(@moduleName)(\s*)(\.)(\s*)(@variableName)/,
206
- ["type.identifier", "white", "operator", "white", "function.call"]
207
- ],
208
- [
209
- // Referencing function in an Erlang module
210
- /(:)(@atomName)(\s*)(\.)(\s*)(@variableName)/,
211
- ["constant.punctuation", "constant", "white", "operator", "white", "function.call"]
212
- ],
213
- [
214
- // Piping into a function (tokenized separately as it may not have parentheses)
215
- /(\|>)(\s*)(@variableName)/,
216
- [
217
- "operator",
218
- "white",
219
- {
220
- cases: {
221
- "@otherKeywords": "keyword",
222
- "@default": "function.call"
223
- }
224
- }
225
- ]
226
- ],
227
- [
228
- // Function reference passed to another function
229
- /(&)(\s*)(@variableName)/,
230
- ["operator", "white", "function.call"]
231
- ],
232
- // Language keywords, builtins, constants and variables
233
- [
234
- /@variableName/,
235
- {
236
- cases: {
237
- "@declarationKeywords": "keyword.declaration",
238
- "@operatorKeywords": "keyword.operator",
239
- "@namespaceKeywords": "keyword",
240
- "@otherKeywords": "keyword",
241
- "@constants": "constant.language",
242
- "@nameBuiltin": "variable.language",
243
- "_.*": "comment.unused",
244
- "@default": "identifier"
245
- }
246
- }
247
- ],
248
- // Module names
249
- [/@moduleName/, "type.identifier"]
250
- ],
251
- // Strings
252
- strings: [
253
- [/"""/, { token: "string.delimiter", next: "@doubleQuotedHeredoc" }],
254
- [/'''/, { token: "string.delimiter", next: "@singleQuotedHeredoc" }],
255
- [/"/, { token: "string.delimiter", next: "@doubleQuotedString" }],
256
- [/'/, { token: "string.delimiter", next: "@singleQuotedString" }]
257
- ],
258
- doubleQuotedHeredoc: [
259
- [/"""/, { token: "string.delimiter", next: "@pop" }],
260
- { include: "@stringContentInterpol" }
261
- ],
262
- singleQuotedHeredoc: [
263
- [/'''/, { token: "string.delimiter", next: "@pop" }],
264
- { include: "@stringContentInterpol" }
265
- ],
266
- doubleQuotedString: [
267
- [/"/, { token: "string.delimiter", next: "@pop" }],
268
- { include: "@stringContentInterpol" }
269
- ],
270
- singleQuotedString: [
271
- [/'/, { token: "string.delimiter", next: "@pop" }],
272
- { include: "@stringContentInterpol" }
273
- ],
274
- // Atoms
275
- atoms: [
276
- [/(:)(@atomName)/, ["constant.punctuation", "constant"]],
277
- [/:"/, { token: "constant.delimiter", next: "@doubleQuotedStringAtom" }],
278
- [/:'/, { token: "constant.delimiter", next: "@singleQuotedStringAtom" }]
279
- ],
280
- doubleQuotedStringAtom: [
281
- [/"/, { token: "constant.delimiter", next: "@pop" }],
282
- { include: "@stringConstantContentInterpol" }
283
- ],
284
- singleQuotedStringAtom: [
285
- [/'/, { token: "constant.delimiter", next: "@pop" }],
286
- { include: "@stringConstantContentInterpol" }
287
- ],
288
- // Sigils
289
- // See https://elixir-lang.org/getting-started/sigils.html
290
- // Sigils allow for typing values using their textual representation.
291
- // All sigils start with ~ followed by a letter or
292
- // multi-letter uppercase starting at Elixir v1.15.0, indicating sigil type
293
- // and then a delimiter pair enclosing the textual representation.
294
- // Optional modifiers are allowed after the closing delimiter.
295
- // For instance a regular expressions can be written as:
296
- // ~r/foo|bar/ ~r{foo|bar} ~r/foo|bar/g
297
- //
298
- // In general lowercase sigils allow for interpolation
299
- // and escaped characters, whereas uppercase sigils don't
300
- //
301
- // During tokenization we want to distinguish some
302
- // specific sigil types, namely string and regexp,
303
- // so that they cen be themed separately.
304
- //
305
- // To reasonably handle all those combinations we leverage
306
- // dot-separated states, so if we transition to @sigilStart.interpol.s.{.}
307
- // then "sigilStart.interpol.s" state will match and also all
308
- // the individual dot-separated parameters can be accessed.
309
- sigils: [
310
- [/~[a-z]@sigilStartDelimiter/, { token: "@rematch", next: "@sigil.interpol" }],
311
- [/~([A-Z]+)@sigilStartDelimiter/, { token: "@rematch", next: "@sigil.noInterpol" }]
312
- ],
313
- sigil: [
314
- [/~([a-z]|[A-Z]+)\{/, { token: "@rematch", switchTo: "@sigilStart.$S2.$1.{.}" }],
315
- [/~([a-z]|[A-Z]+)\[/, { token: "@rematch", switchTo: "@sigilStart.$S2.$1.[.]" }],
316
- [/~([a-z]|[A-Z]+)\(/, { token: "@rematch", switchTo: "@sigilStart.$S2.$1.(.)" }],
317
- [/~([a-z]|[A-Z]+)\</, { token: "@rematch", switchTo: "@sigilStart.$S2.$1.<.>" }],
318
- [
319
- /~([a-z]|[A-Z]+)(@sigilSymmetricDelimiter)/,
320
- { token: "@rematch", switchTo: "@sigilStart.$S2.$1.$2.$2" }
321
- ]
322
- ],
323
- // The definitions below expect states to be of the form:
324
- //
325
- // sigilStart.<interpol-or-noInterpol>.<sigil-letter>.<start-delimiter>.<end-delimiter>
326
- // sigilContinue.<interpol-or-noInterpol>.<sigil-letter>.<start-delimiter>.<end-delimiter>
327
- //
328
- // The sigilStart state is used only to properly classify the token (as string/regex/sigil)
329
- // and immediately switches to the sigilContinue sate, which handles the actual content
330
- // and waits for the corresponding end delimiter.
331
- "sigilStart.interpol.s": [
332
- [
333
- /~s@sigilStartDelimiter/,
334
- {
335
- token: "string.delimiter",
336
- switchTo: "@sigilContinue.$S2.$S3.$S4.$S5"
337
- }
338
- ]
339
- ],
340
- "sigilContinue.interpol.s": [
341
- [
342
- /(@sigilEndDelimiter)@sigilModifiers/,
343
- {
344
- cases: {
345
- "$1==$S5": { token: "string.delimiter", next: "@pop" },
346
- "@default": "string"
347
- }
348
- }
349
- ],
350
- { include: "@stringContentInterpol" }
351
- ],
352
- "sigilStart.noInterpol.S": [
353
- [
354
- /~S@sigilStartDelimiter/,
355
- {
356
- token: "string.delimiter",
357
- switchTo: "@sigilContinue.$S2.$S3.$S4.$S5"
358
- }
359
- ]
360
- ],
361
- "sigilContinue.noInterpol.S": [
362
- // Ignore escaped sigil end
363
- [/(^|[^\\])\\@sigilEndDelimiter/, "string"],
364
- [
365
- /(@sigilEndDelimiter)@sigilModifiers/,
366
- {
367
- cases: {
368
- "$1==$S5": { token: "string.delimiter", next: "@pop" },
369
- "@default": "string"
370
- }
371
- }
372
- ],
373
- { include: "@stringContent" }
374
- ],
375
- "sigilStart.interpol.r": [
376
- [
377
- /~r@sigilStartDelimiter/,
378
- {
379
- token: "regexp.delimiter",
380
- switchTo: "@sigilContinue.$S2.$S3.$S4.$S5"
381
- }
382
- ]
383
- ],
384
- "sigilContinue.interpol.r": [
385
- [
386
- /(@sigilEndDelimiter)@sigilModifiers/,
387
- {
388
- cases: {
389
- "$1==$S5": { token: "regexp.delimiter", next: "@pop" },
390
- "@default": "regexp"
391
- }
392
- }
393
- ],
394
- { include: "@regexpContentInterpol" }
395
- ],
396
- "sigilStart.noInterpol.R": [
397
- [
398
- /~R@sigilStartDelimiter/,
399
- {
400
- token: "regexp.delimiter",
401
- switchTo: "@sigilContinue.$S2.$S3.$S4.$S5"
402
- }
403
- ]
404
- ],
405
- "sigilContinue.noInterpol.R": [
406
- // Ignore escaped sigil end
407
- [/(^|[^\\])\\@sigilEndDelimiter/, "regexp"],
408
- [
409
- /(@sigilEndDelimiter)@sigilModifiers/,
410
- {
411
- cases: {
412
- "$1==$S5": { token: "regexp.delimiter", next: "@pop" },
413
- "@default": "regexp"
414
- }
415
- }
416
- ],
417
- { include: "@regexpContent" }
418
- ],
419
- // Fallback to the generic sigil by default
420
- "sigilStart.interpol": [
421
- [
422
- /~([a-z]|[A-Z]+)@sigilStartDelimiter/,
423
- {
424
- token: "sigil.delimiter",
425
- switchTo: "@sigilContinue.$S2.$S3.$S4.$S5"
426
- }
427
- ]
428
- ],
429
- "sigilContinue.interpol": [
430
- [
431
- /(@sigilEndDelimiter)@sigilModifiers/,
432
- {
433
- cases: {
434
- "$1==$S5": { token: "sigil.delimiter", next: "@pop" },
435
- "@default": "sigil"
436
- }
437
- }
438
- ],
439
- { include: "@sigilContentInterpol" }
440
- ],
441
- "sigilStart.noInterpol": [
442
- [
443
- /~([a-z]|[A-Z]+)@sigilStartDelimiter/,
444
- {
445
- token: "sigil.delimiter",
446
- switchTo: "@sigilContinue.$S2.$S3.$S4.$S5"
447
- }
448
- ]
449
- ],
450
- "sigilContinue.noInterpol": [
451
- // Ignore escaped sigil end
452
- [/(^|[^\\])\\@sigilEndDelimiter/, "sigil"],
453
- [
454
- /(@sigilEndDelimiter)@sigilModifiers/,
455
- {
456
- cases: {
457
- "$1==$S5": { token: "sigil.delimiter", next: "@pop" },
458
- "@default": "sigil"
459
- }
460
- }
461
- ],
462
- { include: "@sigilContent" }
463
- ],
464
- // Attributes
465
- attributes: [
466
- // Module @doc* attributes - tokenized as comments
467
- [
468
- /\@(module|type)?doc (~[sS])?"""/,
469
- {
470
- token: "comment.block.documentation",
471
- next: "@doubleQuotedHeredocDocstring"
472
- }
473
- ],
474
- [
475
- /\@(module|type)?doc (~[sS])?'''/,
476
- {
477
- token: "comment.block.documentation",
478
- next: "@singleQuotedHeredocDocstring"
479
- }
480
- ],
481
- [
482
- /\@(module|type)?doc (~[sS])?"/,
483
- {
484
- token: "comment.block.documentation",
485
- next: "@doubleQuotedStringDocstring"
486
- }
487
- ],
488
- [
489
- /\@(module|type)?doc (~[sS])?'/,
490
- {
491
- token: "comment.block.documentation",
492
- next: "@singleQuotedStringDocstring"
493
- }
494
- ],
495
- [/\@(module|type)?doc false/, "comment.block.documentation"],
496
- // Module attributes
497
- [/\@(@variableName)/, "variable"]
498
- ],
499
- doubleQuotedHeredocDocstring: [
500
- [/"""/, { token: "comment.block.documentation", next: "@pop" }],
501
- { include: "@docstringContent" }
502
- ],
503
- singleQuotedHeredocDocstring: [
504
- [/'''/, { token: "comment.block.documentation", next: "@pop" }],
505
- { include: "@docstringContent" }
506
- ],
507
- doubleQuotedStringDocstring: [
508
- [/"/, { token: "comment.block.documentation", next: "@pop" }],
509
- { include: "@docstringContent" }
510
- ],
511
- singleQuotedStringDocstring: [
512
- [/'/, { token: "comment.block.documentation", next: "@pop" }],
513
- { include: "@docstringContent" }
514
- ],
515
- // Operators, punctuation, brackets
516
- symbols: [
517
- // Code point operator (either with regular character ?a or an escaped one ?\n)
518
- [/\?(\\.|[^\\\s])/, "number.constant"],
519
- // Anonymous function arguments
520
- [/&\d+/, "operator"],
521
- // Bitshift operators (must go before delimiters, so that << >> don't match first)
522
- [/<<<|>>>/, "operator"],
523
- // Delimiter pairs
524
- [/[()\[\]\{\}]|<<|>>/, "@brackets"],
525
- // Triple dot is a valid name (must go before operators, so that .. doesn't match instead)
526
- [/\.\.\./, "identifier"],
527
- // Punctuation => (must go before operators, so it's not tokenized as = then >)
528
- [/=>/, "punctuation"],
529
- // Operators
530
- [/@operator/, "operator"],
531
- // Punctuation
532
- [/[:;,.%]/, "punctuation"]
533
- ],
534
- // Generic helpers
535
- stringContentInterpol: [
536
- { include: "@interpolation" },
537
- { include: "@escapeChar" },
538
- { include: "@stringContent" }
539
- ],
540
- stringContent: [[/./, "string"]],
541
- stringConstantContentInterpol: [
542
- { include: "@interpolation" },
543
- { include: "@escapeChar" },
544
- { include: "@stringConstantContent" }
545
- ],
546
- stringConstantContent: [[/./, "constant"]],
547
- regexpContentInterpol: [
548
- { include: "@interpolation" },
549
- { include: "@escapeChar" },
550
- { include: "@regexpContent" }
551
- ],
552
- regexpContent: [
553
- // # may be a regular regexp char, so we use a heuristic
554
- // assuming a # surrounded by whitespace is actually a comment.
555
- [/(\s)(#)(\s.*)$/, ["white", "comment.punctuation", "comment"]],
556
- [/./, "regexp"]
557
- ],
558
- sigilContentInterpol: [
559
- { include: "@interpolation" },
560
- { include: "@escapeChar" },
561
- { include: "@sigilContent" }
562
- ],
563
- sigilContent: [[/./, "sigil"]],
564
- docstringContent: [[/./, "comment.block.documentation"]],
565
- escapeChar: [[/@escape/, "constant.character.escape"]],
566
- interpolation: [[/#{/, { token: "delimiter.bracket.embed", next: "@interpolationContinue" }]],
567
- interpolationContinue: [
568
- [/}/, { token: "delimiter.bracket.embed", next: "@pop" }],
569
- // Interpolation brackets may contain arbitrary code,
570
- // so we simply match against all the root rules,
571
- // until we reach interpolation end (the above matches).
572
- { include: "@root" }
573
- ]
574
- }
575
- };
576
-
577
- export { conf, language };
@@ -1,19 +0,0 @@
1
- import { registerLanguage } from '../_.contribution.js';
2
-
3
- /*!-----------------------------------------------------------------------------
4
- * Copyright (c) Microsoft Corporation. All rights reserved.
5
- * Version: 0.54.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: "flow9",
12
- extensions: [".flow"],
13
- aliases: ["Flow9", "Flow", "flow9", "flow"],
14
- loader: () => {
15
- {
16
- return import('./flow9.js');
17
- }
18
- }
19
- });