@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,325 @@
1
+ const conf = {
2
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
3
+ comments: {
4
+ lineComment: "//",
5
+ blockComment: ["/*", "*/"]
6
+ },
7
+ brackets: [
8
+ ["{", "}"],
9
+ ["[", "]"],
10
+ ["(", ")"]
11
+ ],
12
+ autoClosingPairs: [
13
+ { open: "{", close: "}" },
14
+ { open: "[", close: "]" },
15
+ { open: "(", close: ")" },
16
+ { open: "'", close: "'", notIn: ["string", "comment"] },
17
+ { open: '"', close: '"', notIn: ["string", "comment"] }
18
+ ],
19
+ surroundingPairs: [
20
+ { open: "{", close: "}" },
21
+ { open: "[", close: "]" },
22
+ { open: "(", close: ")" },
23
+ { open: "<", close: ">" },
24
+ { open: "'", close: "'" },
25
+ { open: '"', close: '"' }
26
+ ],
27
+ folding: {
28
+ markers: {
29
+ start: new RegExp("^\\s*#region\\b"),
30
+ end: new RegExp("^\\s*#endregion\\b")
31
+ }
32
+ }
33
+ };
34
+ const language = {
35
+ defaultToken: "",
36
+ tokenPostfix: ".cs",
37
+ brackets: [
38
+ { open: "{", close: "}", token: "delimiter.curly" },
39
+ { open: "[", close: "]", token: "delimiter.square" },
40
+ { open: "(", close: ")", token: "delimiter.parenthesis" },
41
+ { open: "<", close: ">", token: "delimiter.angle" }
42
+ ],
43
+ keywords: [
44
+ "extern",
45
+ "alias",
46
+ "using",
47
+ "bool",
48
+ "decimal",
49
+ "sbyte",
50
+ "byte",
51
+ "short",
52
+ "ushort",
53
+ "int",
54
+ "uint",
55
+ "long",
56
+ "ulong",
57
+ "char",
58
+ "float",
59
+ "double",
60
+ "object",
61
+ "dynamic",
62
+ "string",
63
+ "assembly",
64
+ "is",
65
+ "as",
66
+ "ref",
67
+ "out",
68
+ "this",
69
+ "base",
70
+ "new",
71
+ "typeof",
72
+ "void",
73
+ "checked",
74
+ "unchecked",
75
+ "default",
76
+ "delegate",
77
+ "var",
78
+ "const",
79
+ "if",
80
+ "else",
81
+ "switch",
82
+ "case",
83
+ "while",
84
+ "do",
85
+ "for",
86
+ "foreach",
87
+ "in",
88
+ "break",
89
+ "continue",
90
+ "goto",
91
+ "return",
92
+ "throw",
93
+ "try",
94
+ "catch",
95
+ "finally",
96
+ "lock",
97
+ "yield",
98
+ "from",
99
+ "let",
100
+ "where",
101
+ "join",
102
+ "on",
103
+ "equals",
104
+ "into",
105
+ "orderby",
106
+ "ascending",
107
+ "descending",
108
+ "select",
109
+ "group",
110
+ "by",
111
+ "namespace",
112
+ "partial",
113
+ "class",
114
+ "field",
115
+ "event",
116
+ "method",
117
+ "param",
118
+ "public",
119
+ "protected",
120
+ "internal",
121
+ "private",
122
+ "abstract",
123
+ "sealed",
124
+ "static",
125
+ "struct",
126
+ "readonly",
127
+ "volatile",
128
+ "virtual",
129
+ "override",
130
+ "params",
131
+ "get",
132
+ "set",
133
+ "add",
134
+ "remove",
135
+ "operator",
136
+ "true",
137
+ "false",
138
+ "implicit",
139
+ "explicit",
140
+ "interface",
141
+ "enum",
142
+ "null",
143
+ "async",
144
+ "await",
145
+ "fixed",
146
+ "sizeof",
147
+ "stackalloc",
148
+ "unsafe",
149
+ "nameof",
150
+ "when"
151
+ ],
152
+ namespaceFollows: ["namespace", "using"],
153
+ parenFollows: ["if", "for", "while", "switch", "foreach", "using", "catch", "when"],
154
+ operators: [
155
+ "=",
156
+ "??",
157
+ "||",
158
+ "&&",
159
+ "|",
160
+ "^",
161
+ "&",
162
+ "==",
163
+ "!=",
164
+ "<=",
165
+ ">=",
166
+ "<<",
167
+ "+",
168
+ "-",
169
+ "*",
170
+ "/",
171
+ "%",
172
+ "!",
173
+ "~",
174
+ "++",
175
+ "--",
176
+ "+=",
177
+ "-=",
178
+ "*=",
179
+ "/=",
180
+ "%=",
181
+ "&=",
182
+ "|=",
183
+ "^=",
184
+ "<<=",
185
+ ">>=",
186
+ ">>",
187
+ "=>"
188
+ ],
189
+ symbols: /[=><!~?:&|+\-*\/\^%]+/,
190
+ // escape sequences
191
+ escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
192
+ // The main tokenizer for our languages
193
+ tokenizer: {
194
+ root: [
195
+ // identifiers and keywords
196
+ [
197
+ /\@?[a-zA-Z_]\w*/,
198
+ {
199
+ cases: {
200
+ "@namespaceFollows": {
201
+ token: "keyword.$0",
202
+ next: "@namespace"
203
+ },
204
+ "@keywords": {
205
+ token: "keyword.$0",
206
+ next: "@qualified"
207
+ },
208
+ "@default": { token: "identifier", next: "@qualified" }
209
+ }
210
+ }
211
+ ],
212
+ // whitespace
213
+ { include: "@whitespace" },
214
+ // delimiters and operators
215
+ [
216
+ /}/,
217
+ {
218
+ cases: {
219
+ "$S2==interpolatedstring": {
220
+ token: "string.quote",
221
+ next: "@pop"
222
+ },
223
+ "$S2==litinterpstring": {
224
+ token: "string.quote",
225
+ next: "@pop"
226
+ },
227
+ "@default": "@brackets"
228
+ }
229
+ }
230
+ ],
231
+ [/[{}()\[\]]/, "@brackets"],
232
+ [/[<>](?!@symbols)/, "@brackets"],
233
+ [
234
+ /@symbols/,
235
+ {
236
+ cases: {
237
+ "@operators": "delimiter",
238
+ "@default": ""
239
+ }
240
+ }
241
+ ],
242
+ // numbers
243
+ [/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/, "number.float"],
244
+ [/0[xX][0-9a-fA-F_]+/, "number.hex"],
245
+ [/0[bB][01_]+/, "number.hex"],
246
+ // binary: use same theme style as hex
247
+ [/[0-9_]+/, "number"],
248
+ // delimiter: after number because of .\d floats
249
+ [/[;,.]/, "delimiter"],
250
+ // strings
251
+ [/"([^"\\]|\\.)*$/, "string.invalid"],
252
+ // non-teminated string
253
+ [/"/, { token: "string.quote", next: "@string" }],
254
+ [/\$\@"/, { token: "string.quote", next: "@litinterpstring" }],
255
+ [/\@"/, { token: "string.quote", next: "@litstring" }],
256
+ [/\$"/, { token: "string.quote", next: "@interpolatedstring" }],
257
+ // characters
258
+ [/'[^\\']'/, "string"],
259
+ [/(')(@escapes)(')/, ["string", "string.escape", "string"]],
260
+ [/'/, "string.invalid"]
261
+ ],
262
+ qualified: [
263
+ [
264
+ /[a-zA-Z_][\w]*/,
265
+ {
266
+ cases: {
267
+ "@keywords": { token: "keyword.$0" },
268
+ "@default": "identifier"
269
+ }
270
+ }
271
+ ],
272
+ [/\./, "delimiter"],
273
+ ["", "", "@pop"]
274
+ ],
275
+ namespace: [
276
+ { include: "@whitespace" },
277
+ [/[A-Z]\w*/, "namespace"],
278
+ [/[\.=]/, "delimiter"],
279
+ ["", "", "@pop"]
280
+ ],
281
+ comment: [
282
+ [/[^\/*]+/, "comment"],
283
+ // [/\/\*/, 'comment', '@push' ], // no nested comments :-(
284
+ ["\\*/", "comment", "@pop"],
285
+ [/[\/*]/, "comment"]
286
+ ],
287
+ string: [
288
+ [/[^\\"]+/, "string"],
289
+ [/@escapes/, "string.escape"],
290
+ [/\\./, "string.escape.invalid"],
291
+ [/"/, { token: "string.quote", next: "@pop" }]
292
+ ],
293
+ litstring: [
294
+ [/[^"]+/, "string"],
295
+ [/""/, "string.escape"],
296
+ [/"/, { token: "string.quote", next: "@pop" }]
297
+ ],
298
+ litinterpstring: [
299
+ [/[^"{]+/, "string"],
300
+ [/""/, "string.escape"],
301
+ [/{{/, "string.escape"],
302
+ [/}}/, "string.escape"],
303
+ [/{/, { token: "string.quote", next: "root.litinterpstring" }],
304
+ [/"/, { token: "string.quote", next: "@pop" }]
305
+ ],
306
+ interpolatedstring: [
307
+ [/[^\\"{]+/, "string"],
308
+ [/@escapes/, "string.escape"],
309
+ [/\\./, "string.escape.invalid"],
310
+ [/{{/, "string.escape"],
311
+ [/}}/, "string.escape"],
312
+ [/{/, { token: "string.quote", next: "root.interpolatedstring" }],
313
+ [/"/, { token: "string.quote", next: "@pop" }]
314
+ ],
315
+ whitespace: [
316
+ [/^[ \t\v\f]*#((r)|(load))(?=\s)/, "directive.csx"],
317
+ [/^[ \t\v\f]*#\w.*$/, "namespace.cpp"],
318
+ [/[ \t\v\f\r\n]+/, ""],
319
+ [/\/\*/, "comment", "@comment"],
320
+ [/\/\/.*$/, "comment"]
321
+ ]
322
+ }
323
+ };
324
+
325
+ export { conf, language };
@@ -0,0 +1,8 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ registerLanguage({
4
+ id: "csp",
5
+ extensions: [".csp"],
6
+ aliases: ["CSP", "csp"],
7
+ loader: () => import('./csp.js')
8
+ });
package/csp/csp.js ADDED
@@ -0,0 +1,52 @@
1
+ const conf = {
2
+ brackets: [],
3
+ autoClosingPairs: [],
4
+ surroundingPairs: []
5
+ };
6
+ const language = {
7
+ // Set defaultToken to invalid to see what you do not tokenize yet
8
+ // defaultToken: 'invalid',
9
+ keywords: [],
10
+ typeKeywords: [],
11
+ tokenPostfix: ".csp",
12
+ operators: [],
13
+ symbols: /[=><!~?:&|+\-*\/\^%]+/,
14
+ escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
15
+ tokenizer: {
16
+ root: [
17
+ [/child-src/, "string.quote"],
18
+ [/connect-src/, "string.quote"],
19
+ [/default-src/, "string.quote"],
20
+ [/font-src/, "string.quote"],
21
+ [/frame-src/, "string.quote"],
22
+ [/img-src/, "string.quote"],
23
+ [/manifest-src/, "string.quote"],
24
+ [/media-src/, "string.quote"],
25
+ [/object-src/, "string.quote"],
26
+ [/script-src/, "string.quote"],
27
+ [/style-src/, "string.quote"],
28
+ [/worker-src/, "string.quote"],
29
+ [/base-uri/, "string.quote"],
30
+ [/plugin-types/, "string.quote"],
31
+ [/sandbox/, "string.quote"],
32
+ [/disown-opener/, "string.quote"],
33
+ [/form-action/, "string.quote"],
34
+ [/frame-ancestors/, "string.quote"],
35
+ [/report-uri/, "string.quote"],
36
+ [/report-to/, "string.quote"],
37
+ [/upgrade-insecure-requests/, "string.quote"],
38
+ [/block-all-mixed-content/, "string.quote"],
39
+ [/require-sri-for/, "string.quote"],
40
+ [/reflected-xss/, "string.quote"],
41
+ [/referrer/, "string.quote"],
42
+ [/policy-uri/, "string.quote"],
43
+ [/'self'/, "string.quote"],
44
+ [/'unsafe-inline'/, "string.quote"],
45
+ [/'unsafe-eval'/, "string.quote"],
46
+ [/'strict-dynamic'/, "string.quote"],
47
+ [/'unsafe-hashed-attributes'/, "string.quote"]
48
+ ]
49
+ }
50
+ };
51
+
52
+ export { conf, language };
@@ -0,0 +1,9 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ registerLanguage({
4
+ id: "css",
5
+ extensions: [".css"],
6
+ aliases: ["CSS", "css"],
7
+ mimetypes: ["text/css"],
8
+ loader: () => import('./css.js')
9
+ });
package/css/css.js ADDED
@@ -0,0 +1,184 @@
1
+ const conf = {
2
+ wordPattern: /(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,
3
+ comments: {
4
+ blockComment: ["/*", "*/"]
5
+ },
6
+ brackets: [
7
+ ["{", "}"],
8
+ ["[", "]"],
9
+ ["(", ")"]
10
+ ],
11
+ autoClosingPairs: [
12
+ { open: "{", close: "}", notIn: ["string", "comment"] },
13
+ { open: "[", close: "]", notIn: ["string", "comment"] },
14
+ { open: "(", close: ")", notIn: ["string", "comment"] },
15
+ { open: '"', close: '"', notIn: ["string", "comment"] },
16
+ { open: "'", close: "'", notIn: ["string", "comment"] }
17
+ ],
18
+ surroundingPairs: [
19
+ { open: "{", close: "}" },
20
+ { open: "[", close: "]" },
21
+ { open: "(", close: ")" },
22
+ { open: '"', close: '"' },
23
+ { open: "'", close: "'" }
24
+ ],
25
+ folding: {
26
+ markers: {
27
+ start: new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),
28
+ end: new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")
29
+ }
30
+ }
31
+ };
32
+ const language = {
33
+ defaultToken: "",
34
+ tokenPostfix: ".css",
35
+ ws: "[ \n\r\f]*",
36
+ // whitespaces (referenced in several rules)
37
+ identifier: "-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",
38
+ brackets: [
39
+ { open: "{", close: "}", token: "delimiter.bracket" },
40
+ { open: "[", close: "]", token: "delimiter.bracket" },
41
+ { open: "(", close: ")", token: "delimiter.parenthesis" },
42
+ { open: "<", close: ">", token: "delimiter.angle" }
43
+ ],
44
+ tokenizer: {
45
+ root: [{ include: "@selector" }],
46
+ selector: [
47
+ { include: "@comments" },
48
+ { include: "@import" },
49
+ { include: "@strings" },
50
+ [
51
+ "[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",
52
+ { token: "keyword", next: "@keyframedeclaration" }
53
+ ],
54
+ ["[@](page|content|font-face|-moz-document)", { token: "keyword" }],
55
+ ["[@](charset|namespace)", { token: "keyword", next: "@declarationbody" }],
56
+ [
57
+ "(url-prefix)(\\()",
58
+ ["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
59
+ ],
60
+ [
61
+ "(url)(\\()",
62
+ ["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
63
+ ],
64
+ { include: "@selectorname" },
65
+ ["[\\*]", "tag"],
66
+ // selector symbols
67
+ ["[>\\+,]", "delimiter"],
68
+ // selector operators
69
+ ["\\[", { token: "delimiter.bracket", next: "@selectorattribute" }],
70
+ ["{", { token: "delimiter.bracket", next: "@selectorbody" }]
71
+ ],
72
+ selectorbody: [
73
+ { include: "@comments" },
74
+ ["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))", "attribute.name", "@rulevalue"],
75
+ // rule definition: to distinguish from a nested selector check for whitespace, number or a semicolon
76
+ ["}", { token: "delimiter.bracket", next: "@pop" }]
77
+ ],
78
+ selectorname: [
79
+ ["(\\.|#(?=[^{])|%|(@identifier)|:)+", "tag"]
80
+ // selector (.foo, div, ...)
81
+ ],
82
+ selectorattribute: [{ include: "@term" }, ["]", { token: "delimiter.bracket", next: "@pop" }]],
83
+ term: [
84
+ { include: "@comments" },
85
+ [
86
+ "(url-prefix)(\\()",
87
+ ["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
88
+ ],
89
+ [
90
+ "(url)(\\()",
91
+ ["attribute.value", { token: "delimiter.parenthesis", next: "@urldeclaration" }]
92
+ ],
93
+ { include: "@functioninvocation" },
94
+ { include: "@numbers" },
95
+ { include: "@name" },
96
+ { include: "@strings" },
97
+ ["([<>=\\+\\-\\*\\/\\^\\|\\~,])", "delimiter"],
98
+ [",", "delimiter"]
99
+ ],
100
+ rulevalue: [
101
+ { include: "@comments" },
102
+ { include: "@strings" },
103
+ { include: "@term" },
104
+ ["!important", "keyword"],
105
+ [";", "delimiter", "@pop"],
106
+ ["(?=})", { token: "", next: "@pop" }]
107
+ // missing semicolon
108
+ ],
109
+ warndebug: [["[@](warn|debug)", { token: "keyword", next: "@declarationbody" }]],
110
+ import: [["[@](import)", { token: "keyword", next: "@declarationbody" }]],
111
+ urldeclaration: [
112
+ { include: "@strings" },
113
+ ["[^)\r\n]+", "string"],
114
+ ["\\)", { token: "delimiter.parenthesis", next: "@pop" }]
115
+ ],
116
+ parenthizedterm: [
117
+ { include: "@term" },
118
+ ["\\)", { token: "delimiter.parenthesis", next: "@pop" }]
119
+ ],
120
+ declarationbody: [
121
+ { include: "@term" },
122
+ [";", "delimiter", "@pop"],
123
+ ["(?=})", { token: "", next: "@pop" }]
124
+ // missing semicolon
125
+ ],
126
+ comments: [
127
+ ["\\/\\*", "comment", "@comment"],
128
+ ["\\/\\/+.*", "comment"]
129
+ ],
130
+ comment: [
131
+ ["\\*\\/", "comment", "@pop"],
132
+ [/[^*/]+/, "comment"],
133
+ [/./, "comment"]
134
+ ],
135
+ name: [["@identifier", "attribute.value"]],
136
+ numbers: [
137
+ ["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?", { token: "attribute.value.number", next: "@units" }],
138
+ ["#[0-9a-fA-F_]+(?!\\w)", "attribute.value.hex"]
139
+ ],
140
+ units: [
141
+ [
142
+ "(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?",
143
+ "attribute.value.unit",
144
+ "@pop"
145
+ ]
146
+ ],
147
+ keyframedeclaration: [
148
+ ["@identifier", "attribute.value"],
149
+ ["{", { token: "delimiter.bracket", switchTo: "@keyframebody" }]
150
+ ],
151
+ keyframebody: [
152
+ { include: "@term" },
153
+ ["{", { token: "delimiter.bracket", next: "@selectorbody" }],
154
+ ["}", { token: "delimiter.bracket", next: "@pop" }]
155
+ ],
156
+ functioninvocation: [
157
+ ["@identifier\\(", { token: "attribute.value", next: "@functionarguments" }]
158
+ ],
159
+ functionarguments: [
160
+ ["\\$@identifier@ws:", "attribute.name"],
161
+ ["[,]", "delimiter"],
162
+ { include: "@term" },
163
+ ["\\)", { token: "attribute.value", next: "@pop" }]
164
+ ],
165
+ strings: [
166
+ ['~?"', { token: "string", next: "@stringenddoublequote" }],
167
+ ["~?'", { token: "string", next: "@stringendquote" }]
168
+ ],
169
+ stringenddoublequote: [
170
+ ["\\\\.", "string"],
171
+ ['"', { token: "string", next: "@pop" }],
172
+ [/[^\\"]+/, "string"],
173
+ [".", "string"]
174
+ ],
175
+ stringendquote: [
176
+ ["\\\\.", "string"],
177
+ ["'", { token: "string", next: "@pop" }],
178
+ [/[^\\']+/, "string"],
179
+ [".", "string"]
180
+ ]
181
+ }
182
+ };
183
+
184
+ export { conf, language };
@@ -0,0 +1,8 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ registerLanguage({
4
+ id: "cypher",
5
+ extensions: [".cypher", ".cyp"],
6
+ aliases: ["Cypher", "OpenCypher"],
7
+ loader: () => import('./cypher.js')
8
+ });