online-compiler-widget 0.0.4 → 1.0.3

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 (161) hide show
  1. package/dist/abap-CrvW7_qN.js +1398 -0
  2. package/dist/apex-BAOI8p1v.js +327 -0
  3. package/dist/assets/css.worker-Cb0JI69t.js +93 -0
  4. package/dist/assets/html.worker-BNFZMwEc.js +470 -0
  5. package/dist/assets/json.worker-BCybXpia.js +58 -0
  6. package/dist/assets/ts.worker-DAVh1bw1.js +67731 -0
  7. package/dist/azcli-BlCk_UqW.js +68 -0
  8. package/dist/bat-DPoEelVx.js +100 -0
  9. package/dist/bicep-Cp1F394l.js +102 -0
  10. package/dist/cameligo-CWqtSlQs.js +174 -0
  11. package/dist/clojure-CKBp32Gf.js +761 -0
  12. package/dist/coffee-CDo6vc-J.js +232 -0
  13. package/dist/cpp-DokufPgf.js +389 -0
  14. package/dist/csharp-BQi3szM0.js +326 -0
  15. package/dist/csp-BSGtCCZ-.js +53 -0
  16. package/dist/css-DEPFDJfb.js +187 -0
  17. package/dist/cssMode-nHrB9Mnr.js +141 -0
  18. package/dist/cypher-DAb1vOxS.js +263 -0
  19. package/dist/dart-C8p4jewR.js +281 -0
  20. package/dist/dockerfile-DP0iLFPN.js +130 -0
  21. package/dist/ecl-BDQHA6fi.js +456 -0
  22. package/dist/elixir-D4II6kDM.js +569 -0
  23. package/dist/flow9-StcnL-VB.js +142 -0
  24. package/dist/freemarker2-BoiXdkJM.js +982 -0
  25. package/dist/fsharp-DdUVp3EN.js +217 -0
  26. package/dist/go-D1-I258M.js +218 -0
  27. package/dist/graphql-DWkL3f8U.js +151 -0
  28. package/dist/handlebars-C7PJzkmo.js +412 -0
  29. package/dist/hcl-D_0MNifv.js +183 -0
  30. package/dist/html-D_xe_tUa.js +301 -0
  31. package/dist/htmlMode-Dk_luXu_.js +152 -0
  32. package/dist/index-Ds0EJmOd.js +129200 -0
  33. package/dist/index.js +14 -0
  34. package/dist/ini-C4I2-MT7.js +71 -0
  35. package/dist/java-OBvaP_SS.js +232 -0
  36. package/dist/javascript-CUK67ITD.js +70 -0
  37. package/dist/jsonMode-BIAYTpVF.js +569 -0
  38. package/dist/julia-BmDH8Kkf.js +511 -0
  39. package/dist/kotlin-Dhu5AGOD.js +252 -0
  40. package/dist/less-CzmjXREq.js +162 -0
  41. package/dist/lexon-CV2c4pN9.js +157 -0
  42. package/dist/liquid-Cgsk8EmK.js +233 -0
  43. package/dist/lspLanguageFeatures-HqO1l9Me.js +1458 -0
  44. package/dist/lua-CFY5U8qF.js +162 -0
  45. package/dist/m3-BL_AnZVh.js +210 -0
  46. package/dist/markdown-CWKQPXCv.js +229 -0
  47. package/dist/mdx-QboWmT4M.js +158 -0
  48. package/dist/mips-ButYmJ5E.js +198 -0
  49. package/dist/msdax-C3cnXqDh.js +375 -0
  50. package/dist/mysql-YlSHaf6G.js +878 -0
  51. package/dist/objective-c-Dwnlproe.js +183 -0
  52. package/dist/pascal-UzGbSWEN.js +251 -0
  53. package/dist/pascaligo-CslTgu68.js +164 -0
  54. package/dist/perl-oj6r_mgw.js +626 -0
  55. package/dist/pgsql-DSBO0Mev.js +851 -0
  56. package/dist/php-YzCD--7j.js +500 -0
  57. package/dist/pla-CmylB8vQ.js +137 -0
  58. package/dist/postiats-CLFW5gNY.js +907 -0
  59. package/dist/powerquery-CmOWUvlh.js +890 -0
  60. package/dist/powershell-fHQcmBLK.js +239 -0
  61. package/dist/protobuf-p5BArb-9.js +420 -0
  62. package/dist/pug-gVdUDvqf.js +402 -0
  63. package/dist/python-kIZaMFF7.js +294 -0
  64. package/dist/qsharp-DnrWSUlt.js +301 -0
  65. package/dist/r-Cv309K2z.js +243 -0
  66. package/dist/razor-ms2cCMGp.js +543 -0
  67. package/dist/redis-DTcS4wMj.js +302 -0
  68. package/dist/redshift-hLxZVESM.js +809 -0
  69. package/dist/restructuredtext-C898lK4f.js +174 -0
  70. package/dist/ruby-CgKtnJIQ.js +511 -0
  71. package/dist/rust-bj8oxVnh.js +343 -0
  72. package/dist/sb-DWynz26l.js +115 -0
  73. package/dist/scala-BL5z1UEd.js +370 -0
  74. package/dist/scheme-DUJsH6VU.js +108 -0
  75. package/dist/scss-CxjmhvaL.js +262 -0
  76. package/dist/shell-D14Zs1dF.js +221 -0
  77. package/dist/solidity-WyRm-BGK.js +1367 -0
  78. package/dist/sophia-CKk-_Oa5.js +199 -0
  79. package/dist/sparql-DHtmINMZ.js +201 -0
  80. package/dist/sql-Dqaj5JHC.js +853 -0
  81. package/dist/st-Bj2IIaop.js +416 -0
  82. package/dist/style.css +1 -0
  83. package/dist/swift-DwxP72iM.js +312 -0
  84. package/dist/systemverilog-D7wJfuql.js +576 -0
  85. package/dist/tcl-0ApMt-eC.js +232 -0
  86. package/dist/tsMode-BiXWAJYS.js +946 -0
  87. package/dist/twig-DxwbdmvQ.js +392 -0
  88. package/dist/typescript-ByMmjZ38.js +336 -0
  89. package/dist/typespec-Fd-JwSuS.js +117 -0
  90. package/dist/vb-CxuyYE1I.js +372 -0
  91. package/dist/wgsl-DoEGc31J.js +439 -0
  92. package/dist/xml-iOXTZgNN.js +88 -0
  93. package/dist/yaml-RRlyy-QW.js +199 -0
  94. package/package.json +41 -36
  95. package/FileStorage/obj/FileStorage.csproj.EntityFrameworkCore.targets +0 -28
  96. package/README.md +0 -1
  97. package/eslint.config.js +0 -26
  98. package/index.html +0 -13
  99. package/index.tsx +0 -3
  100. package/openapitools.json +0 -7
  101. package/pnpm-workspace.yaml +0 -2
  102. package/public/vite.svg +0 -1
  103. package/src/App.css +0 -49
  104. package/src/App.tsx +0 -84
  105. package/src/api/.openapi-generator/FILES +0 -25
  106. package/src/api/.openapi-generator/VERSION +0 -1
  107. package/src/api/.openapi-generator-ignore +0 -23
  108. package/src/api/api.ts +0 -1312
  109. package/src/api/base.ts +0 -62
  110. package/src/api/common.ts +0 -113
  111. package/src/api/configuration.ts +0 -121
  112. package/src/api/docs/CompilationError.md +0 -26
  113. package/src/api/docs/CompileRequest.md +0 -22
  114. package/src/api/docs/CompileResult.md +0 -28
  115. package/src/api/docs/CompilerApi.md +0 -263
  116. package/src/api/docs/CreateFileDto.md +0 -22
  117. package/src/api/docs/CreateProjectRequest.md +0 -20
  118. package/src/api/docs/FileApi.md +0 -274
  119. package/src/api/docs/ProcessStatus.md +0 -28
  120. package/src/api/docs/ProjectApi.md +0 -362
  121. package/src/api/docs/ProjectInfo.md +0 -24
  122. package/src/api/docs/ProjectStats.md +0 -28
  123. package/src/api/docs/RenameFileDto.md +0 -20
  124. package/src/api/docs/RenameProjectRequest.md +0 -20
  125. package/src/api/docs/RunRequest.md +0 -24
  126. package/src/api/docs/RunResult.md +0 -30
  127. package/src/api/docs/RunningProjectInfo.md +0 -26
  128. package/src/api/docs/UpdateFileDto.md +0 -20
  129. package/src/api/git_push.sh +0 -57
  130. package/src/api/index.ts +0 -18
  131. package/src/assets/Badge.svg +0 -17
  132. package/src/assets/closeIcon.svg +0 -20
  133. package/src/assets/documentIcon.svg +0 -11
  134. package/src/assets/history.svg +0 -11
  135. package/src/assets/output.svg +0 -12
  136. package/src/assets/plus.svg +0 -20
  137. package/src/assets/react.svg +0 -1
  138. package/src/assets/save-icon.svg +0 -11
  139. package/src/assets/shield.svg +0 -10
  140. package/src/assets/start.svg +0 -11
  141. package/src/assets/stop.svg +0 -11
  142. package/src/components/CompilerWidget.module.scss +0 -169
  143. package/src/components/CompilerWidget.tsx +0 -331
  144. package/src/components/FileExplorer.module.scss +0 -372
  145. package/src/components/FileExplorer.tsx +0 -285
  146. package/src/components/MonacoEditorWrapper.module.scss +0 -29
  147. package/src/components/MonacoEditorWrapper.tsx +0 -74
  148. package/src/components/OutputPanel.module.scss +0 -123
  149. package/src/components/OutputPanel.tsx +0 -53
  150. package/src/components/RunContainer.module.scss +0 -150
  151. package/src/components/RunContainer.tsx +0 -34
  152. package/src/hooks/useCompiler.ts +0 -228
  153. package/src/hooks/useInitialNodes.ts +0 -0
  154. package/src/index.css +0 -78
  155. package/src/main.tsx +0 -8
  156. package/src/types/EditorDocument.ts +0 -8
  157. package/swagger.json +0 -1020
  158. package/tsconfig.app.json +0 -29
  159. package/tsconfig.json +0 -7
  160. package/tsconfig.node.json +0 -26
  161. package/vite.config.ts +0 -8
@@ -0,0 +1,232 @@
1
+ const e = {
2
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
3
+ comments: {
4
+ blockComment: ["###", "###"],
5
+ lineComment: "#"
6
+ },
7
+ brackets: [
8
+ ["{", "}"],
9
+ ["[", "]"],
10
+ ["(", ")"]
11
+ ],
12
+ autoClosingPairs: [
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
+ ],
26
+ folding: {
27
+ markers: {
28
+ start: new RegExp("^\\s*#region\\b"),
29
+ end: new RegExp("^\\s*#endregion\\b")
30
+ }
31
+ }
32
+ }, t = {
33
+ defaultToken: "",
34
+ ignoreCase: !0,
35
+ tokenPostfix: ".coffee",
36
+ brackets: [
37
+ { open: "{", close: "}", token: "delimiter.curly" },
38
+ { open: "[", close: "]", token: "delimiter.square" },
39
+ { open: "(", close: ")", token: "delimiter.parenthesis" }
40
+ ],
41
+ regEx: /\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,
42
+ keywords: [
43
+ "and",
44
+ "or",
45
+ "is",
46
+ "isnt",
47
+ "not",
48
+ "on",
49
+ "yes",
50
+ "@",
51
+ "no",
52
+ "off",
53
+ "true",
54
+ "false",
55
+ "null",
56
+ "this",
57
+ "new",
58
+ "delete",
59
+ "typeof",
60
+ "in",
61
+ "instanceof",
62
+ "return",
63
+ "throw",
64
+ "break",
65
+ "continue",
66
+ "debugger",
67
+ "if",
68
+ "else",
69
+ "switch",
70
+ "for",
71
+ "while",
72
+ "do",
73
+ "try",
74
+ "catch",
75
+ "finally",
76
+ "class",
77
+ "extends",
78
+ "super",
79
+ "undefined",
80
+ "then",
81
+ "unless",
82
+ "until",
83
+ "loop",
84
+ "of",
85
+ "by",
86
+ "when"
87
+ ],
88
+ // we include these common regular expressions
89
+ symbols: /[=><!~?&%|+\-*\/\^\.,\:]+/,
90
+ escapes: /\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
91
+ // The main tokenizer for our languages
92
+ tokenizer: {
93
+ root: [
94
+ // identifiers and keywords
95
+ [/\@[a-zA-Z_]\w*/, "variable.predefined"],
96
+ [
97
+ /[a-zA-Z_]\w*/,
98
+ {
99
+ cases: {
100
+ this: "variable.predefined",
101
+ "@keywords": { token: "keyword.$0" },
102
+ "@default": ""
103
+ }
104
+ }
105
+ ],
106
+ // whitespace
107
+ [/[ \t\r\n]+/, ""],
108
+ // Comments
109
+ [/###/, "comment", "@comment"],
110
+ [/#.*$/, "comment"],
111
+ // regular expressions
112
+ ["///", { token: "regexp", next: "@hereregexp" }],
113
+ [/^(\s*)(@regEx)/, ["", "regexp"]],
114
+ [/(\()(\s*)(@regEx)/, ["@brackets", "", "regexp"]],
115
+ [/(\,)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
116
+ [/(\=)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
117
+ [/(\:)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
118
+ [/(\[)(\s*)(@regEx)/, ["@brackets", "", "regexp"]],
119
+ [/(\!)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
120
+ [/(\&)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
121
+ [/(\|)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
122
+ [/(\?)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
123
+ [/(\{)(\s*)(@regEx)/, ["@brackets", "", "regexp"]],
124
+ [/(\;)(\s*)(@regEx)/, ["", "", "regexp"]],
125
+ // delimiters
126
+ [
127
+ /}/,
128
+ {
129
+ cases: {
130
+ "$S2==interpolatedstring": {
131
+ token: "string",
132
+ next: "@pop"
133
+ },
134
+ "@default": "@brackets"
135
+ }
136
+ }
137
+ ],
138
+ [/[{}()\[\]]/, "@brackets"],
139
+ [/@symbols/, "delimiter"],
140
+ // numbers
141
+ [/\d+[eE]([\-+]?\d+)?/, "number.float"],
142
+ [/\d+\.\d+([eE][\-+]?\d+)?/, "number.float"],
143
+ [/0[xX][0-9a-fA-F]+/, "number.hex"],
144
+ [/0[0-7]+(?!\d)/, "number.octal"],
145
+ [/\d+/, "number"],
146
+ // delimiter: after number because of .\d floats
147
+ [/[,.]/, "delimiter"],
148
+ // strings:
149
+ [/"""/, "string", '@herestring."""'],
150
+ [/'''/, "string", "@herestring.'''"],
151
+ [
152
+ /"/,
153
+ {
154
+ cases: {
155
+ "@eos": "string",
156
+ "@default": { token: "string", next: '@string."' }
157
+ }
158
+ }
159
+ ],
160
+ [
161
+ /'/,
162
+ {
163
+ cases: {
164
+ "@eos": "string",
165
+ "@default": { token: "string", next: "@string.'" }
166
+ }
167
+ }
168
+ ]
169
+ ],
170
+ string: [
171
+ [/[^"'\#\\]+/, "string"],
172
+ [/@escapes/, "string.escape"],
173
+ [/\./, "string.escape.invalid"],
174
+ [/\./, "string.escape.invalid"],
175
+ [
176
+ /#{/,
177
+ {
178
+ cases: {
179
+ '$S2=="': {
180
+ token: "string",
181
+ next: "root.interpolatedstring"
182
+ },
183
+ "@default": "string"
184
+ }
185
+ }
186
+ ],
187
+ [
188
+ /["']/,
189
+ {
190
+ cases: {
191
+ "$#==$S2": { token: "string", next: "@pop" },
192
+ "@default": "string"
193
+ }
194
+ }
195
+ ],
196
+ [/#/, "string"]
197
+ ],
198
+ herestring: [
199
+ [
200
+ /("""|''')/,
201
+ {
202
+ cases: {
203
+ "$1==$S2": { token: "string", next: "@pop" },
204
+ "@default": "string"
205
+ }
206
+ }
207
+ ],
208
+ [/[^#\\'"]+/, "string"],
209
+ [/['"]+/, "string"],
210
+ [/@escapes/, "string.escape"],
211
+ [/\./, "string.escape.invalid"],
212
+ [/#{/, { token: "string.quote", next: "root.interpolatedstring" }],
213
+ [/#/, "string"]
214
+ ],
215
+ comment: [
216
+ [/[^#]+/, "comment"],
217
+ [/###/, "comment", "@pop"],
218
+ [/#/, "comment"]
219
+ ],
220
+ hereregexp: [
221
+ [/[^\\\/#]+/, "regexp"],
222
+ [/\\./, "regexp"],
223
+ [/#.*$/, "comment"],
224
+ ["///[igm]*", { token: "regexp", next: "@pop" }],
225
+ [/\//, "regexp"]
226
+ ]
227
+ }
228
+ };
229
+ export {
230
+ e as conf,
231
+ t as language
232
+ };
@@ -0,0 +1,389 @@
1
+ const e = {
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
+ ],
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*#pragma\\s+region\\b"),
28
+ end: new RegExp("^\\s*#pragma\\s+endregion\\b")
29
+ }
30
+ }
31
+ }, n = {
32
+ defaultToken: "",
33
+ tokenPostfix: ".cpp",
34
+ brackets: [
35
+ { token: "delimiter.curly", open: "{", close: "}" },
36
+ { token: "delimiter.parenthesis", open: "(", close: ")" },
37
+ { token: "delimiter.square", open: "[", close: "]" },
38
+ { token: "delimiter.angle", open: "<", close: ">" }
39
+ ],
40
+ keywords: [
41
+ "abstract",
42
+ "amp",
43
+ "array",
44
+ "auto",
45
+ "bool",
46
+ "break",
47
+ "case",
48
+ "catch",
49
+ "char",
50
+ "class",
51
+ "const",
52
+ "constexpr",
53
+ "const_cast",
54
+ "continue",
55
+ "cpu",
56
+ "decltype",
57
+ "default",
58
+ "delegate",
59
+ "delete",
60
+ "do",
61
+ "double",
62
+ "dynamic_cast",
63
+ "each",
64
+ "else",
65
+ "enum",
66
+ "event",
67
+ "explicit",
68
+ "export",
69
+ "extern",
70
+ "false",
71
+ "final",
72
+ "finally",
73
+ "float",
74
+ "for",
75
+ "friend",
76
+ "gcnew",
77
+ "generic",
78
+ "goto",
79
+ "if",
80
+ "in",
81
+ "initonly",
82
+ "inline",
83
+ "int",
84
+ "interface",
85
+ "interior_ptr",
86
+ "internal",
87
+ "literal",
88
+ "long",
89
+ "mutable",
90
+ "namespace",
91
+ "new",
92
+ "noexcept",
93
+ "nullptr",
94
+ "__nullptr",
95
+ "operator",
96
+ "override",
97
+ "partial",
98
+ "pascal",
99
+ "pin_ptr",
100
+ "private",
101
+ "property",
102
+ "protected",
103
+ "public",
104
+ "ref",
105
+ "register",
106
+ "reinterpret_cast",
107
+ "restrict",
108
+ "return",
109
+ "safe_cast",
110
+ "sealed",
111
+ "short",
112
+ "signed",
113
+ "sizeof",
114
+ "static",
115
+ "static_assert",
116
+ "static_cast",
117
+ "struct",
118
+ "switch",
119
+ "template",
120
+ "this",
121
+ "thread_local",
122
+ "throw",
123
+ "tile_static",
124
+ "true",
125
+ "try",
126
+ "typedef",
127
+ "typeid",
128
+ "typename",
129
+ "union",
130
+ "unsigned",
131
+ "using",
132
+ "virtual",
133
+ "void",
134
+ "volatile",
135
+ "wchar_t",
136
+ "where",
137
+ "while",
138
+ "_asm",
139
+ // reserved word with one underscores
140
+ "_based",
141
+ "_cdecl",
142
+ "_declspec",
143
+ "_fastcall",
144
+ "_if_exists",
145
+ "_if_not_exists",
146
+ "_inline",
147
+ "_multiple_inheritance",
148
+ "_pascal",
149
+ "_single_inheritance",
150
+ "_stdcall",
151
+ "_virtual_inheritance",
152
+ "_w64",
153
+ "__abstract",
154
+ // reserved word with two underscores
155
+ "__alignof",
156
+ "__asm",
157
+ "__assume",
158
+ "__based",
159
+ "__box",
160
+ "__builtin_alignof",
161
+ "__cdecl",
162
+ "__clrcall",
163
+ "__declspec",
164
+ "__delegate",
165
+ "__event",
166
+ "__except",
167
+ "__fastcall",
168
+ "__finally",
169
+ "__forceinline",
170
+ "__gc",
171
+ "__hook",
172
+ "__identifier",
173
+ "__if_exists",
174
+ "__if_not_exists",
175
+ "__inline",
176
+ "__int128",
177
+ "__int16",
178
+ "__int32",
179
+ "__int64",
180
+ "__int8",
181
+ "__interface",
182
+ "__leave",
183
+ "__m128",
184
+ "__m128d",
185
+ "__m128i",
186
+ "__m256",
187
+ "__m256d",
188
+ "__m256i",
189
+ "__m512",
190
+ "__m512d",
191
+ "__m512i",
192
+ "__m64",
193
+ "__multiple_inheritance",
194
+ "__newslot",
195
+ "__nogc",
196
+ "__noop",
197
+ "__nounwind",
198
+ "__novtordisp",
199
+ "__pascal",
200
+ "__pin",
201
+ "__pragma",
202
+ "__property",
203
+ "__ptr32",
204
+ "__ptr64",
205
+ "__raise",
206
+ "__restrict",
207
+ "__resume",
208
+ "__sealed",
209
+ "__single_inheritance",
210
+ "__stdcall",
211
+ "__super",
212
+ "__thiscall",
213
+ "__try",
214
+ "__try_cast",
215
+ "__typeof",
216
+ "__unaligned",
217
+ "__unhook",
218
+ "__uuidof",
219
+ "__value",
220
+ "__virtual_inheritance",
221
+ "__w64",
222
+ "__wchar_t"
223
+ ],
224
+ operators: [
225
+ "=",
226
+ ">",
227
+ "<",
228
+ "!",
229
+ "~",
230
+ "?",
231
+ ":",
232
+ "==",
233
+ "<=",
234
+ ">=",
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
+ // we include these common regular expressions
262
+ symbols: /[=><!~?:&|+\-*\/\^%]+/,
263
+ escapes: /\\(?:[0abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
264
+ integersuffix: /([uU](ll|LL|l|L)|(ll|LL|l|L)?[uU]?)/,
265
+ floatsuffix: /[fFlL]?/,
266
+ encoding: /u|u8|U|L/,
267
+ // The main tokenizer for our languages
268
+ tokenizer: {
269
+ root: [
270
+ // C++ 11 Raw String
271
+ [/@encoding?R\"(?:([^ ()\\\t]*))\(/, { token: "string.raw.begin", next: "@raw.$1" }],
272
+ // identifiers and keywords
273
+ [
274
+ /[a-zA-Z_]\w*/,
275
+ {
276
+ cases: {
277
+ "@keywords": { token: "keyword.$0" },
278
+ "@default": "identifier"
279
+ }
280
+ }
281
+ ],
282
+ // The preprocessor checks must be before whitespace as they check /^\s*#/ which
283
+ // otherwise fails to match later after other whitespace has been removed.
284
+ // Inclusion
285
+ [/^\s*#\s*include/, { token: "keyword.directive.include", next: "@include" }],
286
+ // Preprocessor directive
287
+ [/^\s*#\s*\w+/, "keyword.directive"],
288
+ // whitespace
289
+ { include: "@whitespace" },
290
+ // [[ attributes ]].
291
+ [/\[\s*\[/, { token: "annotation", next: "@annotation" }],
292
+ // delimiters and operators
293
+ [/[{}()<>\[\]]/, "@brackets"],
294
+ [
295
+ /@symbols/,
296
+ {
297
+ cases: {
298
+ "@operators": "delimiter",
299
+ "@default": ""
300
+ }
301
+ }
302
+ ],
303
+ // numbers
304
+ [/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/, "number.float"],
305
+ [/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/, "number.float"],
306
+ [/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/, "number.hex"],
307
+ [/0[0-7']*[0-7](@integersuffix)/, "number.octal"],
308
+ [/0[bB][0-1']*[0-1](@integersuffix)/, "number.binary"],
309
+ [/\d[\d']*\d(@integersuffix)/, "number"],
310
+ [/\d(@integersuffix)/, "number"],
311
+ // delimiter: after number because of .\d floats
312
+ [/[;,.]/, "delimiter"],
313
+ // strings
314
+ [/"([^"\\]|\\.)*$/, "string.invalid"],
315
+ // non-teminated string
316
+ [/"/, "string", "@string"],
317
+ // characters
318
+ [/'[^\\']'/, "string"],
319
+ [/(')(@escapes)(')/, ["string", "string.escape", "string"]],
320
+ [/'/, "string.invalid"]
321
+ ],
322
+ whitespace: [
323
+ [/[ \t\r\n]+/, ""],
324
+ [/\/\*\*(?!\/)/, "comment.doc", "@doccomment"],
325
+ [/\/\*/, "comment", "@comment"],
326
+ [/\/\/.*\\$/, "comment", "@linecomment"],
327
+ [/\/\/.*$/, "comment"]
328
+ ],
329
+ comment: [
330
+ [/[^\/*]+/, "comment"],
331
+ [/\*\//, "comment", "@pop"],
332
+ [/[\/*]/, "comment"]
333
+ ],
334
+ //For use with continuous line comments
335
+ linecomment: [
336
+ [/.*[^\\]$/, "comment", "@pop"],
337
+ [/[^]+/, "comment"]
338
+ ],
339
+ //Identical copy of comment above, except for the addition of .doc
340
+ doccomment: [
341
+ [/[^\/*]+/, "comment.doc"],
342
+ [/\*\//, "comment.doc", "@pop"],
343
+ [/[\/*]/, "comment.doc"]
344
+ ],
345
+ string: [
346
+ [/[^\\"]+/, "string"],
347
+ [/@escapes/, "string.escape"],
348
+ [/\\./, "string.escape.invalid"],
349
+ [/"/, "string", "@pop"]
350
+ ],
351
+ raw: [
352
+ [/[^)]+/, "string.raw"],
353
+ [/\)$S2\"/, { token: "string.raw.end", next: "@pop" }],
354
+ [/\)/, "string.raw"]
355
+ ],
356
+ annotation: [
357
+ { include: "@whitespace" },
358
+ [/using|alignas/, "keyword"],
359
+ [/[a-zA-Z0-9_]+/, "annotation"],
360
+ [/[,:]/, "delimiter"],
361
+ [/[()]/, "@brackets"],
362
+ [/\]\s*\]/, { token: "annotation", next: "@pop" }]
363
+ ],
364
+ include: [
365
+ [
366
+ /(\s*)(<)([^<>]*)(>)/,
367
+ [
368
+ "",
369
+ "keyword.directive.include.begin",
370
+ "string.include.identifier",
371
+ { token: "keyword.directive.include.end", next: "@pop" }
372
+ ]
373
+ ],
374
+ [
375
+ /(\s*)(")([^"]*)(")/,
376
+ [
377
+ "",
378
+ "keyword.directive.include.begin",
379
+ "string.include.identifier",
380
+ { token: "keyword.directive.include.end", next: "@pop" }
381
+ ]
382
+ ]
383
+ ]
384
+ }
385
+ };
386
+ export {
387
+ e as conf,
388
+ n as language
389
+ };