@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
@@ -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: "coffeescript",
12
+ extensions: [".coffee"],
13
+ aliases: ["CoffeeScript", "coffeescript", "coffee"],
14
+ mimetypes: ["text/x-coffeescript", "text/coffeescript"],
15
+ loader: () => {
16
+ {
17
+ return import('./coffee.js');
18
+ }
19
+ }
20
+ });
@@ -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/coffee/coffee.ts
10
+ var conf = {
11
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
12
+ comments: {
13
+ blockComment: ["###", "###"],
14
+ lineComment: "#"
15
+ },
16
+ brackets: [
17
+ ["{", "}"],
18
+ ["[", "]"],
19
+ ["(", ")"]
20
+ ],
21
+ autoClosingPairs: [
22
+ { open: "{", close: "}" },
23
+ { open: "[", close: "]" },
24
+ { open: "(", close: ")" },
25
+ { open: '"', close: '"' },
26
+ { open: "'", close: "'" }
27
+ ],
28
+ surroundingPairs: [
29
+ { open: "{", close: "}" },
30
+ { open: "[", close: "]" },
31
+ { open: "(", close: ")" },
32
+ { open: '"', close: '"' },
33
+ { open: "'", close: "'" }
34
+ ],
35
+ folding: {
36
+ markers: {
37
+ start: new RegExp("^\\s*#region\\b"),
38
+ end: new RegExp("^\\s*#endregion\\b")
39
+ }
40
+ }
41
+ };
42
+ var language = {
43
+ defaultToken: "",
44
+ ignoreCase: true,
45
+ tokenPostfix: ".coffee",
46
+ brackets: [
47
+ { open: "{", close: "}", token: "delimiter.curly" },
48
+ { open: "[", close: "]", token: "delimiter.square" },
49
+ { open: "(", close: ")", token: "delimiter.parenthesis" }
50
+ ],
51
+ regEx: /\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,
52
+ keywords: [
53
+ "and",
54
+ "or",
55
+ "is",
56
+ "isnt",
57
+ "not",
58
+ "on",
59
+ "yes",
60
+ "@",
61
+ "no",
62
+ "off",
63
+ "true",
64
+ "false",
65
+ "null",
66
+ "this",
67
+ "new",
68
+ "delete",
69
+ "typeof",
70
+ "in",
71
+ "instanceof",
72
+ "return",
73
+ "throw",
74
+ "break",
75
+ "continue",
76
+ "debugger",
77
+ "if",
78
+ "else",
79
+ "switch",
80
+ "for",
81
+ "while",
82
+ "do",
83
+ "try",
84
+ "catch",
85
+ "finally",
86
+ "class",
87
+ "extends",
88
+ "super",
89
+ "undefined",
90
+ "then",
91
+ "unless",
92
+ "until",
93
+ "loop",
94
+ "of",
95
+ "by",
96
+ "when"
97
+ ],
98
+ // we include these common regular expressions
99
+ symbols: /[=><!~?&%|+\-*\/\^\.,\:]+/,
100
+ escapes: /\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
101
+ // The main tokenizer for our languages
102
+ tokenizer: {
103
+ root: [
104
+ // identifiers and keywords
105
+ [/\@[a-zA-Z_]\w*/, "variable.predefined"],
106
+ [
107
+ /[a-zA-Z_]\w*/,
108
+ {
109
+ cases: {
110
+ this: "variable.predefined",
111
+ "@keywords": { token: "keyword.$0" },
112
+ "@default": ""
113
+ }
114
+ }
115
+ ],
116
+ // whitespace
117
+ [/[ \t\r\n]+/, ""],
118
+ // Comments
119
+ [/###/, "comment", "@comment"],
120
+ [/#.*$/, "comment"],
121
+ // regular expressions
122
+ ["///", { token: "regexp", next: "@hereregexp" }],
123
+ [/^(\s*)(@regEx)/, ["", "regexp"]],
124
+ [/(\()(\s*)(@regEx)/, ["@brackets", "", "regexp"]],
125
+ [/(\,)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
126
+ [/(\=)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
127
+ [/(\:)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
128
+ [/(\[)(\s*)(@regEx)/, ["@brackets", "", "regexp"]],
129
+ [/(\!)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
130
+ [/(\&)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
131
+ [/(\|)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
132
+ [/(\?)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
133
+ [/(\{)(\s*)(@regEx)/, ["@brackets", "", "regexp"]],
134
+ [/(\;)(\s*)(@regEx)/, ["", "", "regexp"]],
135
+ // delimiters
136
+ [
137
+ /}/,
138
+ {
139
+ cases: {
140
+ "$S2==interpolatedstring": {
141
+ token: "string",
142
+ next: "@pop"
143
+ },
144
+ "@default": "@brackets"
145
+ }
146
+ }
147
+ ],
148
+ [/[{}()\[\]]/, "@brackets"],
149
+ [/@symbols/, "delimiter"],
150
+ // numbers
151
+ [/\d+[eE]([\-+]?\d+)?/, "number.float"],
152
+ [/\d+\.\d+([eE][\-+]?\d+)?/, "number.float"],
153
+ [/0[xX][0-9a-fA-F]+/, "number.hex"],
154
+ [/0[0-7]+(?!\d)/, "number.octal"],
155
+ [/\d+/, "number"],
156
+ // delimiter: after number because of .\d floats
157
+ [/[,.]/, "delimiter"],
158
+ // strings:
159
+ [/"""/, "string", '@herestring."""'],
160
+ [/'''/, "string", "@herestring.'''"],
161
+ [
162
+ /"/,
163
+ {
164
+ cases: {
165
+ "@eos": "string",
166
+ "@default": { token: "string", next: '@string."' }
167
+ }
168
+ }
169
+ ],
170
+ [
171
+ /'/,
172
+ {
173
+ cases: {
174
+ "@eos": "string",
175
+ "@default": { token: "string", next: "@string.'" }
176
+ }
177
+ }
178
+ ]
179
+ ],
180
+ string: [
181
+ [/[^"'\#\\]+/, "string"],
182
+ [/@escapes/, "string.escape"],
183
+ [/\./, "string.escape.invalid"],
184
+ [/\./, "string.escape.invalid"],
185
+ [
186
+ /#{/,
187
+ {
188
+ cases: {
189
+ '$S2=="': {
190
+ token: "string",
191
+ next: "root.interpolatedstring"
192
+ },
193
+ "@default": "string"
194
+ }
195
+ }
196
+ ],
197
+ [
198
+ /["']/,
199
+ {
200
+ cases: {
201
+ "$#==$S2": { token: "string", next: "@pop" },
202
+ "@default": "string"
203
+ }
204
+ }
205
+ ],
206
+ [/#/, "string"]
207
+ ],
208
+ herestring: [
209
+ [
210
+ /("""|''')/,
211
+ {
212
+ cases: {
213
+ "$1==$S2": { token: "string", next: "@pop" },
214
+ "@default": "string"
215
+ }
216
+ }
217
+ ],
218
+ [/[^#\\'"]+/, "string"],
219
+ [/['"]+/, "string"],
220
+ [/@escapes/, "string.escape"],
221
+ [/\./, "string.escape.invalid"],
222
+ [/#{/, { token: "string.quote", next: "root.interpolatedstring" }],
223
+ [/#/, "string"]
224
+ ],
225
+ comment: [
226
+ [/[^#]+/, "comment"],
227
+ [/###/, "comment", "@pop"],
228
+ [/#/, "comment"]
229
+ ],
230
+ hereregexp: [
231
+ [/[^\\\/#]+/, "regexp"],
232
+ [/\\./, "regexp"],
233
+ [/#.*$/, "comment"],
234
+ ["///[igm]*", { token: "regexp", next: "@pop" }],
235
+ [/\//, "regexp"]
236
+ ]
237
+ }
238
+ };
239
+
240
+ export { conf, language };
@@ -0,0 +1,29 @@
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: "c",
12
+ extensions: [".c", ".h"],
13
+ aliases: ["C", "c"],
14
+ loader: () => {
15
+ {
16
+ return import('./cpp.js');
17
+ }
18
+ }
19
+ });
20
+ registerLanguage({
21
+ id: "cpp",
22
+ extensions: [".cpp", ".cc", ".cxx", ".hpp", ".hh", ".hxx"],
23
+ aliases: ["C++", "Cpp", "cpp"],
24
+ loader: () => {
25
+ {
26
+ return import('./cpp.js');
27
+ }
28
+ }
29
+ });
package/cpp/cpp.js ADDED
@@ -0,0 +1,409 @@
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/cpp/cpp.ts
10
+ var conf = {
11
+ comments: {
12
+ lineComment: "//",
13
+ blockComment: ["/*", "*/"]
14
+ },
15
+ brackets: [
16
+ ["{", "}"],
17
+ ["[", "]"],
18
+ ["(", ")"]
19
+ ],
20
+ autoClosingPairs: [
21
+ { open: "[", close: "]" },
22
+ { open: "{", close: "}" },
23
+ { open: "(", close: ")" },
24
+ { open: "'", close: "'", notIn: ["string", "comment"] },
25
+ { open: '"', close: '"', notIn: ["string"] }
26
+ ],
27
+ surroundingPairs: [
28
+ { open: "{", close: "}" },
29
+ { open: "[", close: "]" },
30
+ { open: "(", close: ")" },
31
+ { open: '"', close: '"' },
32
+ { open: "'", close: "'" }
33
+ ],
34
+ folding: {
35
+ markers: {
36
+ start: new RegExp("^\\s*#pragma\\s+region\\b"),
37
+ end: new RegExp("^\\s*#pragma\\s+endregion\\b")
38
+ }
39
+ }
40
+ };
41
+ var language = {
42
+ defaultToken: "",
43
+ tokenPostfix: ".cpp",
44
+ brackets: [
45
+ { token: "delimiter.curly", open: "{", close: "}" },
46
+ { token: "delimiter.parenthesis", open: "(", close: ")" },
47
+ { token: "delimiter.square", open: "[", close: "]" },
48
+ { token: "delimiter.angle", open: "<", close: ">" }
49
+ ],
50
+ keywords: [
51
+ "abstract",
52
+ "amp",
53
+ "array",
54
+ "auto",
55
+ "bool",
56
+ "break",
57
+ "case",
58
+ "catch",
59
+ "char",
60
+ "class",
61
+ "const",
62
+ "constexpr",
63
+ "const_cast",
64
+ "continue",
65
+ "cpu",
66
+ "decltype",
67
+ "default",
68
+ "delegate",
69
+ "delete",
70
+ "do",
71
+ "double",
72
+ "dynamic_cast",
73
+ "each",
74
+ "else",
75
+ "enum",
76
+ "event",
77
+ "explicit",
78
+ "export",
79
+ "extern",
80
+ "false",
81
+ "final",
82
+ "finally",
83
+ "float",
84
+ "for",
85
+ "friend",
86
+ "gcnew",
87
+ "generic",
88
+ "goto",
89
+ "if",
90
+ "in",
91
+ "initonly",
92
+ "inline",
93
+ "int",
94
+ "interface",
95
+ "interior_ptr",
96
+ "internal",
97
+ "literal",
98
+ "long",
99
+ "mutable",
100
+ "namespace",
101
+ "new",
102
+ "noexcept",
103
+ "nullptr",
104
+ "__nullptr",
105
+ "operator",
106
+ "override",
107
+ "partial",
108
+ "pascal",
109
+ "pin_ptr",
110
+ "private",
111
+ "property",
112
+ "protected",
113
+ "public",
114
+ "ref",
115
+ "register",
116
+ "reinterpret_cast",
117
+ "restrict",
118
+ "return",
119
+ "safe_cast",
120
+ "sealed",
121
+ "short",
122
+ "signed",
123
+ "sizeof",
124
+ "static",
125
+ "static_assert",
126
+ "static_cast",
127
+ "struct",
128
+ "switch",
129
+ "template",
130
+ "this",
131
+ "thread_local",
132
+ "throw",
133
+ "tile_static",
134
+ "true",
135
+ "try",
136
+ "typedef",
137
+ "typeid",
138
+ "typename",
139
+ "union",
140
+ "unsigned",
141
+ "using",
142
+ "virtual",
143
+ "void",
144
+ "volatile",
145
+ "wchar_t",
146
+ "where",
147
+ "while",
148
+ "_asm",
149
+ // reserved word with one underscores
150
+ "_based",
151
+ "_cdecl",
152
+ "_declspec",
153
+ "_fastcall",
154
+ "_if_exists",
155
+ "_if_not_exists",
156
+ "_inline",
157
+ "_multiple_inheritance",
158
+ "_pascal",
159
+ "_single_inheritance",
160
+ "_stdcall",
161
+ "_virtual_inheritance",
162
+ "_w64",
163
+ "__abstract",
164
+ // reserved word with two underscores
165
+ "__alignof",
166
+ "__asm",
167
+ "__assume",
168
+ "__based",
169
+ "__box",
170
+ "__builtin_alignof",
171
+ "__cdecl",
172
+ "__clrcall",
173
+ "__declspec",
174
+ "__delegate",
175
+ "__event",
176
+ "__except",
177
+ "__fastcall",
178
+ "__finally",
179
+ "__forceinline",
180
+ "__gc",
181
+ "__hook",
182
+ "__identifier",
183
+ "__if_exists",
184
+ "__if_not_exists",
185
+ "__inline",
186
+ "__int128",
187
+ "__int16",
188
+ "__int32",
189
+ "__int64",
190
+ "__int8",
191
+ "__interface",
192
+ "__leave",
193
+ "__m128",
194
+ "__m128d",
195
+ "__m128i",
196
+ "__m256",
197
+ "__m256d",
198
+ "__m256i",
199
+ "__m512",
200
+ "__m512d",
201
+ "__m512i",
202
+ "__m64",
203
+ "__multiple_inheritance",
204
+ "__newslot",
205
+ "__nogc",
206
+ "__noop",
207
+ "__nounwind",
208
+ "__novtordisp",
209
+ "__pascal",
210
+ "__pin",
211
+ "__pragma",
212
+ "__property",
213
+ "__ptr32",
214
+ "__ptr64",
215
+ "__raise",
216
+ "__restrict",
217
+ "__resume",
218
+ "__sealed",
219
+ "__single_inheritance",
220
+ "__stdcall",
221
+ "__super",
222
+ "__thiscall",
223
+ "__try",
224
+ "__try_cast",
225
+ "__typeof",
226
+ "__unaligned",
227
+ "__unhook",
228
+ "__uuidof",
229
+ "__value",
230
+ "__virtual_inheritance",
231
+ "__w64",
232
+ "__wchar_t"
233
+ ],
234
+ operators: [
235
+ "=",
236
+ ">",
237
+ "<",
238
+ "!",
239
+ "~",
240
+ "?",
241
+ ":",
242
+ "==",
243
+ "<=",
244
+ ">=",
245
+ "!=",
246
+ "&&",
247
+ "||",
248
+ "++",
249
+ "--",
250
+ "+",
251
+ "-",
252
+ "*",
253
+ "/",
254
+ "&",
255
+ "|",
256
+ "^",
257
+ "%",
258
+ "<<",
259
+ ">>",
260
+ "+=",
261
+ "-=",
262
+ "*=",
263
+ "/=",
264
+ "&=",
265
+ "|=",
266
+ "^=",
267
+ "%=",
268
+ "<<=",
269
+ ">>="
270
+ ],
271
+ // we include these common regular expressions
272
+ symbols: /[=><!~?:&|+\-*\/\^%]+/,
273
+ escapes: /\\(?:[0abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
274
+ integersuffix: /([uU](ll|LL|l|L)|(ll|LL|l|L)?[uU]?)/,
275
+ floatsuffix: /[fFlL]?/,
276
+ encoding: /u|u8|U|L/,
277
+ // The main tokenizer for our languages
278
+ tokenizer: {
279
+ root: [
280
+ // C++ 11 Raw String
281
+ [/@encoding?R\"(?:([^ ()\\\t]*))\(/, { token: "string.raw.begin", next: "@raw.$1" }],
282
+ // identifiers and keywords
283
+ [
284
+ /[a-zA-Z_]\w*/,
285
+ {
286
+ cases: {
287
+ "@keywords": { token: "keyword.$0" },
288
+ "@default": "identifier"
289
+ }
290
+ }
291
+ ],
292
+ // The preprocessor checks must be before whitespace as they check /^\s*#/ which
293
+ // otherwise fails to match later after other whitespace has been removed.
294
+ // Inclusion
295
+ [/^\s*#\s*include/, { token: "keyword.directive.include", next: "@include" }],
296
+ // Preprocessor directive
297
+ [/^\s*#\s*\w+/, "keyword.directive"],
298
+ // whitespace
299
+ { include: "@whitespace" },
300
+ // [[ attributes ]].
301
+ [/\[\s*\[/, { token: "annotation", next: "@annotation" }],
302
+ // delimiters and operators
303
+ [/[{}()<>\[\]]/, "@brackets"],
304
+ [
305
+ /@symbols/,
306
+ {
307
+ cases: {
308
+ "@operators": "delimiter",
309
+ "@default": ""
310
+ }
311
+ }
312
+ ],
313
+ // numbers
314
+ [/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/, "number.float"],
315
+ [/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/, "number.float"],
316
+ [/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/, "number.hex"],
317
+ [/0[0-7']*[0-7](@integersuffix)/, "number.octal"],
318
+ [/0[bB][0-1']*[0-1](@integersuffix)/, "number.binary"],
319
+ [/\d[\d']*\d(@integersuffix)/, "number"],
320
+ [/\d(@integersuffix)/, "number"],
321
+ // delimiter: after number because of .\d floats
322
+ [/[;,.]/, "delimiter"],
323
+ // strings
324
+ [/"([^"\\]|\\.)*$/, "string.invalid"],
325
+ // non-teminated string
326
+ [/"/, "string", "@string"],
327
+ // characters
328
+ [/'[^\\']'/, "string"],
329
+ [/(')(@escapes)(')/, ["string", "string.escape", "string"]],
330
+ [/'/, "string.invalid"]
331
+ ],
332
+ whitespace: [
333
+ [/[ \t\r\n]+/, ""],
334
+ [/\/\*\*(?!\/)/, "comment.doc", "@doccomment"],
335
+ [/\/\*/, "comment", "@comment"],
336
+ [/\/\/.*\\$/, "comment", "@linecomment"],
337
+ [/\/\/.*$/, "comment"]
338
+ ],
339
+ comment: [
340
+ [/[^\/*]+/, "comment"],
341
+ [/\*\//, "comment", "@pop"],
342
+ [/[\/*]/, "comment"]
343
+ ],
344
+ //For use with continuous line comments
345
+ linecomment: [
346
+ [/.*[^\\]$/, "comment", "@pop"],
347
+ [/[^]+/, "comment"]
348
+ ],
349
+ //Identical copy of comment above, except for the addition of .doc
350
+ doccomment: [
351
+ [/[^\/*]+/, "comment.doc"],
352
+ [/\*\//, "comment.doc", "@pop"],
353
+ [/[\/*]/, "comment.doc"]
354
+ ],
355
+ string: [
356
+ [/[^\\"]+/, "string"],
357
+ [/@escapes/, "string.escape"],
358
+ [/\\./, "string.escape.invalid"],
359
+ [/"/, "string", "@pop"]
360
+ ],
361
+ raw: [
362
+ [
363
+ /(.*)(\))(?:([^ ()\\\t"]*))(\")/,
364
+ {
365
+ cases: {
366
+ "$3==$S2": [
367
+ "string.raw",
368
+ "string.raw.end",
369
+ "string.raw.end",
370
+ { token: "string.raw.end", next: "@pop" }
371
+ ],
372
+ "@default": ["string.raw", "string.raw", "string.raw", "string.raw"]
373
+ }
374
+ }
375
+ ],
376
+ [/.*/, "string.raw"]
377
+ ],
378
+ annotation: [
379
+ { include: "@whitespace" },
380
+ [/using|alignas/, "keyword"],
381
+ [/[a-zA-Z0-9_]+/, "annotation"],
382
+ [/[,:]/, "delimiter"],
383
+ [/[()]/, "@brackets"],
384
+ [/\]\s*\]/, { token: "annotation", next: "@pop" }]
385
+ ],
386
+ include: [
387
+ [
388
+ /(\s*)(<)([^<>]*)(>)/,
389
+ [
390
+ "",
391
+ "keyword.directive.include.begin",
392
+ "string.include.identifier",
393
+ { token: "keyword.directive.include.end", next: "@pop" }
394
+ ]
395
+ ],
396
+ [
397
+ /(\s*)(")([^"]*)(")/,
398
+ [
399
+ "",
400
+ "keyword.directive.include.begin",
401
+ "string.include.identifier",
402
+ { token: "keyword.directive.include.end", next: "@pop" }
403
+ ]
404
+ ]
405
+ ]
406
+ }
407
+ };
408
+
409
+ export { conf, language };