@luxonis/visualizer-protobuf 1.6.2 → 1.7.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 (137) hide show
  1. package/dist/apl-NdZ6-T1z.js +142 -0
  2. package/dist/apps/depthai-visualizer/lib/src/components/Panel.d.ts +2 -0
  3. package/dist/apps/depthai-visualizer/lib/src/components/Panel.d.ts.map +1 -1
  4. package/dist/apps/depthai-visualizer/lib/src/components/Panel.js +2 -2
  5. package/dist/apps/depthai-visualizer/lib/src/components/Panel.js.map +1 -1
  6. package/dist/apps/depthai-visualizer/lib/src/components/PanelToolbar.d.ts +4 -1
  7. package/dist/apps/depthai-visualizer/lib/src/components/PanelToolbar.d.ts.map +1 -1
  8. package/dist/apps/depthai-visualizer/lib/src/components/PanelToolbar.js +25 -13
  9. package/dist/apps/depthai-visualizer/lib/src/components/PanelToolbar.js.map +1 -1
  10. package/dist/apps/depthai-visualizer/lib/src/panels/ImagePanel.d.ts +2 -8
  11. package/dist/apps/depthai-visualizer/lib/src/panels/ImagePanel.d.ts.map +1 -1
  12. package/dist/apps/depthai-visualizer/lib/src/panels/ImagePanel.js +1 -1
  13. package/dist/apps/depthai-visualizer/lib/src/panels/ImagePanel.js.map +1 -1
  14. package/dist/apps/depthai-visualizer/lib/src/panels/PointCloudPanel.js +2 -2
  15. package/dist/apps/depthai-visualizer/lib/src/panels/PointCloudPanel.js.map +1 -1
  16. package/dist/asciiarmor-CmJEbAuq.js +56 -0
  17. package/dist/asn1-CG_zvzH1.js +192 -0
  18. package/dist/asterisk-D6r__RMF.js +187 -0
  19. package/dist/brainfuck-COwWCBpq.js +70 -0
  20. package/dist/clike-BjlaHgsH.js +1018 -0
  21. package/dist/clojure-C2XPrGCa.js +274 -0
  22. package/dist/cmake-BGrEgXCL.js +81 -0
  23. package/dist/cobol-BfwG5XeO.js +235 -0
  24. package/dist/coffeescript-BG8vTfSz.js +329 -0
  25. package/dist/commonlisp-8oE2EpEe.js +108 -0
  26. package/dist/crystal--rIRMl16.js +419 -0
  27. package/dist/css-C_ZeEwz2.js +847 -0
  28. package/dist/cypher-Bayei42D.js +122 -0
  29. package/dist/d-B0hhz6be.js +205 -0
  30. package/dist/diff-DQutOIXs.js +30 -0
  31. package/dist/dockerfile-FAjn0vs9.js +199 -0
  32. package/dist/dtd-C1CeYVnM.js +121 -0
  33. package/dist/dylan-Dm9-uD-A.js +337 -0
  34. package/dist/ebnf-jWG_1Yly.js +151 -0
  35. package/dist/ecl-CgJPA6z9.js +190 -0
  36. package/dist/eiffel-lj7uLahq.js +146 -0
  37. package/dist/elm-Cz7o1ijk.js +230 -0
  38. package/dist/erlang-CyL5QOyR.js +581 -0
  39. package/dist/factor-B0KnwW_L.js +65 -0
  40. package/dist/fcl-DiozYjc8.js +154 -0
  41. package/dist/forth-B7vn5ze0.js +164 -0
  42. package/dist/fortran-D2XNEnBT.js +172 -0
  43. package/dist/gas-B_Tj57Ve.js +343 -0
  44. package/dist/gherkin-CJ6Qk4EZ.js +147 -0
  45. package/dist/groovy-BD9p_7sW.js +230 -0
  46. package/dist/haskell-BHnm1B83.js +239 -0
  47. package/dist/haxe-DWtZc5G9.js +490 -0
  48. package/dist/http-BOd5SYCT.js +89 -0
  49. package/dist/idl-FSFk8_xX.js +274 -0
  50. package/dist/index-B2YTRRfg.js +77 -0
  51. package/dist/{index-B8tJ5E-v.js → index-Beii0-_3.js} +7 -4
  52. package/dist/index-BjWYigIi.js +124 -0
  53. package/dist/index-Bx-Bh4nu.js +114 -0
  54. package/dist/index-Bya68zyH.js +154265 -0
  55. package/dist/index-C3_VkVgd.js +626 -0
  56. package/dist/index-CIOyzzeT.js +199 -0
  57. package/dist/index-CY_MdHWz.js +810 -0
  58. package/dist/index-D8b2daZv.js +155 -0
  59. package/dist/index-DW9KaYNb.js +149 -0
  60. package/dist/index-DZ4eTPnT.js +497 -0
  61. package/dist/index-DZeM9OAW.js +356 -0
  62. package/dist/index-DgQXSEwG.js +348 -0
  63. package/dist/index-DuTu94nj.js +436 -0
  64. package/dist/{index-CDLN8AQd.js → index-KZ3VqQGp.js} +88 -35
  65. package/dist/index-WQmqQNn4.js +205 -0
  66. package/dist/index-o4kozweh.js +458 -0
  67. package/dist/index-rTpSqKsn.js +103 -0
  68. package/dist/index-tmy4XtHv.js +346 -0
  69. package/dist/index.js +7 -3
  70. package/dist/javascript-CWIx5LQU.js +922 -0
  71. package/dist/jinja2-D9k5QrXv.js +171 -0
  72. package/dist/julia-DM42tOPB.js +369 -0
  73. package/dist/livescript-Jd_p-LwX.js +259 -0
  74. package/dist/lua-CByQu4v6.js +137 -0
  75. package/dist/mathematica-Dkv0uCYF.js +153 -0
  76. package/dist/mbox-CYTvs5kC.js +114 -0
  77. package/dist/mirc-DpgP3GCo.js +176 -0
  78. package/dist/mllike-Ti5DOjKW.js +346 -0
  79. package/dist/modelica-CR6hTSce.js +192 -0
  80. package/dist/mscgen-D0GXtzMS.js +149 -0
  81. package/dist/mumps-Bf1EyDa6.js +129 -0
  82. package/dist/nginx-By9Phklj.js +163 -0
  83. package/dist/nsis-27gzqCGG.js +80 -0
  84. package/dist/ntriples-C7VJ7pnm.js +141 -0
  85. package/dist/octave-6yR_ix15.js +112 -0
  86. package/dist/oz-CEUnktiQ.js +235 -0
  87. package/dist/package.json +1 -0
  88. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandler.d.ts +1 -1
  89. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandler.d.ts.map +1 -1
  90. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandler.js +47 -18
  91. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandler.js.map +1 -1
  92. package/dist/pascal-AdN1jbEG.js +124 -0
  93. package/dist/perl-B99DUQQt.js +819 -0
  94. package/dist/pig-DFeDRta6.js +149 -0
  95. package/dist/powershell-DhwsNWMx.js +381 -0
  96. package/dist/properties-o21uErwC.js +62 -0
  97. package/dist/protobuf-YxlANsmD.js +54 -0
  98. package/dist/pug-OXF_6qhs.js +504 -0
  99. package/dist/puppet-B8WICGYE.js +205 -0
  100. package/dist/python-D3FFx1Id.js +389 -0
  101. package/dist/q-D2Hjhl2C.js +123 -0
  102. package/dist/r-D73k5lac.js +174 -0
  103. package/dist/rpm-Duv_WH0z.js +89 -0
  104. package/dist/ruby-DGCVqZDt.js +287 -0
  105. package/dist/sas-XjPv1Vy5.js +268 -0
  106. package/dist/scheme-DeaA28vt.js +263 -0
  107. package/dist/shell-Bx6QZTgx.js +145 -0
  108. package/dist/sieve-CWCD62sW.js +178 -0
  109. package/dist/simple-mode-DAYwfn8M.js +135 -0
  110. package/dist/smalltalk-DSQbF4MF.js +153 -0
  111. package/dist/solr-v_XRf31C.js +80 -0
  112. package/dist/sparql-BrfDqf0-.js +170 -0
  113. package/dist/spreadsheet-Csn84Pef.js +98 -0
  114. package/dist/sql-Bhuc3u9R.js +481 -0
  115. package/dist/stex-DBkktma-.js +246 -0
  116. package/dist/stylus-dNd_pqKl.js +750 -0
  117. package/dist/swift-CHbTprt3.js +202 -0
  118. package/dist/tcl-BRlMUELr.js +125 -0
  119. package/dist/textile-CqfTUjd4.js +441 -0
  120. package/dist/tiddlywiki-BrsoM8KB.js +278 -0
  121. package/dist/tiki-D-ivWPkc.js +289 -0
  122. package/dist/toml-t_IhJu83.js +75 -0
  123. package/dist/troff-DckGF2AE.js +64 -0
  124. package/dist/ttcn-DlN2TOzU.js +257 -0
  125. package/dist/ttcn-cfg-pHSvg1fS.js +201 -0
  126. package/dist/turtle-D9Js0BlL.js +141 -0
  127. package/dist/vb-CbIGLrpY.js +249 -0
  128. package/dist/vbscript-8ANWle9n.js +320 -0
  129. package/dist/velocity-D6hz3Hzw.js +186 -0
  130. package/dist/verilog-DIV442at.js +565 -0
  131. package/dist/vhdl-BlTiZo_v.js +174 -0
  132. package/dist/webidl-Cp3tcqdk.js +179 -0
  133. package/dist/xquery-BOQU-_D-.js +425 -0
  134. package/dist/yacas-DQ1WucF0.js +182 -0
  135. package/dist/z80-P1j44jDI.js +102 -0
  136. package/package.json +2 -1
  137. package/dist/index-BoCFgPcb.js +0 -23123
@@ -0,0 +1,230 @@
1
+ function words(str) {
2
+ var obj = {}, words = str.split(" ");
3
+ for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
4
+ return obj;
5
+ }
6
+ var keywords = words(
7
+ "abstract as assert boolean break byte case catch char class const continue def default " +
8
+ "do double else enum extends final finally float for goto if implements import in " +
9
+ "instanceof int interface long native new package private protected public return " +
10
+ "short static strictfp super switch synchronized threadsafe throw throws trait transient " +
11
+ "try void volatile while");
12
+ var blockKeywords = words("catch class def do else enum finally for if interface switch trait try while");
13
+ var standaloneKeywords = words("return break continue");
14
+ var atoms = words("null true false this");
15
+
16
+ var curPunc;
17
+ function tokenBase(stream, state) {
18
+ var ch = stream.next();
19
+ if (ch == '"' || ch == "'") {
20
+ return startString(ch, stream, state);
21
+ }
22
+ if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
23
+ curPunc = ch;
24
+ return null;
25
+ }
26
+ if (/\d/.test(ch)) {
27
+ stream.eatWhile(/[\w\.]/);
28
+ if (stream.eat(/eE/)) { stream.eat(/\+\-/); stream.eatWhile(/\d/); }
29
+ return "number";
30
+ }
31
+ if (ch == "/") {
32
+ if (stream.eat("*")) {
33
+ state.tokenize.push(tokenComment);
34
+ return tokenComment(stream, state);
35
+ }
36
+ if (stream.eat("/")) {
37
+ stream.skipToEnd();
38
+ return "comment";
39
+ }
40
+ if (expectExpression(state.lastToken, false)) {
41
+ return startString(ch, stream, state);
42
+ }
43
+ }
44
+ if (ch == "-" && stream.eat(">")) {
45
+ curPunc = "->";
46
+ return null;
47
+ }
48
+ if (/[+\-*&%=<>!?|\/~]/.test(ch)) {
49
+ stream.eatWhile(/[+\-*&%=<>|~]/);
50
+ return "operator";
51
+ }
52
+ stream.eatWhile(/[\w\$_]/);
53
+ if (ch == "@") { stream.eatWhile(/[\w\$_\.]/); return "meta"; }
54
+ if (state.lastToken == ".") return "property";
55
+ if (stream.eat(":")) { curPunc = "proplabel"; return "property"; }
56
+ var cur = stream.current();
57
+ if (atoms.propertyIsEnumerable(cur)) { return "atom"; }
58
+ if (keywords.propertyIsEnumerable(cur)) {
59
+ if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
60
+ else if (standaloneKeywords.propertyIsEnumerable(cur)) curPunc = "standalone";
61
+ return "keyword";
62
+ }
63
+ return "variable";
64
+ }
65
+ tokenBase.isBase = true;
66
+
67
+ function startString(quote, stream, state) {
68
+ var tripleQuoted = false;
69
+ if (quote != "/" && stream.eat(quote)) {
70
+ if (stream.eat(quote)) tripleQuoted = true;
71
+ else return "string";
72
+ }
73
+ function t(stream, state) {
74
+ var escaped = false, next, end = !tripleQuoted;
75
+ while ((next = stream.next()) != null) {
76
+ if (next == quote && !escaped) {
77
+ if (!tripleQuoted) { break; }
78
+ if (stream.match(quote + quote)) { end = true; break; }
79
+ }
80
+ if (quote == '"' && next == "$" && !escaped) {
81
+ if (stream.eat("{")) {
82
+ state.tokenize.push(tokenBaseUntilBrace());
83
+ return "string";
84
+ } else if (stream.match(/^\w/, false)) {
85
+ state.tokenize.push(tokenVariableDeref);
86
+ return "string";
87
+ }
88
+ }
89
+ escaped = !escaped && next == "\\";
90
+ }
91
+ if (end) state.tokenize.pop();
92
+ return "string";
93
+ }
94
+ state.tokenize.push(t);
95
+ return t(stream, state);
96
+ }
97
+
98
+ function tokenBaseUntilBrace() {
99
+ var depth = 1;
100
+ function t(stream, state) {
101
+ if (stream.peek() == "}") {
102
+ depth--;
103
+ if (depth == 0) {
104
+ state.tokenize.pop();
105
+ return state.tokenize[state.tokenize.length-1](stream, state);
106
+ }
107
+ } else if (stream.peek() == "{") {
108
+ depth++;
109
+ }
110
+ return tokenBase(stream, state);
111
+ }
112
+ t.isBase = true;
113
+ return t;
114
+ }
115
+
116
+ function tokenVariableDeref(stream, state) {
117
+ var next = stream.match(/^(\.|[\w\$_]+)/);
118
+ if (!next) {
119
+ state.tokenize.pop();
120
+ return state.tokenize[state.tokenize.length-1](stream, state)
121
+ }
122
+ return next[0] == "." ? null : "variable"
123
+ }
124
+
125
+ function tokenComment(stream, state) {
126
+ var maybeEnd = false, ch;
127
+ while (ch = stream.next()) {
128
+ if (ch == "/" && maybeEnd) {
129
+ state.tokenize.pop();
130
+ break;
131
+ }
132
+ maybeEnd = (ch == "*");
133
+ }
134
+ return "comment";
135
+ }
136
+
137
+ function expectExpression(last, newline) {
138
+ return !last || last == "operator" || last == "->" || /[\.\[\{\(,;:]/.test(last) ||
139
+ last == "newstatement" || last == "keyword" || last == "proplabel" ||
140
+ (last == "standalone" && !newline);
141
+ }
142
+
143
+ function Context(indented, column, type, align, prev) {
144
+ this.indented = indented;
145
+ this.column = column;
146
+ this.type = type;
147
+ this.align = align;
148
+ this.prev = prev;
149
+ }
150
+ function pushContext(state, col, type) {
151
+ return state.context = new Context(state.indented, col, type, null, state.context);
152
+ }
153
+ function popContext(state) {
154
+ var t = state.context.type;
155
+ if (t == ")" || t == "]" || t == "}")
156
+ state.indented = state.context.indented;
157
+ return state.context = state.context.prev;
158
+ }
159
+
160
+ // Interface
161
+
162
+ const groovy = {
163
+ name: "groovy",
164
+ startState: function(indentUnit) {
165
+ return {
166
+ tokenize: [tokenBase],
167
+ context: new Context(-indentUnit, 0, "top", false),
168
+ indented: 0,
169
+ startOfLine: true,
170
+ lastToken: null
171
+ };
172
+ },
173
+
174
+ token: function(stream, state) {
175
+ var ctx = state.context;
176
+ if (stream.sol()) {
177
+ if (ctx.align == null) ctx.align = false;
178
+ state.indented = stream.indentation();
179
+ state.startOfLine = true;
180
+ // Automatic semicolon insertion
181
+ if (ctx.type == "statement" && !expectExpression(state.lastToken, true)) {
182
+ popContext(state); ctx = state.context;
183
+ }
184
+ }
185
+ if (stream.eatSpace()) return null;
186
+ curPunc = null;
187
+ var style = state.tokenize[state.tokenize.length-1](stream, state);
188
+ if (style == "comment") return style;
189
+ if (ctx.align == null) ctx.align = true;
190
+
191
+ if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state);
192
+ // Handle indentation for {x -> \n ... }
193
+ else if (curPunc == "->" && ctx.type == "statement" && ctx.prev.type == "}") {
194
+ popContext(state);
195
+ state.context.align = false;
196
+ }
197
+ else if (curPunc == "{") pushContext(state, stream.column(), "}");
198
+ else if (curPunc == "[") pushContext(state, stream.column(), "]");
199
+ else if (curPunc == "(") pushContext(state, stream.column(), ")");
200
+ else if (curPunc == "}") {
201
+ while (ctx.type == "statement") ctx = popContext(state);
202
+ if (ctx.type == "}") ctx = popContext(state);
203
+ while (ctx.type == "statement") ctx = popContext(state);
204
+ }
205
+ else if (curPunc == ctx.type) popContext(state);
206
+ else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement"))
207
+ pushContext(state, stream.column(), "statement");
208
+ state.startOfLine = false;
209
+ state.lastToken = curPunc || style;
210
+ return style;
211
+ },
212
+
213
+ indent: function(state, textAfter, cx) {
214
+ if (!state.tokenize[state.tokenize.length-1].isBase) return null;
215
+ var firstChar = textAfter && textAfter.charAt(0), ctx = state.context;
216
+ if (ctx.type == "statement" && !expectExpression(state.lastToken, true)) ctx = ctx.prev;
217
+ var closing = firstChar == ctx.type;
218
+ if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : cx.unit);
219
+ else if (ctx.align) return ctx.column + (closing ? 0 : 1);
220
+ else return ctx.indented + (closing ? 0 : cx.unit);
221
+ },
222
+
223
+ languageData: {
224
+ indentOnInput: /^\s*[{}]$/,
225
+ commentTokens: {line: "//", block: {open: "/*", close: "*/"}},
226
+ closeBrackets: {brackets: ["(", "[", "{", "'", '"', "'''", '"""']}
227
+ }
228
+ };
229
+
230
+ export { groovy };
@@ -0,0 +1,239 @@
1
+ function switchState(source, setState, f) {
2
+ setState(f);
3
+ return f(source, setState);
4
+ }
5
+
6
+ // These should all be Unicode extended, as per the Haskell 2010 report
7
+ var smallRE = /[a-z_]/;
8
+ var largeRE = /[A-Z]/;
9
+ var digitRE = /\d/;
10
+ var hexitRE = /[0-9A-Fa-f]/;
11
+ var octitRE = /[0-7]/;
12
+ var idRE = /[a-z_A-Z0-9'\xa1-\uffff]/;
13
+ var symbolRE = /[-!#$%&*+.\/<=>?@\\^|~:]/;
14
+ var specialRE = /[(),;[\]`{}]/;
15
+ var whiteCharRE = /[ \t\v\f]/; // newlines are handled in tokenizer
16
+
17
+ function normal(source, setState) {
18
+ if (source.eatWhile(whiteCharRE)) {
19
+ return null;
20
+ }
21
+
22
+ var ch = source.next();
23
+ if (specialRE.test(ch)) {
24
+ if (ch == '{' && source.eat('-')) {
25
+ var t = "comment";
26
+ if (source.eat('#')) {
27
+ t = "meta";
28
+ }
29
+ return switchState(source, setState, ncomment(t, 1));
30
+ }
31
+ return null;
32
+ }
33
+
34
+ if (ch == '\'') {
35
+ if (source.eat('\\')) {
36
+ source.next(); // should handle other escapes here
37
+ }
38
+ else {
39
+ source.next();
40
+ }
41
+ if (source.eat('\'')) {
42
+ return "string";
43
+ }
44
+ return "error";
45
+ }
46
+
47
+ if (ch == '"') {
48
+ return switchState(source, setState, stringLiteral);
49
+ }
50
+
51
+ if (largeRE.test(ch)) {
52
+ source.eatWhile(idRE);
53
+ if (source.eat('.')) {
54
+ return "qualifier";
55
+ }
56
+ return "type";
57
+ }
58
+
59
+ if (smallRE.test(ch)) {
60
+ source.eatWhile(idRE);
61
+ return "variable";
62
+ }
63
+
64
+ if (digitRE.test(ch)) {
65
+ if (ch == '0') {
66
+ if (source.eat(/[xX]/)) {
67
+ source.eatWhile(hexitRE); // should require at least 1
68
+ return "integer";
69
+ }
70
+ if (source.eat(/[oO]/)) {
71
+ source.eatWhile(octitRE); // should require at least 1
72
+ return "number";
73
+ }
74
+ }
75
+ source.eatWhile(digitRE);
76
+ var t = "number";
77
+ if (source.match(/^\.\d+/)) {
78
+ t = "number";
79
+ }
80
+ if (source.eat(/[eE]/)) {
81
+ t = "number";
82
+ source.eat(/[-+]/);
83
+ source.eatWhile(digitRE); // should require at least 1
84
+ }
85
+ return t;
86
+ }
87
+
88
+ if (ch == "." && source.eat("."))
89
+ return "keyword";
90
+
91
+ if (symbolRE.test(ch)) {
92
+ if (ch == '-' && source.eat(/-/)) {
93
+ source.eatWhile(/-/);
94
+ if (!source.eat(symbolRE)) {
95
+ source.skipToEnd();
96
+ return "comment";
97
+ }
98
+ }
99
+ source.eatWhile(symbolRE);
100
+ return "variable"
101
+ }
102
+
103
+ return "error";
104
+ }
105
+
106
+ function ncomment(type, nest) {
107
+ if (nest == 0) {
108
+ return normal;
109
+ }
110
+ return function(source, setState) {
111
+ var currNest = nest;
112
+ while (!source.eol()) {
113
+ var ch = source.next();
114
+ if (ch == '{' && source.eat('-')) {
115
+ ++currNest;
116
+ }
117
+ else if (ch == '-' && source.eat('}')) {
118
+ --currNest;
119
+ if (currNest == 0) {
120
+ setState(normal);
121
+ return type;
122
+ }
123
+ }
124
+ }
125
+ setState(ncomment(type, currNest));
126
+ return type;
127
+ };
128
+ }
129
+
130
+ function stringLiteral(source, setState) {
131
+ while (!source.eol()) {
132
+ var ch = source.next();
133
+ if (ch == '"') {
134
+ setState(normal);
135
+ return "string";
136
+ }
137
+ if (ch == '\\') {
138
+ if (source.eol() || source.eat(whiteCharRE)) {
139
+ setState(stringGap);
140
+ return "string";
141
+ }
142
+ if (source.eat('&')) ;
143
+ else {
144
+ source.next(); // should handle other escapes here
145
+ }
146
+ }
147
+ }
148
+ setState(normal);
149
+ return "error";
150
+ }
151
+
152
+ function stringGap(source, setState) {
153
+ if (source.eat('\\')) {
154
+ return switchState(source, setState, stringLiteral);
155
+ }
156
+ source.next();
157
+ setState(normal);
158
+ return "error";
159
+ }
160
+
161
+
162
+ var wellKnownWords = (function() {
163
+ var wkw = {};
164
+ function setType(t) {
165
+ return function () {
166
+ for (var i = 0; i < arguments.length; i++)
167
+ wkw[arguments[i]] = t;
168
+ };
169
+ }
170
+
171
+ setType("keyword")(
172
+ "case", "class", "data", "default", "deriving", "do", "else", "foreign",
173
+ "if", "import", "in", "infix", "infixl", "infixr", "instance", "let",
174
+ "module", "newtype", "of", "then", "type", "where", "_");
175
+
176
+ setType("keyword")(
177
+ "\.\.", ":", "::", "=", "\\", "<-", "->", "@", "~", "=>");
178
+
179
+ setType("builtin")(
180
+ "!!", "$!", "$", "&&", "+", "++", "-", ".", "/", "/=", "<", "<*", "<=",
181
+ "<$>", "<*>", "=<<", "==", ">", ">=", ">>", ">>=", "^", "^^", "||", "*",
182
+ "*>", "**");
183
+
184
+ setType("builtin")(
185
+ "Applicative", "Bool", "Bounded", "Char", "Double", "EQ", "Either", "Enum",
186
+ "Eq", "False", "FilePath", "Float", "Floating", "Fractional", "Functor",
187
+ "GT", "IO", "IOError", "Int", "Integer", "Integral", "Just", "LT", "Left",
188
+ "Maybe", "Monad", "Nothing", "Num", "Ord", "Ordering", "Rational", "Read",
189
+ "ReadS", "Real", "RealFloat", "RealFrac", "Right", "Show", "ShowS",
190
+ "String", "True");
191
+
192
+ setType("builtin")(
193
+ "abs", "acos", "acosh", "all", "and", "any", "appendFile", "asTypeOf",
194
+ "asin", "asinh", "atan", "atan2", "atanh", "break", "catch", "ceiling",
195
+ "compare", "concat", "concatMap", "const", "cos", "cosh", "curry",
196
+ "cycle", "decodeFloat", "div", "divMod", "drop", "dropWhile", "either",
197
+ "elem", "encodeFloat", "enumFrom", "enumFromThen", "enumFromThenTo",
198
+ "enumFromTo", "error", "even", "exp", "exponent", "fail", "filter",
199
+ "flip", "floatDigits", "floatRadix", "floatRange", "floor", "fmap",
200
+ "foldl", "foldl1", "foldr", "foldr1", "fromEnum", "fromInteger",
201
+ "fromIntegral", "fromRational", "fst", "gcd", "getChar", "getContents",
202
+ "getLine", "head", "id", "init", "interact", "ioError", "isDenormalized",
203
+ "isIEEE", "isInfinite", "isNaN", "isNegativeZero", "iterate", "last",
204
+ "lcm", "length", "lex", "lines", "log", "logBase", "lookup", "map",
205
+ "mapM", "mapM_", "max", "maxBound", "maximum", "maybe", "min", "minBound",
206
+ "minimum", "mod", "negate", "not", "notElem", "null", "odd", "or",
207
+ "otherwise", "pi", "pred", "print", "product", "properFraction", "pure",
208
+ "putChar", "putStr", "putStrLn", "quot", "quotRem", "read", "readFile",
209
+ "readIO", "readList", "readLn", "readParen", "reads", "readsPrec",
210
+ "realToFrac", "recip", "rem", "repeat", "replicate", "return", "reverse",
211
+ "round", "scaleFloat", "scanl", "scanl1", "scanr", "scanr1", "seq",
212
+ "sequence", "sequence_", "show", "showChar", "showList", "showParen",
213
+ "showString", "shows", "showsPrec", "significand", "signum", "sin",
214
+ "sinh", "snd", "span", "splitAt", "sqrt", "subtract", "succ", "sum",
215
+ "tail", "take", "takeWhile", "tan", "tanh", "toEnum", "toInteger",
216
+ "toRational", "truncate", "uncurry", "undefined", "unlines", "until",
217
+ "unwords", "unzip", "unzip3", "userError", "words", "writeFile", "zip",
218
+ "zip3", "zipWith", "zipWith3");
219
+
220
+ return wkw;
221
+ })();
222
+
223
+ const haskell = {
224
+ name: "haskell",
225
+ startState: function () { return { f: normal }; },
226
+ copyState: function (s) { return { f: s.f }; },
227
+
228
+ token: function(stream, state) {
229
+ var t = state.f(stream, function(s) { state.f = s; });
230
+ var w = stream.current();
231
+ return wellKnownWords.hasOwnProperty(w) ? wellKnownWords[w] : t;
232
+ },
233
+
234
+ languageData: {
235
+ commentTokens: {line: "--", block: {open: "{-", close: "-}"}}
236
+ }
237
+ };
238
+
239
+ export { haskell };