@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
package/tcl/tcl.js ADDED
@@ -0,0 +1,240 @@
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/tcl/tcl.ts
10
+ var conf = {
11
+ brackets: [
12
+ ["{", "}"],
13
+ ["[", "]"],
14
+ ["(", ")"]
15
+ ],
16
+ autoClosingPairs: [
17
+ { open: "{", close: "}" },
18
+ { open: "[", close: "]" },
19
+ { open: "(", close: ")" },
20
+ { open: '"', close: '"' },
21
+ { open: "'", close: "'" }
22
+ ],
23
+ surroundingPairs: [
24
+ { open: "{", close: "}" },
25
+ { open: "[", close: "]" },
26
+ { open: "(", close: ")" },
27
+ { open: '"', close: '"' },
28
+ { open: "'", close: "'" }
29
+ ]
30
+ };
31
+ var language = {
32
+ tokenPostfix: ".tcl",
33
+ specialFunctions: [
34
+ "set",
35
+ "unset",
36
+ "rename",
37
+ "variable",
38
+ "proc",
39
+ "coroutine",
40
+ "foreach",
41
+ "incr",
42
+ "append",
43
+ "lappend",
44
+ "linsert",
45
+ "lreplace"
46
+ ],
47
+ mainFunctions: [
48
+ "if",
49
+ "then",
50
+ "elseif",
51
+ "else",
52
+ "case",
53
+ "switch",
54
+ "while",
55
+ "for",
56
+ "break",
57
+ "continue",
58
+ "return",
59
+ "package",
60
+ "namespace",
61
+ "catch",
62
+ "exit",
63
+ "eval",
64
+ "expr",
65
+ "uplevel",
66
+ "upvar"
67
+ ],
68
+ builtinFunctions: [
69
+ "file",
70
+ "info",
71
+ "concat",
72
+ "join",
73
+ "lindex",
74
+ "list",
75
+ "llength",
76
+ "lrange",
77
+ "lsearch",
78
+ "lsort",
79
+ "split",
80
+ "array",
81
+ "parray",
82
+ "binary",
83
+ "format",
84
+ "regexp",
85
+ "regsub",
86
+ "scan",
87
+ "string",
88
+ "subst",
89
+ "dict",
90
+ "cd",
91
+ "clock",
92
+ "exec",
93
+ "glob",
94
+ "pid",
95
+ "pwd",
96
+ "close",
97
+ "eof",
98
+ "fblocked",
99
+ "fconfigure",
100
+ "fcopy",
101
+ "fileevent",
102
+ "flush",
103
+ "gets",
104
+ "open",
105
+ "puts",
106
+ "read",
107
+ "seek",
108
+ "socket",
109
+ "tell",
110
+ "interp",
111
+ "after",
112
+ "auto_execok",
113
+ "auto_load",
114
+ "auto_mkindex",
115
+ "auto_reset",
116
+ "bgerror",
117
+ "error",
118
+ "global",
119
+ "history",
120
+ "load",
121
+ "source",
122
+ "time",
123
+ "trace",
124
+ "unknown",
125
+ "unset",
126
+ "update",
127
+ "vwait",
128
+ "winfo",
129
+ "wm",
130
+ "bind",
131
+ "event",
132
+ "pack",
133
+ "place",
134
+ "grid",
135
+ "font",
136
+ "bell",
137
+ "clipboard",
138
+ "destroy",
139
+ "focus",
140
+ "grab",
141
+ "lower",
142
+ "option",
143
+ "raise",
144
+ "selection",
145
+ "send",
146
+ "tk",
147
+ "tkwait",
148
+ "tk_bisque",
149
+ "tk_focusNext",
150
+ "tk_focusPrev",
151
+ "tk_focusFollowsMouse",
152
+ "tk_popup",
153
+ "tk_setPalette"
154
+ ],
155
+ symbols: /[=><!~?:&|+\-*\/\^%]+/,
156
+ brackets: [
157
+ { open: "(", close: ")", token: "delimiter.parenthesis" },
158
+ { open: "{", close: "}", token: "delimiter.curly" },
159
+ { open: "[", close: "]", token: "delimiter.square" }
160
+ ],
161
+ escapes: /\\(?:[abfnrtv\\"'\[\]\{\};\$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
162
+ variables: /(?:\$+(?:(?:\:\:?)?[a-zA-Z_]\w*)+)/,
163
+ tokenizer: {
164
+ root: [
165
+ // identifiers and keywords
166
+ [
167
+ /[a-zA-Z_]\w*/,
168
+ {
169
+ cases: {
170
+ "@specialFunctions": {
171
+ token: "keyword.flow",
172
+ next: "@specialFunc"
173
+ },
174
+ "@mainFunctions": "keyword",
175
+ "@builtinFunctions": "variable",
176
+ "@default": "operator.scss"
177
+ }
178
+ }
179
+ ],
180
+ [/\s+\-+(?!\d|\.)\w*|{\*}/, "metatag"],
181
+ // whitespace
182
+ { include: "@whitespace" },
183
+ // delimiters and operators
184
+ [/[{}()\[\]]/, "@brackets"],
185
+ [/@symbols/, "operator"],
186
+ [/\$+(?:\:\:)?\{/, { token: "identifier", next: "@nestedVariable" }],
187
+ [/@variables/, "type.identifier"],
188
+ [/\.(?!\d|\.)[\w\-]*/, "operator.sql"],
189
+ // numbers
190
+ [/\d+(\.\d+)?/, "number"],
191
+ [/\d+/, "number"],
192
+ // delimiter
193
+ [/;/, "delimiter"],
194
+ // strings
195
+ [/"/, { token: "string.quote", bracket: "@open", next: "@dstring" }],
196
+ [/'/, { token: "string.quote", bracket: "@open", next: "@sstring" }]
197
+ ],
198
+ dstring: [
199
+ [/\[/, { token: "@brackets", next: "@nestedCall" }],
200
+ [/\$+(?:\:\:)?\{/, { token: "identifier", next: "@nestedVariable" }],
201
+ [/@variables/, "type.identifier"],
202
+ [/[^\\$\[\]"]+/, "string"],
203
+ [/@escapes/, "string.escape"],
204
+ [/"/, { token: "string.quote", bracket: "@close", next: "@pop" }]
205
+ ],
206
+ sstring: [
207
+ [/\[/, { token: "@brackets", next: "@nestedCall" }],
208
+ [/\$+(?:\:\:)?\{/, { token: "identifier", next: "@nestedVariable" }],
209
+ [/@variables/, "type.identifier"],
210
+ [/[^\\$\[\]']+/, "string"],
211
+ [/@escapes/, "string.escape"],
212
+ [/'/, { token: "string.quote", bracket: "@close", next: "@pop" }]
213
+ ],
214
+ whitespace: [
215
+ [/[ \t\r\n]+/, "white"],
216
+ [/#.*\\$/, { token: "comment", next: "@newlineComment" }],
217
+ [/#.*(?!\\)$/, "comment"]
218
+ ],
219
+ newlineComment: [
220
+ [/.*\\$/, "comment"],
221
+ [/.*(?!\\)$/, { token: "comment", next: "@pop" }]
222
+ ],
223
+ nestedVariable: [
224
+ [/[^\{\}\$]+/, "type.identifier"],
225
+ [/\}/, { token: "identifier", next: "@pop" }]
226
+ ],
227
+ nestedCall: [
228
+ [/\[/, { token: "@brackets", next: "@nestedCall" }],
229
+ [/\]/, { token: "@brackets", next: "@pop" }],
230
+ { include: "root" }
231
+ ],
232
+ specialFunc: [
233
+ [/"/, { token: "string", next: "@dstring" }],
234
+ [/'/, { token: "string", next: "@sstring" }],
235
+ [/\S+/, { token: "type", next: "@pop" }]
236
+ ]
237
+ }
238
+ };
239
+
240
+ 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: "twig",
12
+ extensions: [".twig"],
13
+ aliases: ["Twig", "twig"],
14
+ mimetypes: ["text/x-twig"],
15
+ loader: () => {
16
+ {
17
+ return import('./twig.js');
18
+ }
19
+ }
20
+ });
package/twig/twig.js ADDED
@@ -0,0 +1,400 @@
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/twig/twig.ts
10
+ var conf = {
11
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
12
+ comments: {
13
+ blockComment: ["{#", "#}"]
14
+ },
15
+ brackets: [
16
+ ["{#", "#}"],
17
+ ["{%", "%}"],
18
+ ["{{", "}}"],
19
+ ["(", ")"],
20
+ ["[", "]"],
21
+ // HTML
22
+ ["<!--", "-->"],
23
+ ["<", ">"]
24
+ ],
25
+ autoClosingPairs: [
26
+ { open: "{# ", close: " #}" },
27
+ { open: "{% ", close: " %}" },
28
+ { open: "{{ ", close: " }}" },
29
+ { open: "[", close: "]" },
30
+ { open: "(", close: ")" },
31
+ { open: '"', close: '"' },
32
+ { open: "'", close: "'" }
33
+ ],
34
+ surroundingPairs: [
35
+ { open: '"', close: '"' },
36
+ { open: "'", close: "'" },
37
+ // HTML
38
+ { open: "<", close: ">" }
39
+ ]
40
+ };
41
+ var language = {
42
+ defaultToken: "",
43
+ tokenPostfix: "",
44
+ ignoreCase: true,
45
+ keywords: [
46
+ // (opening) tags
47
+ "apply",
48
+ "autoescape",
49
+ "block",
50
+ "deprecated",
51
+ "do",
52
+ "embed",
53
+ "extends",
54
+ "flush",
55
+ "for",
56
+ "from",
57
+ "if",
58
+ "import",
59
+ "include",
60
+ "macro",
61
+ "sandbox",
62
+ "set",
63
+ "use",
64
+ "verbatim",
65
+ "with",
66
+ // closing tags
67
+ "endapply",
68
+ "endautoescape",
69
+ "endblock",
70
+ "endembed",
71
+ "endfor",
72
+ "endif",
73
+ "endmacro",
74
+ "endsandbox",
75
+ "endset",
76
+ "endwith",
77
+ // literals
78
+ "true",
79
+ "false"
80
+ ],
81
+ tokenizer: {
82
+ root: [
83
+ // whitespace
84
+ [/\s+/],
85
+ // Twig Tag Delimiters
86
+ [/{#/, "comment.twig", "@commentState"],
87
+ [/{%[-~]?/, "delimiter.twig", "@blockState"],
88
+ [/{{[-~]?/, "delimiter.twig", "@variableState"],
89
+ // HTML
90
+ [/<!DOCTYPE/, "metatag.html", "@doctype"],
91
+ [/<!--/, "comment.html", "@comment"],
92
+ [/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/, ["delimiter.html", "tag.html", "", "delimiter.html"]],
93
+ [/(<)(script)/, ["delimiter.html", { token: "tag.html", next: "@script" }]],
94
+ [/(<)(style)/, ["delimiter.html", { token: "tag.html", next: "@style" }]],
95
+ [/(<)((?:[\w\-]+:)?[\w\-]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
96
+ [/(<\/)((?:[\w\-]+:)?[\w\-]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
97
+ [/</, "delimiter.html"],
98
+ [/[^<{]+/]
99
+ // text
100
+ ],
101
+ /**
102
+ * Comment Tag Handling
103
+ */
104
+ commentState: [
105
+ [/#}/, "comment.twig", "@pop"],
106
+ [/./, "comment.twig"]
107
+ ],
108
+ /**
109
+ * Block Tag Handling
110
+ */
111
+ blockState: [
112
+ [/[-~]?%}/, "delimiter.twig", "@pop"],
113
+ // whitespace
114
+ [/\s+/],
115
+ // verbatim
116
+ // Unlike other blocks, verbatim ehas its own state
117
+ // transition to ensure we mark its contents as strings.
118
+ [
119
+ /(verbatim)(\s*)([-~]?%})/,
120
+ ["keyword.twig", "", { token: "delimiter.twig", next: "@rawDataState" }]
121
+ ],
122
+ { include: "expression" }
123
+ ],
124
+ rawDataState: [
125
+ // endverbatim
126
+ [
127
+ /({%[-~]?)(\s*)(endverbatim)(\s*)([-~]?%})/,
128
+ ["delimiter.twig", "", "keyword.twig", "", { token: "delimiter.twig", next: "@popall" }]
129
+ ],
130
+ [/./, "string.twig"]
131
+ ],
132
+ /**
133
+ * Variable Tag Handling
134
+ */
135
+ variableState: [[/[-~]?}}/, "delimiter.twig", "@pop"], { include: "expression" }],
136
+ stringState: [
137
+ // closing double quoted string
138
+ [/"/, "string.twig", "@pop"],
139
+ // interpolation start
140
+ [/#{\s*/, "string.twig", "@interpolationState"],
141
+ // string part
142
+ [/[^#"\\]*(?:(?:\\.|#(?!\{))[^#"\\]*)*/, "string.twig"]
143
+ ],
144
+ interpolationState: [
145
+ // interpolation end
146
+ [/}/, "string.twig", "@pop"],
147
+ { include: "expression" }
148
+ ],
149
+ /**
150
+ * Expression Handling
151
+ */
152
+ expression: [
153
+ // whitespace
154
+ [/\s+/],
155
+ // operators - math
156
+ [/\+|-|\/{1,2}|%|\*{1,2}/, "operators.twig"],
157
+ // operators - logic
158
+ [/(and|or|not|b-and|b-xor|b-or)(\s+)/, ["operators.twig", ""]],
159
+ // operators - comparison (symbols)
160
+ [/==|!=|<|>|>=|<=/, "operators.twig"],
161
+ // operators - comparison (words)
162
+ [/(starts with|ends with|matches)(\s+)/, ["operators.twig", ""]],
163
+ // operators - containment
164
+ [/(in)(\s+)/, ["operators.twig", ""]],
165
+ // operators - test
166
+ [/(is)(\s+)/, ["operators.twig", ""]],
167
+ // operators - misc
168
+ [/\||~|:|\.{1,2}|\?{1,2}/, "operators.twig"],
169
+ // names
170
+ [
171
+ /[^\W\d][\w]*/,
172
+ {
173
+ cases: {
174
+ "@keywords": "keyword.twig",
175
+ "@default": "variable.twig"
176
+ }
177
+ }
178
+ ],
179
+ // numbers
180
+ [/\d+(\.\d+)?/, "number.twig"],
181
+ // punctuation
182
+ [/\(|\)|\[|\]|{|}|,/, "delimiter.twig"],
183
+ // strings
184
+ [/"([^#"\\]*(?:\\.[^#"\\]*)*)"|\'([^\'\\]*(?:\\.[^\'\\]*)*)\'/, "string.twig"],
185
+ // opening double quoted string
186
+ [/"/, "string.twig", "@stringState"],
187
+ // misc syntactic constructs
188
+ // These are not operators per se, but for the purposes of lexical analysis we
189
+ // can treat them as such.
190
+ // arrow functions
191
+ [/=>/, "operators.twig"],
192
+ // assignment
193
+ [/=/, "operators.twig"]
194
+ ],
195
+ /**
196
+ * HTML
197
+ */
198
+ doctype: [
199
+ [/[^>]+/, "metatag.content.html"],
200
+ [/>/, "metatag.html", "@pop"]
201
+ ],
202
+ comment: [
203
+ [/-->/, "comment.html", "@pop"],
204
+ [/[^-]+/, "comment.content.html"],
205
+ [/./, "comment.content.html"]
206
+ ],
207
+ otherTag: [
208
+ [/\/?>/, "delimiter.html", "@pop"],
209
+ [/"([^"]*)"/, "attribute.value.html"],
210
+ [/'([^']*)'/, "attribute.value.html"],
211
+ [/[\w\-]+/, "attribute.name.html"],
212
+ [/=/, "delimiter.html"],
213
+ [/[ \t\r\n]+/]
214
+ // whitespace
215
+ ],
216
+ // -- BEGIN <script> tags handling
217
+ // After <script
218
+ script: [
219
+ [/type/, "attribute.name.html", "@scriptAfterType"],
220
+ [/"([^"]*)"/, "attribute.value.html"],
221
+ [/'([^']*)'/, "attribute.value.html"],
222
+ [/[\w\-]+/, "attribute.name.html"],
223
+ [/=/, "delimiter.html"],
224
+ [
225
+ />/,
226
+ {
227
+ token: "delimiter.html",
228
+ next: "@scriptEmbedded",
229
+ nextEmbedded: "text/javascript"
230
+ }
231
+ ],
232
+ [/[ \t\r\n]+/],
233
+ // whitespace
234
+ [
235
+ /(<\/)(script\s*)(>)/,
236
+ ["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
237
+ ]
238
+ ],
239
+ // After <script ... type
240
+ scriptAfterType: [
241
+ [/=/, "delimiter.html", "@scriptAfterTypeEquals"],
242
+ [
243
+ />/,
244
+ {
245
+ token: "delimiter.html",
246
+ next: "@scriptEmbedded",
247
+ nextEmbedded: "text/javascript"
248
+ }
249
+ ],
250
+ // cover invalid e.g. <script type>
251
+ [/[ \t\r\n]+/],
252
+ // whitespace
253
+ [/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
254
+ ],
255
+ // After <script ... type =
256
+ scriptAfterTypeEquals: [
257
+ [
258
+ /"([^"]*)"/,
259
+ {
260
+ token: "attribute.value.html",
261
+ switchTo: "@scriptWithCustomType.$1"
262
+ }
263
+ ],
264
+ [
265
+ /'([^']*)'/,
266
+ {
267
+ token: "attribute.value.html",
268
+ switchTo: "@scriptWithCustomType.$1"
269
+ }
270
+ ],
271
+ [
272
+ />/,
273
+ {
274
+ token: "delimiter.html",
275
+ next: "@scriptEmbedded",
276
+ nextEmbedded: "text/javascript"
277
+ }
278
+ ],
279
+ // cover invalid e.g. <script type=>
280
+ [/[ \t\r\n]+/],
281
+ // whitespace
282
+ [/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
283
+ ],
284
+ // After <script ... type = $S2
285
+ scriptWithCustomType: [
286
+ [
287
+ />/,
288
+ {
289
+ token: "delimiter.html",
290
+ next: "@scriptEmbedded.$S2",
291
+ nextEmbedded: "$S2"
292
+ }
293
+ ],
294
+ [/"([^"]*)"/, "attribute.value.html"],
295
+ [/'([^']*)'/, "attribute.value.html"],
296
+ [/[\w\-]+/, "attribute.name.html"],
297
+ [/=/, "delimiter.html"],
298
+ [/[ \t\r\n]+/],
299
+ // whitespace
300
+ [/<\/script\s*>/, { token: "@rematch", next: "@pop" }]
301
+ ],
302
+ scriptEmbedded: [
303
+ [/<\/script/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
304
+ [/[^<]+/, ""]
305
+ ],
306
+ // -- END <script> tags handling
307
+ // -- BEGIN <style> tags handling
308
+ // After <style
309
+ style: [
310
+ [/type/, "attribute.name.html", "@styleAfterType"],
311
+ [/"([^"]*)"/, "attribute.value.html"],
312
+ [/'([^']*)'/, "attribute.value.html"],
313
+ [/[\w\-]+/, "attribute.name.html"],
314
+ [/=/, "delimiter.html"],
315
+ [
316
+ />/,
317
+ {
318
+ token: "delimiter.html",
319
+ next: "@styleEmbedded",
320
+ nextEmbedded: "text/css"
321
+ }
322
+ ],
323
+ [/[ \t\r\n]+/],
324
+ // whitespace
325
+ [
326
+ /(<\/)(style\s*)(>)/,
327
+ ["delimiter.html", "tag.html", { token: "delimiter.html", next: "@pop" }]
328
+ ]
329
+ ],
330
+ // After <style ... type
331
+ styleAfterType: [
332
+ [/=/, "delimiter.html", "@styleAfterTypeEquals"],
333
+ [
334
+ />/,
335
+ {
336
+ token: "delimiter.html",
337
+ next: "@styleEmbedded",
338
+ nextEmbedded: "text/css"
339
+ }
340
+ ],
341
+ // cover invalid e.g. <style type>
342
+ [/[ \t\r\n]+/],
343
+ // whitespace
344
+ [/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
345
+ ],
346
+ // After <style ... type =
347
+ styleAfterTypeEquals: [
348
+ [
349
+ /"([^"]*)"/,
350
+ {
351
+ token: "attribute.value.html",
352
+ switchTo: "@styleWithCustomType.$1"
353
+ }
354
+ ],
355
+ [
356
+ /'([^']*)'/,
357
+ {
358
+ token: "attribute.value.html",
359
+ switchTo: "@styleWithCustomType.$1"
360
+ }
361
+ ],
362
+ [
363
+ />/,
364
+ {
365
+ token: "delimiter.html",
366
+ next: "@styleEmbedded",
367
+ nextEmbedded: "text/css"
368
+ }
369
+ ],
370
+ // cover invalid e.g. <style type=>
371
+ [/[ \t\r\n]+/],
372
+ // whitespace
373
+ [/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
374
+ ],
375
+ // After <style ... type = $S2
376
+ styleWithCustomType: [
377
+ [
378
+ />/,
379
+ {
380
+ token: "delimiter.html",
381
+ next: "@styleEmbedded.$S2",
382
+ nextEmbedded: "$S2"
383
+ }
384
+ ],
385
+ [/"([^"]*)"/, "attribute.value.html"],
386
+ [/'([^']*)'/, "attribute.value.html"],
387
+ [/[\w\-]+/, "attribute.name.html"],
388
+ [/=/, "delimiter.html"],
389
+ [/[ \t\r\n]+/],
390
+ // whitespace
391
+ [/<\/style\s*>/, { token: "@rematch", next: "@pop" }]
392
+ ],
393
+ styleEmbedded: [
394
+ [/<\/style/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
395
+ [/[^<]+/, ""]
396
+ ]
397
+ }
398
+ };
399
+
400
+ 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: "typescript",
12
+ extensions: [".ts", ".tsx", ".cts", ".mts"],
13
+ aliases: ["TypeScript", "ts", "typescript"],
14
+ mimetypes: ["text/typescript"],
15
+ loader: () => {
16
+ {
17
+ return import('./typescript.js');
18
+ }
19
+ }
20
+ });