@codingame/monaco-vscode-standalone-languages 23.2.0 → 23.2.2

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,262 @@
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
+ { open: "`", close: "`" }
18
+ ],
19
+ surroundingPairs: [
20
+ { open: "{", close: "}" },
21
+ { open: "[", close: "]" },
22
+ { open: "(", close: ")" },
23
+ { open: '"', close: '"' },
24
+ { open: "'", close: "'" },
25
+ { open: "`", close: "`" }
26
+ ]
27
+ };
28
+ const language = {
29
+ defaultToken: "",
30
+ tokenPostfix: `.cypher`,
31
+ ignoreCase: true,
32
+ brackets: [
33
+ { open: "{", close: "}", token: "delimiter.curly" },
34
+ { open: "[", close: "]", token: "delimiter.bracket" },
35
+ { open: "(", close: ")", token: "delimiter.parenthesis" }
36
+ ],
37
+ keywords: [
38
+ "ALL",
39
+ "AND",
40
+ "AS",
41
+ "ASC",
42
+ "ASCENDING",
43
+ "BY",
44
+ "CALL",
45
+ "CASE",
46
+ "CONTAINS",
47
+ "CREATE",
48
+ "DELETE",
49
+ "DESC",
50
+ "DESCENDING",
51
+ "DETACH",
52
+ "DISTINCT",
53
+ "ELSE",
54
+ "END",
55
+ "ENDS",
56
+ "EXISTS",
57
+ "IN",
58
+ "IS",
59
+ "LIMIT",
60
+ "MANDATORY",
61
+ "MATCH",
62
+ "MERGE",
63
+ "NOT",
64
+ "ON",
65
+ "ON",
66
+ "OPTIONAL",
67
+ "OR",
68
+ "ORDER",
69
+ "REMOVE",
70
+ "RETURN",
71
+ "SET",
72
+ "SKIP",
73
+ "STARTS",
74
+ "THEN",
75
+ "UNION",
76
+ "UNWIND",
77
+ "WHEN",
78
+ "WHERE",
79
+ "WITH",
80
+ "XOR",
81
+ "YIELD"
82
+ ],
83
+ builtinLiterals: ["true", "TRUE", "false", "FALSE", "null", "NULL"],
84
+ builtinFunctions: [
85
+ "abs",
86
+ "acos",
87
+ "asin",
88
+ "atan",
89
+ "atan2",
90
+ "avg",
91
+ "ceil",
92
+ "coalesce",
93
+ "collect",
94
+ "cos",
95
+ "cot",
96
+ "count",
97
+ "degrees",
98
+ "e",
99
+ "endNode",
100
+ "exists",
101
+ "exp",
102
+ "floor",
103
+ "head",
104
+ "id",
105
+ "keys",
106
+ "labels",
107
+ "last",
108
+ "left",
109
+ "length",
110
+ "log",
111
+ "log10",
112
+ "lTrim",
113
+ "max",
114
+ "min",
115
+ "nodes",
116
+ "percentileCont",
117
+ "percentileDisc",
118
+ "pi",
119
+ "properties",
120
+ "radians",
121
+ "rand",
122
+ "range",
123
+ "relationships",
124
+ "replace",
125
+ "reverse",
126
+ "right",
127
+ "round",
128
+ "rTrim",
129
+ "sign",
130
+ "sin",
131
+ "size",
132
+ "split",
133
+ "sqrt",
134
+ "startNode",
135
+ "stDev",
136
+ "stDevP",
137
+ "substring",
138
+ "sum",
139
+ "tail",
140
+ "tan",
141
+ "timestamp",
142
+ "toBoolean",
143
+ "toFloat",
144
+ "toInteger",
145
+ "toLower",
146
+ "toString",
147
+ "toUpper",
148
+ "trim",
149
+ "type"
150
+ ],
151
+ operators: [
152
+ // Math operators
153
+ "+",
154
+ "-",
155
+ "*",
156
+ "/",
157
+ "%",
158
+ "^",
159
+ // Comparison operators
160
+ "=",
161
+ "<>",
162
+ "<",
163
+ ">",
164
+ "<=",
165
+ ">=",
166
+ // Pattern operators
167
+ "->",
168
+ "<-",
169
+ "-->",
170
+ "<--"
171
+ ],
172
+ escapes: /\\(?:[tbnrf\\"'`]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
173
+ digits: /\d+/,
174
+ octaldigits: /[0-7]+/,
175
+ hexdigits: /[0-9a-fA-F]+/,
176
+ tokenizer: {
177
+ root: [[/[{}[\]()]/, "@brackets"], { include: "common" }],
178
+ common: [
179
+ { include: "@whitespace" },
180
+ { include: "@numbers" },
181
+ { include: "@strings" },
182
+ // Cypher labels on nodes/relationships, e.g. (n:NodeLabel)-[e:RelationshipLabel]
183
+ [/:[a-zA-Z_][\w]*/, "type.identifier"],
184
+ [
185
+ /[a-zA-Z_][\w]*(?=\()/,
186
+ {
187
+ cases: {
188
+ "@builtinFunctions": "predefined.function"
189
+ }
190
+ }
191
+ ],
192
+ [
193
+ /[a-zA-Z_$][\w$]*/,
194
+ {
195
+ cases: {
196
+ "@keywords": "keyword",
197
+ "@builtinLiterals": "predefined.literal",
198
+ "@default": "identifier"
199
+ }
200
+ }
201
+ ],
202
+ [/`/, "identifier.escape", "@identifierBacktick"],
203
+ // delimiter and operator after number because of `.\d` floats and `:` in labels
204
+ [/[;,.:|]/, "delimiter"],
205
+ [
206
+ /[<>=%+\-*/^]+/,
207
+ {
208
+ cases: {
209
+ "@operators": "delimiter",
210
+ "@default": ""
211
+ }
212
+ }
213
+ ]
214
+ ],
215
+ numbers: [
216
+ [/-?(@digits)[eE](-?(@digits))?/, "number.float"],
217
+ [/-?(@digits)?\.(@digits)([eE]-?(@digits))?/, "number.float"],
218
+ [/-?0x(@hexdigits)/, "number.hex"],
219
+ [/-?0(@octaldigits)/, "number.octal"],
220
+ [/-?(@digits)/, "number"]
221
+ ],
222
+ strings: [
223
+ [/"([^"\\]|\\.)*$/, "string.invalid"],
224
+ // non-teminated string
225
+ [/'([^'\\]|\\.)*$/, "string.invalid"],
226
+ // non-teminated string
227
+ [/"/, "string", "@stringDouble"],
228
+ [/'/, "string", "@stringSingle"]
229
+ ],
230
+ whitespace: [
231
+ [/[ \t\r\n]+/, "white"],
232
+ [/\/\*/, "comment", "@comment"],
233
+ [/\/\/.*$/, "comment"]
234
+ ],
235
+ comment: [
236
+ [/\/\/.*/, "comment"],
237
+ [/[^/*]+/, "comment"],
238
+ [/\*\//, "comment", "@pop"],
239
+ [/[/*]/, "comment"]
240
+ ],
241
+ stringDouble: [
242
+ [/[^\\"]+/, "string"],
243
+ [/@escapes/, "string"],
244
+ [/\\./, "string.invalid"],
245
+ [/"/, "string", "@pop"]
246
+ ],
247
+ stringSingle: [
248
+ [/[^\\']+/, "string"],
249
+ [/@escapes/, "string"],
250
+ [/\\./, "string.invalid"],
251
+ [/'/, "string", "@pop"]
252
+ ],
253
+ identifierBacktick: [
254
+ [/[^\\`]+/, "identifier.escape"],
255
+ [/@escapes/, "identifier.escape"],
256
+ [/\\./, "identifier.escape.invalid"],
257
+ [/`/, "identifier.escape", "@pop"]
258
+ ]
259
+ }
260
+ };
261
+
262
+ export { conf, language };
@@ -0,0 +1,9 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ registerLanguage({
4
+ id: "dart",
5
+ extensions: [".dart"],
6
+ aliases: ["Dart", "dart"],
7
+ mimetypes: ["text/x-dart-source", "text/x-dart"],
8
+ loader: () => import('./dart.js')
9
+ });
package/dart/dart.js ADDED
@@ -0,0 +1,280 @@
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: "'", notIn: ["string", "comment"] },
16
+ { open: '"', close: '"', notIn: ["string"] },
17
+ { open: "`", close: "`", notIn: ["string", "comment"] },
18
+ { open: "/**", close: " */", notIn: ["string"] }
19
+ ],
20
+ surroundingPairs: [
21
+ { open: "{", close: "}" },
22
+ { open: "[", close: "]" },
23
+ { open: "(", close: ")" },
24
+ { open: "<", close: ">" },
25
+ { open: "'", close: "'" },
26
+ { open: "(", close: ")" },
27
+ { open: '"', close: '"' },
28
+ { open: "`", close: "`" }
29
+ ],
30
+ folding: {
31
+ markers: {
32
+ start: /^\s*\s*#?region\b/,
33
+ end: /^\s*\s*#?endregion\b/
34
+ }
35
+ }
36
+ };
37
+ const language = {
38
+ defaultToken: "invalid",
39
+ tokenPostfix: ".dart",
40
+ keywords: [
41
+ "abstract",
42
+ "dynamic",
43
+ "implements",
44
+ "show",
45
+ "as",
46
+ "else",
47
+ "import",
48
+ "static",
49
+ "assert",
50
+ "enum",
51
+ "in",
52
+ "super",
53
+ "async",
54
+ "export",
55
+ "interface",
56
+ "switch",
57
+ "await",
58
+ "extends",
59
+ "is",
60
+ "sync",
61
+ "break",
62
+ "external",
63
+ "library",
64
+ "this",
65
+ "case",
66
+ "factory",
67
+ "mixin",
68
+ "throw",
69
+ "catch",
70
+ "false",
71
+ "new",
72
+ "true",
73
+ "class",
74
+ "final",
75
+ "null",
76
+ "try",
77
+ "const",
78
+ "finally",
79
+ "on",
80
+ "typedef",
81
+ "continue",
82
+ "for",
83
+ "operator",
84
+ "var",
85
+ "covariant",
86
+ "Function",
87
+ "part",
88
+ "void",
89
+ "default",
90
+ "get",
91
+ "rethrow",
92
+ "while",
93
+ "deferred",
94
+ "hide",
95
+ "return",
96
+ "with",
97
+ "do",
98
+ "if",
99
+ "set",
100
+ "yield"
101
+ ],
102
+ typeKeywords: ["int", "double", "String", "bool"],
103
+ operators: [
104
+ "+",
105
+ "-",
106
+ "*",
107
+ "/",
108
+ "~/",
109
+ "%",
110
+ "++",
111
+ "--",
112
+ "==",
113
+ "!=",
114
+ ">",
115
+ "<",
116
+ ">=",
117
+ "<=",
118
+ "=",
119
+ "-=",
120
+ "/=",
121
+ "%=",
122
+ ">>=",
123
+ "^=",
124
+ "+=",
125
+ "*=",
126
+ "~/=",
127
+ "<<=",
128
+ "&=",
129
+ "!=",
130
+ "||",
131
+ "&&",
132
+ "&",
133
+ "|",
134
+ "^",
135
+ "~",
136
+ "<<",
137
+ ">>",
138
+ "!",
139
+ ">>>",
140
+ "??",
141
+ "?",
142
+ ":",
143
+ "|="
144
+ ],
145
+ // we include these common regular expressions
146
+ symbols: /[=><!~?:&|+\-*\/\^%]+/,
147
+ escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
148
+ digits: /\d+(_+\d+)*/,
149
+ octaldigits: /[0-7]+(_+[0-7]+)*/,
150
+ binarydigits: /[0-1]+(_+[0-1]+)*/,
151
+ hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
152
+ regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
153
+ regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,
154
+ // The main tokenizer for our languages
155
+ tokenizer: {
156
+ root: [[/[{}]/, "delimiter.bracket"], { include: "common" }],
157
+ common: [
158
+ // identifiers and keywords
159
+ [
160
+ /[a-z_$][\w$]*/,
161
+ {
162
+ cases: {
163
+ "@typeKeywords": "type.identifier",
164
+ "@keywords": "keyword",
165
+ "@default": "identifier"
166
+ }
167
+ }
168
+ ],
169
+ [/[A-Z_$][\w\$]*/, "type.identifier"],
170
+ // show class names
171
+ // [/[A-Z][\w\$]*/, 'identifier'],
172
+ // whitespace
173
+ { include: "@whitespace" },
174
+ // regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
175
+ [
176
+ /\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,
177
+ { token: "regexp", bracket: "@open", next: "@regexp" }
178
+ ],
179
+ // @ annotations.
180
+ [/@[a-zA-Z]+/, "annotation"],
181
+ // variable
182
+ // delimiters and operators
183
+ [/[()\[\]]/, "@brackets"],
184
+ [/[<>](?!@symbols)/, "@brackets"],
185
+ [/!(?=([^=]|$))/, "delimiter"],
186
+ [
187
+ /@symbols/,
188
+ {
189
+ cases: {
190
+ "@operators": "delimiter",
191
+ "@default": ""
192
+ }
193
+ }
194
+ ],
195
+ // numbers
196
+ [/(@digits)[eE]([\-+]?(@digits))?/, "number.float"],
197
+ [/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, "number.float"],
198
+ [/0[xX](@hexdigits)n?/, "number.hex"],
199
+ [/0[oO]?(@octaldigits)n?/, "number.octal"],
200
+ [/0[bB](@binarydigits)n?/, "number.binary"],
201
+ [/(@digits)n?/, "number"],
202
+ // delimiter: after number because of .\d floats
203
+ [/[;,.]/, "delimiter"],
204
+ // strings
205
+ [/"([^"\\]|\\.)*$/, "string.invalid"],
206
+ // non-teminated string
207
+ [/'([^'\\]|\\.)*$/, "string.invalid"],
208
+ // non-teminated string
209
+ [/"/, "string", "@string_double"],
210
+ [/'/, "string", "@string_single"]
211
+ // [/[a-zA-Z]+/, "variable"]
212
+ ],
213
+ whitespace: [
214
+ [/[ \t\r\n]+/, ""],
215
+ [/\/\*\*(?!\/)/, "comment.doc", "@jsdoc"],
216
+ [/\/\*/, "comment", "@comment"],
217
+ [/\/\/\/.*$/, "comment.doc"],
218
+ [/\/\/.*$/, "comment"]
219
+ ],
220
+ comment: [
221
+ [/[^\/*]+/, "comment"],
222
+ [/\*\//, "comment", "@pop"],
223
+ [/[\/*]/, "comment"]
224
+ ],
225
+ jsdoc: [
226
+ [/[^\/*]+/, "comment.doc"],
227
+ [/\*\//, "comment.doc", "@pop"],
228
+ [/[\/*]/, "comment.doc"]
229
+ ],
230
+ // We match regular expression quite precisely
231
+ regexp: [
232
+ [
233
+ /(\{)(\d+(?:,\d*)?)(\})/,
234
+ ["regexp.escape.control", "regexp.escape.control", "regexp.escape.control"]
235
+ ],
236
+ [
237
+ /(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,
238
+ ["regexp.escape.control", { token: "regexp.escape.control", next: "@regexrange" }]
239
+ ],
240
+ [/(\()(\?:|\?=|\?!)/, ["regexp.escape.control", "regexp.escape.control"]],
241
+ [/[()]/, "regexp.escape.control"],
242
+ [/@regexpctl/, "regexp.escape.control"],
243
+ [/[^\\\/]/, "regexp"],
244
+ [/@regexpesc/, "regexp.escape"],
245
+ [/\\\./, "regexp.invalid"],
246
+ [/(\/)([gimsuy]*)/, [{ token: "regexp", bracket: "@close", next: "@pop" }, "keyword.other"]]
247
+ ],
248
+ regexrange: [
249
+ [/-/, "regexp.escape.control"],
250
+ [/\^/, "regexp.invalid"],
251
+ [/@regexpesc/, "regexp.escape"],
252
+ [/[^\]]/, "regexp"],
253
+ [
254
+ /\]/,
255
+ {
256
+ token: "regexp.escape.control",
257
+ next: "@pop",
258
+ bracket: "@close"
259
+ }
260
+ ]
261
+ ],
262
+ string_double: [
263
+ [/[^\\"\$]+/, "string"],
264
+ [/[^\\"]+/, "string"],
265
+ [/@escapes/, "string.escape"],
266
+ [/\\./, "string.escape.invalid"],
267
+ [/"/, "string", "@pop"],
268
+ [/\$\w+/, "identifier"]
269
+ ],
270
+ string_single: [
271
+ [/[^\\'\$]+/, "string"],
272
+ [/@escapes/, "string.escape"],
273
+ [/\\./, "string.escape.invalid"],
274
+ [/'/, "string", "@pop"],
275
+ [/\$\w+/, "identifier"]
276
+ ]
277
+ }
278
+ };
279
+
280
+ export { conf, language };
@@ -0,0 +1,9 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ registerLanguage({
4
+ id: "dockerfile",
5
+ extensions: [".dockerfile"],
6
+ filenames: ["Dockerfile"],
7
+ aliases: ["Dockerfile"],
8
+ loader: () => import('./dockerfile.js')
9
+ });
@@ -0,0 +1,129 @@
1
+ const conf = {
2
+ brackets: [
3
+ ["{", "}"],
4
+ ["[", "]"],
5
+ ["(", ")"]
6
+ ],
7
+ autoClosingPairs: [
8
+ { open: "{", close: "}" },
9
+ { open: "[", close: "]" },
10
+ { open: "(", close: ")" },
11
+ { open: '"', close: '"' },
12
+ { open: "'", close: "'" }
13
+ ],
14
+ surroundingPairs: [
15
+ { open: "{", close: "}" },
16
+ { open: "[", close: "]" },
17
+ { open: "(", close: ")" },
18
+ { open: '"', close: '"' },
19
+ { open: "'", close: "'" }
20
+ ]
21
+ };
22
+ const language = {
23
+ defaultToken: "",
24
+ tokenPostfix: ".dockerfile",
25
+ variable: /\${?[\w]+}?/,
26
+ tokenizer: {
27
+ root: [
28
+ { include: "@whitespace" },
29
+ { include: "@comment" },
30
+ [/(ONBUILD)(\s+)/, ["keyword", ""]],
31
+ [/(ENV)(\s+)([\w]+)/, ["keyword", "", { token: "variable", next: "@arguments" }]],
32
+ [
33
+ /(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ARG|VOLUME|LABEL|USER|WORKDIR|COPY|CMD|STOPSIGNAL|SHELL|HEALTHCHECK|ENTRYPOINT)/,
34
+ { token: "keyword", next: "@arguments" }
35
+ ]
36
+ ],
37
+ arguments: [
38
+ { include: "@whitespace" },
39
+ { include: "@strings" },
40
+ [
41
+ /(@variable)/,
42
+ {
43
+ cases: {
44
+ "@eos": { token: "variable", next: "@popall" },
45
+ "@default": "variable"
46
+ }
47
+ }
48
+ ],
49
+ [
50
+ /\\/,
51
+ {
52
+ cases: {
53
+ "@eos": "",
54
+ "@default": ""
55
+ }
56
+ }
57
+ ],
58
+ [
59
+ /./,
60
+ {
61
+ cases: {
62
+ "@eos": { token: "", next: "@popall" },
63
+ "@default": ""
64
+ }
65
+ }
66
+ ]
67
+ ],
68
+ // Deal with white space, including comments
69
+ whitespace: [
70
+ [
71
+ /\s+/,
72
+ {
73
+ cases: {
74
+ "@eos": { token: "", next: "@popall" },
75
+ "@default": ""
76
+ }
77
+ }
78
+ ]
79
+ ],
80
+ comment: [[/(^#.*$)/, "comment", "@popall"]],
81
+ // Recognize strings, including those broken across lines with \ (but not without)
82
+ strings: [
83
+ [/\\'$/, "", "@popall"],
84
+ // \' leaves @arguments at eol
85
+ [/\\'/, ""],
86
+ // \' is not a string
87
+ [/'$/, "string", "@popall"],
88
+ [/'/, "string", "@stringBody"],
89
+ [/"$/, "string", "@popall"],
90
+ [/"/, "string", "@dblStringBody"]
91
+ ],
92
+ stringBody: [
93
+ [
94
+ /[^\\\$']/,
95
+ {
96
+ cases: {
97
+ "@eos": { token: "string", next: "@popall" },
98
+ "@default": "string"
99
+ }
100
+ }
101
+ ],
102
+ [/\\./, "string.escape"],
103
+ [/'$/, "string", "@popall"],
104
+ [/'/, "string", "@pop"],
105
+ [/(@variable)/, "variable"],
106
+ [/\\$/, "string"],
107
+ [/$/, "string", "@popall"]
108
+ ],
109
+ dblStringBody: [
110
+ [
111
+ /[^\\\$"]/,
112
+ {
113
+ cases: {
114
+ "@eos": { token: "string", next: "@popall" },
115
+ "@default": "string"
116
+ }
117
+ }
118
+ ],
119
+ [/\\./, "string.escape"],
120
+ [/"$/, "string", "@popall"],
121
+ [/"/, "string", "@pop"],
122
+ [/(@variable)/, "variable"],
123
+ [/\\$/, "string"],
124
+ [/$/, "string", "@popall"]
125
+ ]
126
+ }
127
+ };
128
+
129
+ export { conf, language };
@@ -0,0 +1,8 @@
1
+ import { registerLanguage } from '../_.contribution.js';
2
+
3
+ registerLanguage({
4
+ id: "ecl",
5
+ extensions: [".ecl"],
6
+ aliases: ["ECL", "Ecl", "ecl"],
7
+ loader: () => import('./ecl.js')
8
+ });