@@ -0,0 +1,1023 @@
1+"use strict";
2+var monacoEditor = require("@monaco-editor/react");
3+
4+exports.editorImpl = monacoEditor.default;
5+
6+exports.initMonacoImpl = function() {
7+ return monacoEditor.monaco.init();
8+};
9+
10+exports.getValue = function(editor) {
11+ return function() {
12+ return editor.getValue();
13+ };
14+};
15+
16+exports.defineThemeImpl = function(monacoInstance) {
17+ return function(name) {
18+ return function(theme) {
19+ return function() {
20+ return monacoInstance.editor.defineTheme(name, theme);
21+ };
22+ };
23+ };
24+};
25+
26+exports.setThemeImpl = function(monacoInstance) {
27+ return function(theme) {
28+ return function() {
29+ return monacoInstance.editor.setTheme(theme);
30+ };
31+ };
32+};
33+
34+exports.registerLanguageImpl = function(monacoInstance) {
35+ return function(languageId) {
36+ return function() {
37+ monacoInstance.languages.register({ id: languageId });
38+ };
39+ };
40+};
41+
42+exports.setMonarchTokensProviderImpl = function(monacoInstance) {
43+ return function(name) {
44+ return function(monarchLanguage) {
45+ return function() {
46+ return monacoInstance.languages.setMonarchTokensProvider(
47+ name,
48+ monarchLanguage
49+ );
50+ };
51+ };
52+ };
53+};
54+
55+exports.vsCodeTheme = {
56+ base: "vs",
57+ inherit: true,
58+ rules: [
59+ {
60+ foreground: "008e00",
61+ token: "comment"
62+ },
63+ {
64+ foreground: "7d4726",
65+ token: "meta.preprocessor"
66+ },
67+ {
68+ foreground: "7d4726",
69+ token: "keyword.control.import"
70+ },
71+ {
72+ foreground: "df0002",
73+ token: "string"
74+ },
75+ {
76+ foreground: "3a00dc",
77+ token: "constant.numeric"
78+ },
79+ {
80+ foreground: "c800a4",
81+ token: "constant.language"
82+ },
83+ {
84+ foreground: "275a5e",
85+ token: "constant.character"
86+ },
87+ {
88+ foreground: "275a5e",
89+ token: "constant.other"
90+ },
91+ {
92+ foreground: "c800a4",
93+ token: "variable.language"
94+ },
95+ {
96+ foreground: "c800a4",
97+ token: "variable.other"
98+ },
99+ {
100+ foreground: "c800a4",
101+ token: "keyword"
102+ },
103+ {
104+ foreground: "c900a4",
105+ token: "storage"
106+ },
107+ {
108+ foreground: "438288",
109+ token: "entity.name.class"
110+ },
111+ {
112+ foreground: "790ead",
113+ token: "entity.name.tag"
114+ },
115+ {
116+ foreground: "450084",
117+ token: "entity.other.attribute-name"
118+ },
119+ {
120+ foreground: "450084",
121+ token: "support.function"
122+ },
123+ {
124+ foreground: "450084",
125+ token: "support.constant"
126+ },
127+ {
128+ foreground: "790ead",
129+ token: "support.type"
130+ },
131+ {
132+ foreground: "790ead",
133+ token: "support.class"
134+ },
135+ {
136+ foreground: "790ead",
137+ token: "support.other.variable"
138+ }
139+ ],
140+ colors: {
141+ "editor.foreground": "#000000",
142+ "editor.background": "#FFFFFF",
143+ "editor.selectionBackground": "#B5D5FF",
144+ "editor.lineHighlightBackground": "#00000012",
145+ "editorCursor.foreground": "#000000",
146+ "editorWhitespace.foreground": "#BFBFBF"
147+ }
148+};
149+
150+exports.nightOwlTheme = {
151+ base: "vs-dark",
152+ inherit: true,
153+ rules: [
154+ {
155+ foreground: "637777",
156+ token: "comment"
157+ },
158+ {
159+ foreground: "addb67",
160+ token: "string"
161+ },
162+ {
163+ foreground: "ecc48d",
164+ token: "vstring.quoted"
165+ },
166+ {
167+ foreground: "ecc48d",
168+ token: "variable.other.readwrite.js"
169+ },
170+ {
171+ foreground: "5ca7e4",
172+ token: "string.regexp"
173+ },
174+ {
175+ foreground: "5ca7e4",
176+ token: "string.regexp keyword.other"
177+ },
178+ {
179+ foreground: "5f7e97",
180+ token: "meta.function punctuation.separator.comma"
181+ },
182+ {
183+ foreground: "f78c6c",
184+ token: "constant.numeric"
185+ },
186+ {
187+ foreground: "f78c6c",
188+ token: "constant.character.numeric"
189+ },
190+ {
191+ foreground: "addb67",
192+ token: "variable"
193+ },
194+ {
195+ foreground: "c792ea",
196+ token: "keyword"
197+ },
198+ {
199+ foreground: "c792ea",
200+ token: "punctuation.accessor"
201+ },
202+ {
203+ foreground: "c792ea",
204+ token: "storage"
205+ },
206+ {
207+ foreground: "c792ea",
208+ token: "meta.var.expr"
209+ },
210+ {
211+ foreground: "c792ea",
212+ token: "meta.class meta.method.declaration meta.var.expr storage.type.jsm"
213+ },
214+ {
215+ foreground: "c792ea",
216+ token: "storage.type.property.js"
217+ },
218+ {
219+ foreground: "c792ea",
220+ token: "storage.type.property.ts"
221+ },
222+ {
223+ foreground: "c792ea",
224+ token: "storage.type.property.tsx"
225+ },
226+ {
227+ foreground: "82aaff",
228+ token: "storage.type"
229+ },
230+ {
231+ foreground: "ffcb8b",
232+ token: "entity.name.class"
233+ },
234+ {
235+ foreground: "ffcb8b",
236+ token: "meta.class entity.name.type.class"
237+ },
238+ {
239+ foreground: "addb67",
240+ token: "entity.other.inherited-class"
241+ },
242+ {
243+ foreground: "82aaff",
244+ token: "entity.name.function"
245+ },
246+ {
247+ foreground: "addb67",
248+ token: "punctuation.definition.variable"
249+ },
250+ {
251+ foreground: "d3423e",
252+ token: "punctuation.section.embedded"
253+ },
254+ {
255+ foreground: "d6deeb",
256+ token: "punctuation.terminator.expression"
257+ },
258+ {
259+ foreground: "d6deeb",
260+ token: "punctuation.definition.arguments"
261+ },
262+ {
263+ foreground: "d6deeb",
264+ token: "punctuation.definition.array"
265+ },
266+ {
267+ foreground: "d6deeb",
268+ token: "punctuation.section.array"
269+ },
270+ {
271+ foreground: "d6deeb",
272+ token: "meta.array"
273+ },
274+ {
275+ foreground: "d9f5dd",
276+ token: "punctuation.definition.list.begin"
277+ },
278+ {
279+ foreground: "d9f5dd",
280+ token: "punctuation.definition.list.end"
281+ },
282+ {
283+ foreground: "d9f5dd",
284+ token: "punctuation.separator.arguments"
285+ },
286+ {
287+ foreground: "d9f5dd",
288+ token: "punctuation.definition.list"
289+ },
290+ {
291+ foreground: "d3423e",
292+ token: "string.template meta.template.expression"
293+ },
294+ {
295+ foreground: "d6deeb",
296+ token: "string.template punctuation.definition.string"
297+ },
298+ {
299+ foreground: "c792ea",
300+ fontStyle: "italic",
301+ token: "italic"
302+ },
303+ {
304+ foreground: "addb67",
305+ fontStyle: "bold",
306+ token: "bold"
307+ },
308+ {
309+ foreground: "82aaff",
310+ token: "constant.language"
311+ },
312+ {
313+ foreground: "82aaff",
314+ token: "punctuation.definition.constant"
315+ },
316+ {
317+ foreground: "82aaff",
318+ token: "variable.other.constant"
319+ },
320+ {
321+ foreground: "7fdbca",
322+ token: "support.function.construct"
323+ },
324+ {
325+ foreground: "7fdbca",
326+ token: "keyword.other.new"
327+ },
328+ {
329+ foreground: "82aaff",
330+ token: "constant.character"
331+ },
332+ {
333+ foreground: "82aaff",
334+ token: "constant.other"
335+ },
336+ {
337+ foreground: "f78c6c",
338+ token: "constant.character.escape"
339+ },
340+ {
341+ foreground: "addb67",
342+ token: "entity.other.inherited-class"
343+ },
344+ {
345+ foreground: "d7dbe0",
346+ token: "variable.parameter"
347+ },
348+ {
349+ foreground: "7fdbca",
350+ token: "entity.name.tag"
351+ },
352+ {
353+ foreground: "cc2996",
354+ token: "punctuation.definition.tag.html"
355+ },
356+ {
357+ foreground: "cc2996",
358+ token: "punctuation.definition.tag.begin"
359+ },
360+ {
361+ foreground: "cc2996",
362+ token: "punctuation.definition.tag.end"
363+ },
364+ {
365+ foreground: "addb67",
366+ token: "entity.other.attribute-name"
367+ },
368+ {
369+ foreground: "addb67",
370+ token: "entity.name.tag.custom"
371+ },
372+ {
373+ foreground: "82aaff",
374+ token: "support.function"
375+ },
376+ {
377+ foreground: "82aaff",
378+ token: "support.constant"
379+ },
380+ {
381+ foreground: "7fdbca",
382+ token: "upport.constant.meta.property-value"
383+ },
384+ {
385+ foreground: "addb67",
386+ token: "support.type"
387+ },
388+ {
389+ foreground: "addb67",
390+ token: "support.class"
391+ },
392+ {
393+ foreground: "addb67",
394+ token: "support.variable.dom"
395+ },
396+ {
397+ foreground: "7fdbca",
398+ token: "support.constant"
399+ },
400+ {
401+ foreground: "7fdbca",
402+ token: "keyword.other.special-method"
403+ },
404+ {
405+ foreground: "7fdbca",
406+ token: "keyword.other.new"
407+ },
408+ {
409+ foreground: "7fdbca",
410+ token: "keyword.other.debugger"
411+ },
412+ {
413+ foreground: "7fdbca",
414+ token: "keyword.control"
415+ },
416+ {
417+ foreground: "c792ea",
418+ token: "keyword.operator.comparison"
419+ },
420+ {
421+ foreground: "c792ea",
422+ token: "keyword.control.flow.js"
423+ },
424+ {
425+ foreground: "c792ea",
426+ token: "keyword.control.flow.ts"
427+ },
428+ {
429+ foreground: "c792ea",
430+ token: "keyword.control.flow.tsx"
431+ },
432+ {
433+ foreground: "c792ea",
434+ token: "keyword.control.ruby"
435+ },
436+ {
437+ foreground: "c792ea",
438+ token: "keyword.control.module.ruby"
439+ },
440+ {
441+ foreground: "c792ea",
442+ token: "keyword.control.class.ruby"
443+ },
444+ {
445+ foreground: "c792ea",
446+ token: "keyword.control.def.ruby"
447+ },
448+ {
449+ foreground: "c792ea",
450+ token: "keyword.control.loop.js"
451+ },
452+ {
453+ foreground: "c792ea",
454+ token: "keyword.control.loop.ts"
455+ },
456+ {
457+ foreground: "c792ea",
458+ token: "keyword.control.import.js"
459+ },
460+ {
461+ foreground: "c792ea",
462+ token: "keyword.control.import.ts"
463+ },
464+ {
465+ foreground: "c792ea",
466+ token: "keyword.control.import.tsx"
467+ },
468+ {
469+ foreground: "c792ea",
470+ token: "keyword.control.from.js"
471+ },
472+ {
473+ foreground: "c792ea",
474+ token: "keyword.control.from.ts"
475+ },
476+ {
477+ foreground: "c792ea",
478+ token: "keyword.control.from.tsx"
479+ },
480+ {
481+ foreground: "ffffff",
482+ background: "ff2c83",
483+ token: "invalid"
484+ },
485+ {
486+ foreground: "ffffff",
487+ background: "d3423e",
488+ token: "invalid.deprecated"
489+ },
490+ {
491+ foreground: "7fdbca",
492+ token: "keyword.operator"
493+ },
494+ {
495+ foreground: "c792ea",
496+ token: "keyword.operator.relational"
497+ },
498+ {
499+ foreground: "c792ea",
500+ token: "keyword.operator.assignement"
501+ },
502+ {
503+ foreground: "c792ea",
504+ token: "keyword.operator.arithmetic"
505+ },
506+ {
507+ foreground: "c792ea",
508+ token: "keyword.operator.bitwise"
509+ },
510+ {
511+ foreground: "c792ea",
512+ token: "keyword.operator.increment"
513+ },
514+ {
515+ foreground: "c792ea",
516+ token: "keyword.operator.ternary"
517+ },
518+ {
519+ foreground: "637777",
520+ token: "comment.line.double-slash"
521+ },
522+ {
523+ foreground: "cdebf7",
524+ token: "object"
525+ },
526+ {
527+ foreground: "ff5874",
528+ token: "constant.language.null"
529+ },
530+ {
531+ foreground: "d6deeb",
532+ token: "meta.brace"
533+ },
534+ {
535+ foreground: "c792ea",
536+ token: "meta.delimiter.period"
537+ },
538+ {
539+ foreground: "d9f5dd",
540+ token: "punctuation.definition.string"
541+ },
542+ {
543+ foreground: "ff5874",
544+ token: "constant.language.boolean"
545+ },
546+ {
547+ foreground: "ffffff",
548+ token: "object.comma"
549+ },
550+ {
551+ foreground: "7fdbca",
552+ token: "variable.parameter.function"
553+ },
554+ {
555+ foreground: "80cbc4",
556+ token: "support.type.vendor.property-name"
557+ },
558+ {
559+ foreground: "80cbc4",
560+ token: "support.constant.vendor.property-value"
561+ },
562+ {
563+ foreground: "80cbc4",
564+ token: "support.type.property-name"
565+ },
566+ {
567+ foreground: "80cbc4",
568+ token: "meta.property-list entity.name.tag"
569+ },
570+ {
571+ foreground: "57eaf1",
572+ token: "meta.property-list entity.name.tag.reference"
573+ },
574+ {
575+ foreground: "f78c6c",
576+ token: "constant.other.color.rgb-value punctuation.definition.constant"
577+ },
578+ {
579+ foreground: "ffeb95",
580+ token: "constant.other.color"
581+ },
582+ {
583+ foreground: "ffeb95",
584+ token: "keyword.other.unit"
585+ },
586+ {
587+ foreground: "c792ea",
588+ token: "meta.selector"
589+ },
590+ {
591+ foreground: "fad430",
592+ token: "entity.other.attribute-name.id"
593+ },
594+ {
595+ foreground: "80cbc4",
596+ token: "meta.property-name"
597+ },
598+ {
599+ foreground: "c792ea",
600+ token: "entity.name.tag.doctype"
601+ },
602+ {
603+ foreground: "c792ea",
604+ token: "meta.tag.sgml.doctype"
605+ },
606+ {
607+ foreground: "d9f5dd",
608+ token: "punctuation.definition.parameters"
609+ },
610+ {
611+ foreground: "ecc48d",
612+ token: "string.quoted"
613+ },
614+ {
615+ foreground: "ecc48d",
616+ token: "string.quoted.double"
617+ },
618+ {
619+ foreground: "ecc48d",
620+ token: "string.quoted.single"
621+ },
622+ {
623+ foreground: "addb67",
624+ token: "support.constant.math"
625+ },
626+ {
627+ foreground: "addb67",
628+ token: "support.type.property-name.json"
629+ },
630+ {
631+ foreground: "addb67",
632+ token: "support.constant.json"
633+ },
634+ {
635+ foreground: "c789d6",
636+ token: "meta.structure.dictionary.value.json string.quoted.double"
637+ },
638+ {
639+ foreground: "80cbc4",
640+ token: "string.quoted.double.json punctuation.definition.string.json"
641+ },
642+ {
643+ foreground: "ff5874",
644+ token:
645+ "meta.structure.dictionary.json meta.structure.dictionary.value constant.language"
646+ },
647+ {
648+ foreground: "d6deeb",
649+ token: "variable.other.ruby"
650+ },
651+ {
652+ foreground: "ecc48d",
653+ token: "entity.name.type.class.ruby"
654+ },
655+ {
656+ foreground: "ecc48d",
657+ token: "keyword.control.class.ruby"
658+ },
659+ {
660+ foreground: "ecc48d",
661+ token: "meta.class.ruby"
662+ },
663+ {
664+ foreground: "7fdbca",
665+ token: "constant.language.symbol.hashkey.ruby"
666+ },
667+ {
668+ foreground: "e0eddd",
669+ background: "a57706",
670+ fontStyle: "italic",
671+ token: "meta.diff"
672+ },
673+ {
674+ foreground: "e0eddd",
675+ background: "a57706",
676+ fontStyle: "italic",
677+ token: "meta.diff.header"
678+ },
679+ {
680+ foreground: "ef535090",
681+ fontStyle: "italic",
682+ token: "markup.deleted"
683+ },
684+ {
685+ foreground: "a2bffc",
686+ fontStyle: "italic",
687+ token: "markup.changed"
688+ },
689+ {
690+ foreground: "a2bffc",
691+ fontStyle: "italic",
692+ token: "meta.diff.header.git"
693+ },
694+ {
695+ foreground: "a2bffc",
696+ fontStyle: "italic",
697+ token: "meta.diff.header.from-file"
698+ },
699+ {
700+ foreground: "a2bffc",
701+ fontStyle: "italic",
702+ token: "meta.diff.header.to-file"
703+ },
704+ {
705+ foreground: "219186",
706+ background: "eae3ca",
707+ token: "markup.inserted"
708+ },
709+ {
710+ foreground: "d3201f",
711+ token: "other.package.exclude"
712+ },
713+ {
714+ foreground: "d3201f",
715+ token: "other.remove"
716+ },
717+ {
718+ foreground: "269186",
719+ token: "other.add"
720+ },
721+ {
722+ foreground: "ff5874",
723+ token: "constant.language.python"
724+ },
725+ {
726+ foreground: "82aaff",
727+ token: "variable.parameter.function.python"
728+ },
729+ {
730+ foreground: "82aaff",
731+ token: "meta.function-call.arguments.python"
732+ },
733+ {
734+ foreground: "b2ccd6",
735+ token: "meta.function-call.python"
736+ },
737+ {
738+ foreground: "b2ccd6",
739+ token: "meta.function-call.generic.python"
740+ },
741+ {
742+ foreground: "d6deeb",
743+ token: "punctuation.python"
744+ },
745+ {
746+ foreground: "addb67",
747+ token: "entity.name.function.decorator.python"
748+ },
749+ {
750+ foreground: "8eace3",
751+ token: "source.python variable.language.special"
752+ },
753+ {
754+ foreground: "82b1ff",
755+ token: "markup.heading.markdown"
756+ },
757+ {
758+ foreground: "c792ea",
759+ fontStyle: "italic",
760+ token: "markup.italic.markdown"
761+ },
762+ {
763+ foreground: "addb67",
764+ fontStyle: "bold",
765+ token: "markup.bold.markdown"
766+ },
767+ {
768+ foreground: "697098",
769+ token: "markup.quote.markdown"
770+ },
771+ {
772+ foreground: "80cbc4",
773+ token: "markup.inline.raw.markdown"
774+ },
775+ {
776+ foreground: "ff869a",
777+ token: "markup.underline.link.markdown"
778+ },
779+ {
780+ foreground: "ff869a",
781+ token: "markup.underline.link.image.markdown"
782+ },
783+ {
784+ foreground: "d6deeb",
785+ token: "string.other.link.title.markdown"
786+ },
787+ {
788+ foreground: "d6deeb",
789+ token: "string.other.link.description.markdown"
790+ },
791+ {
792+ foreground: "82b1ff",
793+ token: "punctuation.definition.string.markdown"
794+ },
795+ {
796+ foreground: "82b1ff",
797+ token: "punctuation.definition.string.begin.markdown"
798+ },
799+ {
800+ foreground: "82b1ff",
801+ token: "punctuation.definition.string.end.markdown"
802+ },
803+ {
804+ foreground: "82b1ff",
805+ token: "meta.link.inline.markdown punctuation.definition.string"
806+ },
807+ {
808+ foreground: "7fdbca",
809+ token: "punctuation.definition.metadata.markdown"
810+ },
811+ {
812+ foreground: "82b1ff",
813+ token: "beginning.punctuation.definition.list.markdown"
814+ }
815+ ],
816+ colors: {
817+ "editor.foreground": "#d6deeb",
818+ "editor.background": "#011627",
819+ "editor.selectionBackground": "#5f7e9779",
820+ "editor.lineHighlightBackground": "#010E17",
821+ "editorCursor.foreground": "#80a4c2",
822+ "editorWhitespace.foreground": "#2e2040",
823+ "editorIndentGuide.background": "#5e81ce52",
824+ "editor.selectionHighlightBorder": "#122d42"
825+ }
826+};
827+
828+exports.purescriptSyntax = {
829+ displayName: "Purescript",
830+ name: "purescrript",
831+ mimeTypes: ["text/purescript"],
832+ fileExtensions: ["purs"],
833+
834+ editorOptions: { tabSize: 2, insertSpaces: true },
835+
836+ lineComment: "--",
837+ blockCommentStart: "{-",
838+ blockCommentEnd: "-}",
839+
840+ keywords: [
841+ "case",
842+ "class",
843+ "data",
844+ "derive",
845+ "do",
846+ "else",
847+ "if",
848+ "import",
849+ "in",
850+ "infix",
851+ "infixl",
852+ "infixr",
853+ "instance",
854+ "let",
855+ "module",
856+ "newtype",
857+ "of",
858+ "then",
859+ "type",
860+ "where",
861+ "->",
862+ "|",
863+ "=>",
864+ "::",
865+ "\\",
866+ "=",
867+ "|",
868+ "foreign",
869+ "forall",
870+ "∷"
871+ ],
872+
873+ extraKeywords: [],
874+
875+ typeKeywords: [],
876+
877+ dataStart: ["^data"],
878+
879+ typeStart: ["class", "instance", "type", "derive"],
880+
881+ escapes:
882+ "\\\\(?:[nrt\\\\\"'\\?]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{6})",
883+ symbols0: "[\\$%&\\*\\+@!\\/\\\\\\^~=\\.:\\-\\?]",
884+ symbols: "(?:@symbols0|[\\|<>])+",
885+ idchars: "(?:[\\w'])*",
886+
887+ tokenizer: {
888+ root: [
889+ [
890+ "((?:[A-Z]@idchars\\.)+)([a-z]@idchars)",
891+ ["identifier.namespace", "identifier"]
892+ ],
893+ [
894+ "((?:[A-Z]@idchars\\.)+)([A-Z]@idchars)",
895+ ["identifier.namespace", "constructor"]
896+ ],
897+
898+ [
899+ "[a-z]@idchars(?!\\.)",
900+ {
901+ cases: {
902+ "@dataStart": { token: "keyword", next: "@type_data" },
903+ "@typeStart": { token: "keyword", next: "@type_type" },
904+ "@keywords": "keyword",
905+ "@extraKeywords": "keyword",
906+ "@default": "identifier"
907+ }
908+ }
909+ ],
910+
911+ ["[A-Z]@idchars", "type.identifier"],
912+
913+ ["_@idchars", "identifier.wildcard"],
914+
915+ ["([a-z]@idchars\\.)+", "identifier.namespace"],
916+
917+ { include: "@whitespace" },
918+
919+ ["[{}()\\[\\]]", "@brackets"],
920+ ["[,`]", "delimiter"],
921+
922+ ["::(?!@symbols0)", "type.operator", "@type_line"],
923+ [
924+ "@symbols",
925+ {
926+ cases: {
927+ "@keywords": "keyword.operator",
928+ "@extraKeywords": "keyword.operator",
929+ "@default": "operator"
930+ }
931+ }
932+ ],
933+
934+ ["[0-9]+\\.[0-9]+([eE][\\-+]?[0-9]+)?", "number.float"],
935+ ["0[xX][0-9a-fA-F]+", "number.hex"],
936+ ["[0-9]+", "number"],
937+
938+ ['"([^"\\\\]|\\\\.)*$', "string.invalid"],
939+ ['"', { token: "string.quote", bracket: "@open", next: "@string" }],
940+
941+ ["'[^\\\\']'", "string"],
942+ ["(')(@escapes)(')", ["string", "string.escape", "string"]],
943+ ["'", "string.invalid"],
944+
945+ ["^[ ]*#.*", "namespace"]
946+ ],
947+
948+ whitespace: [
949+ ["[ \\r\\n]+", ""],
950+ ["{-", "comment", "@comment"],
951+ ["--.*$", "comment"]
952+ ],
953+
954+ comment: [
955+ ["[^\\{\\-]+", "comment"],
956+ ["{-", "comment", "@push"],
957+ ["-}", "comment", "@pop"],
958+ ["[\\{\\-]", "comment"]
959+ ],
960+
961+ string: [
962+ ['[^\\\\"]+', "string"],
963+ ["@escapes", "string.escape"],
964+ ["\\\\.", "string.escape.invalid"],
965+ ['"', { token: "string.quote", bracket: "@close", next: "@pop" }]
966+ ],
967+
968+ type_type: [
969+ ["\\=", "keyword"],
970+ ["^\\s*(?!\\-\\-|\\{\\-)[^\\s]", { token: "@rematch", next: "@pop" }],
971+ { include: "@type" }
972+ ],
973+
974+ type_data: [
975+ ["([=|])(\\s*)([A-Z]@idchars)", ["keyword.operator", "", "constructor"]],
976+ ["^\\s*$", { token: "", next: "@pop" }],
977+ { include: "@type" }
978+ ],
979+
980+ type_line: [
981+ ["^\\s*(?!\\-\\-|\\{\\-)[_a-z]", { token: "@rematch", next: "@pop" }],
982+ ["[^=]*=", { token: "@rematch", next: "@pop" }],
983+ { include: "@type" }
984+ ],
985+
986+ type: [
987+ ["[(\\[]", { token: "@brackets.type" }, "@type_nested"],
988+ { include: "@type_content" }
989+ ],
990+
991+ type_nested: [
992+ ["[)\\]]", { token: "@brackets.type" }, "@pop"],
993+ ["[(\\[]", { token: "@brackets.type" }, "@push"],
994+ [",", "delimiter.type"],
995+ { include: "@type_content" }
996+ ],
997+
998+ type_content: [
999+ { include: "@whitespace" },
1000+
1001+ ["[a-z]\\d*\\b", "type.identifier.typevar"],
1002+ ["_@idchars", "type.identifier.typevar"],
1003+
1004+ [
1005+ "((?:[A-Z]@idchars\\.)*)([A-Z]@idchars)",
1006+ ["type.identifier.namespace", "type.identifier"]
1007+ ],
1008+ [
1009+ "((?:[A-Z]@idchars\\.)*)([a-z]@idchars)",
1010+ {
1011+ cases: {
1012+ "@typeKeywords": ["type.identifier.namespace", "type.keyword"],
1013+ "@keywords": { token: "@rematch", next: "@pop" },
1014+ "@default": ["type.identifier.namespace", "type.identifier"]
1015+ }
1016+ }
1017+ ],
1018+
1019+ ["::|->|[\\.:|]", "type.operator"],
1020+ ["[\\s\\S]", "@rematch", "@pop"]
1021+ ]
1022+ }
1023+};