File: mode-java.js

package info (click to toggle)
graphite-web 0.9.12%2Bdebian-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 13,464 kB
  • ctags: 3,343
  • sloc: python: 6,713; sh: 79; makefile: 44
file content (593 lines) | stat: -rw-r--r-- 28,608 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
define("ace/mode/java", ["require", "exports", "module", "pilot/oop", "ace/mode/javascript", "ace/tokenizer", "ace/mode/java_highlight_rules", "ace/mode/matching_brace_outdent", "ace/mode/behaviour/cstyle"], function(a, b, c) {
    var d = a("pilot/oop"),
        e = a("ace/mode/javascript").Mode,
        f = a("ace/tokenizer").Tokenizer,
        g = a("ace/mode/java_highlight_rules").JavaHighlightRules,
        h = a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,
        i = a("ace/mode/behaviour/cstyle").CstyleBehaviour,
        j = function() {
            this.$tokenizer = new f((new g).getRules()), this.$outdent = new h, this.$behaviour = new i
        };
    d.inherits(j, e),
    function() {
        this.createWorker = function(a) {
            return null
        }
    }.call(j.prototype), b.Mode = j
}), define("ace/mode/javascript", ["require", "exports", "module", "pilot/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/javascript_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/worker/worker_client", "ace/mode/behaviour/cstyle"], function(a, b, c) {
    var d = a("pilot/oop"),
        e = a("ace/mode/text").Mode,
        f = a("ace/tokenizer").Tokenizer,
        g = a("ace/mode/javascript_highlight_rules").JavaScriptHighlightRules,
        h = a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,
        i = a("ace/range").Range,
        j = a("ace/worker/worker_client").WorkerClient,
        k = a("ace/mode/behaviour/cstyle").CstyleBehaviour,
        l = function() {
            this.$tokenizer = new f((new g).getRules()), this.$outdent = new h, this.$behaviour = new k
        };
    d.inherits(l, e),
    function() {
        this.toggleCommentLines = function(a, b, c, d) {
            var e = !0,
                f = [],
                g = /^(\s*)\/\//;
            for (var h = c; h <= d; h++)
                if (!g.test(b.getLine(h))) {
                    e = !1;
                    break
                }
            if (e) {
                var j = new i(0, 0, 0, 0);
                for (var h = c; h <= d; h++) {
                    var k = b.getLine(h),
                        l = k.match(g);
                    j.start.row = h, j.end.row = h, j.end.column = l[0].length, b.replace(j, l[1])
                }
            } else b.indentRows(c, d, "//")
        }, this.getNextLineIndent = function(a, b, c) {
            var d = this.$getIndent(b),
                e = this.$tokenizer.getLineTokens(b, a),
                f = e.tokens,
                g = e.state;
            if (f.length && f[f.length - 1].type == "comment") return d;
            if (a == "start" || a == "regex_allowed") {
                var h = b.match(/^.*[\{\(\[\:]\s*$/);
                h && (d += c)
            } else if (a == "doc-start") {
                if (g == "start" || a == "regex_allowed") return "";
                var h = b.match(/^\s*(\/?)\*/);
                h && (h[1] && (d += " "), d += "* ")
            }
            return d
        }, this.checkOutdent = function(a, b, c) {
            return this.$outdent.checkOutdent(b, c)
        }, this.autoOutdent = function(a, b, c) {
            this.$outdent.autoOutdent(b, c)
        }, this.createWorker = function(a) {
            var b = new j(["ace", "pilot"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
            return b.attachToDocument(a.getDocument()), b.on("jslint", function(b) {
                var c = [];
                for (var d = 0; d < b.data.length; d++) {
                    var e = b.data[d];
                    e && c.push({
                        row: e.line - 1,
                        column: e.character - 1,
                        text: e.reason,
                        type: "warning",
                        lint: e
                    })
                }
                a.setAnnotations(c)
            }), b.on("narcissus", function(b) {
                a.setAnnotations([b.data])
            }), b.on("terminate", function() {
                a.clearAnnotations()
            }), b
        }
    }.call(l.prototype), b.Mode = l
}), define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "pilot/oop", "pilot/lang", "ace/unicode", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function(a, b, c) {
    var d = a("pilot/oop"),
        e = a("pilot/lang"),
        f = a("ace/unicode"),
        g = a("ace/mode/doc_comment_highlight_rules").DocCommentHighlightRules,
        h = a("ace/mode/text_highlight_rules").TextHighlightRules,
        i = function() {
            var a = e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),
                b = e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),
                c = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",
                d = e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),
                h = e.arrayToMap("const|let|var|function".split("|")),
                i = e.arrayToMap("null|Infinity|NaN|undefined".split("|")),
                j = e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),
                k = "[" + f.packages.L + "\\$_][" + f.packages.L + f.packages.Mn + f.packages.Mc + f.packages.Nd + f.packages.Pc + "\\$_]*\\b";
            this.$rules = {
                start: [{
                    token: "comment",
                    regex: "\\/\\/.*$"
                }, (new g).getStartRule("doc-start"), {
                    token: "comment",
                    merge: !0,
                    regex: "\\/\\*",
                    next: "comment"
                }, {
                    token: "string",
                    regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
                }, {
                    token: "string",
                    merge: !0,
                    regex: '["].*\\\\$',
                    next: "qqstring"
                }, {
                    token: "string",
                    regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
                }, {
                    token: "string",
                    merge: !0,
                    regex: "['].*\\\\$",
                    next: "qstring"
                }, {
                    token: "constant.numeric",
                    regex: "0[xX][0-9a-fA-F]+\\b"
                }, {
                    token: "constant.numeric",
                    regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
                }, {
                    token: ["keyword.definition", "text", "entity.name.function"],
                    regex: "(function)(\\s+)(" + k + ")"
                }, {
                    token: "constant.language.boolean",
                    regex: "(?:true|false)\\b"
                }, {
                    token: "keyword",
                    regex: "(?:" + c + ")\\b",
                    next: "regex_allowed"
                }, {
                    token: function(c) {
                        return a.hasOwnProperty(c) ? "variable.language" : d.hasOwnProperty(c) ? "invalid.deprecated" : h.hasOwnProperty(c) ? "keyword.definition" : b.hasOwnProperty(c) ? "keyword" : i.hasOwnProperty(c) ? "constant.language" : j.hasOwnProperty(c) ? "invalid.illegal" : c == "debugger" ? "invalid.deprecated" : "identifier"
                    },
                    regex: k
                }, {
                    token: "keyword.operator",
                    regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
                    next: "regex_allowed"
                }, {
                    token: "punctuation.operator",
                    regex: "\\?|\\:|\\,|\\;|\\.",
                    next: "regex_allowed"
                }, {
                    token: "paren.lparen",
                    regex: "[[({]",
                    next: "regex_allowed"
                }, {
                    token: "paren.rparen",
                    regex: "[\\])}]"
                }, {
                    token: "keyword.operator",
                    regex: "\\/=?",
                    next: "regex_allowed"
                }, {
                    token: "comment",
                    regex: "^#!.*$"
                }, {
                    token: "text",
                    regex: "\\s+"
                }],
                regex_allowed: [{
                    token: "comment",
                    merge: !0,
                    regex: "\\/\\*",
                    next: "comment_regex_allowed"
                }, {
                    token: "comment",
                    regex: "\\/\\/.*$"
                }, {
                    token: "string.regexp",
                    regex: "\\/(?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*",
                    next: "start"
                }, {
                    token: "text",
                    regex: "\\s+"
                }, {
                    token: "empty",
                    regex: "",
                    next: "start"
                }],
                comment_regex_allowed: [{
                    token: "comment",
                    regex: ".*?\\*\\/",
                    merge: !0,
                    next: "regex_allowed"
                }, {
                    token: "comment",
                    merge: !0,
                    regex: ".+"
                }],
                comment: [{
                    token: "comment",
                    regex: ".*?\\*\\/",
                    merge: !0,
                    next: "start"
                }, {
                    token: "comment",
                    merge: !0,
                    regex: ".+"
                }],
                qqstring: [{
                    token: "string",
                    regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
                    next: "start"
                }, {
                    token: "string",
                    merge: !0,
                    regex: ".+"
                }],
                qstring: [{
                    token: "string",
                    regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
                    next: "start"
                }, {
                    token: "string",
                    merge: !0,
                    regex: ".+"
                }]
            }, this.embedRules(g, "doc-", [(new g).getEndRule("start")])
        };
    d.inherits(i, h), b.JavaScriptHighlightRules = i
}), define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "pilot/oop", "ace/mode/text_highlight_rules"], function(a, b, c) {
    var d = a("pilot/oop"),
        e = a("ace/mode/text_highlight_rules").TextHighlightRules,
        f = function() {
            this.$rules = {
                start: [{
                    token: "comment.doc.tag",
                    regex: "@[\\w\\d_]+"
                }, {
                    token: "comment.doc",
                    merge: !0,
                    regex: "\\s+"
                }, {
                    token: "comment.doc",
                    merge: !0,
                    regex: "TODO"
                }, {
                    token: "comment.doc",
                    merge: !0,
                    regex: "[^@\\*]+"
                }, {
                    token: "comment.doc",
                    merge: !0,
                    regex: "."
                }]
            }
        };
    d.inherits(f, e),
    function() {
        this.getStartRule = function(a) {
            return {
                token: "comment.doc",
                merge: !0,
                regex: "\\/\\*(?=\\*)",
                next: a
            }
        }, this.getEndRule = function(a) {
            return {
                token: "comment.doc",
                merge: !0,
                regex: "\\*\\/",
                next: a
            }
        }
    }.call(f.prototype), b.DocCommentHighlightRules = f
}), define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function(a, b, c) {
    var d = a("ace/range").Range,
        e = function() {};
    (function() {
        this.checkOutdent = function(a, b) {
            return /^\s+$/.test(a) ? /^\s*\}/.test(b) : !1
        }, this.autoOutdent = function(a, b) {
            var c = a.getLine(b),
                e = c.match(/^(\s*\})/);
            if (!e) return 0;
            var f = e[1].length,
                g = a.findMatchingBracket({
                    row: b,
                    column: f
                });
            if (!g || g.row == b) return 0;
            var h = this.$getIndent(a.getLine(g.row));
            a.replace(new d(b, 0, b, f - 1), h)
        }, this.$getIndent = function(a) {
            var b = a.match(/^(\s+)/);
            return b ? b[1] : ""
        }
    }).call(e.prototype), b.MatchingBraceOutdent = e
}), define("ace/worker/worker_client", ["require", "exports", "module", "pilot/oop", "pilot/event_emitter"], function(a, b, c) {
    var d = a("pilot/oop"),
        e = a("pilot/event_emitter").EventEmitter,
        f = function(b, c, d, e) {
            this.changeListener = this.changeListener.bind(this);
            if (a.packaged) var f = this.$guessBasePath(),
                g = this.$worker = new Worker(f + c);
            else {
                var h = this.$normalizePath(a.nameToUrl("ace/worker/worker", null, "_")),
                    g = this.$worker = new Worker(h),
                    i = {};
                for (var j = 0; j < b.length; j++) {
                    var k = b[j],
                        l = this.$normalizePath(a.nameToUrl(k, null, "_").replace(/.js$/, ""));
                    i[k] = l
                }
            }
            this.$worker.postMessage({
                init: !0,
                tlns: i,
                module: d,
                classname: e
            }), this.callbackId = 1, this.callbacks = {};
            var m = this;
            this.$worker.onerror = function(a) {
                throw window.console && console.log && console.log(a), a
            }, this.$worker.onmessage = function(a) {
                var b = a.data;
                switch (b.type) {
                    case "log":
                        window.console && console.log && console.log(b.data);
                        break;
                    case "event":
                        m._dispatchEvent(b.name, {
                            data: b.data
                        });
                        break;
                    case "call":
                        var c = m.callbacks[b.id];
                        c && (c(b.data), delete m.callbacks[b.id])
                }
            }
        };
    (function() {
        d.implement(this, e), this.$normalizePath = function(a) {
            return a.match(/^\w+:/) || (a = location.protocol + "//" + location.host + (a.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, "")) + "/" + a.replace(/^[\/]+/, "")), a
        }, this.$guessBasePath = function() {
            if (a.aceBaseUrl) return a.aceBaseUrl;
            var b = document.getElementsByTagName("script");
            for (var c = 0; c < b.length; c++) {
                var d = b[c],
                    e = d.getAttribute("data-ace-base");
                if (e) return e.replace(/\/*$/, "/");
                var f = d.src || d.getAttribute("src");
                if (!f) continue;
                var g = f.match(/^(?:(.*\/)ace\.js|(.*\/)ace-uncompressed\.js)(?:\?|$)/);
                if (g) return g[1] || g[2]
            }
            return ""
        }, this.terminate = function() {
            this._dispatchEvent("terminate", {}), this.$worker.terminate(), this.$worker = null, this.$doc.removeEventListener("change", this.changeListener), this.$doc = null
        }, this.send = function(a, b) {
            this.$worker.postMessage({
                command: a,
                args: b
            })
        }, this.call = function(a, b, c) {
            if (c) {
                var d = this.callbackId++;
                this.callbacks[d] = c, b.push(d)
            }
            this.send(a, b)
        }, this.emit = function(a, b) {
            try {
                this.$worker.postMessage({
                    event: a,
                    data: {
                        data: b.data
                    }
                })
            } catch (c) {}
        }, this.attachToDocument = function(a) {
            this.$doc && this.terminate(), this.$doc = a, this.call("setValue", [a.getValue()]), a.on("change", this.changeListener)
        }, this.changeListener = function(a) {
            a.range = {
                start: a.data.range.start,
                end: a.data.range.end
            }, this.emit("change", a)
        }
    }).call(f.prototype), b.WorkerClient = f
}), define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "pilot/oop", "ace/mode/behaviour"], function(a, b, c) {
    var d = a("pilot/oop"),
        e = a("ace/mode/behaviour").Behaviour,
        f = function() {
            this.add("braces", "insertion", function(a, b, c, d, e) {
                if (e == "{") {
                    var f = c.getSelectionRange(),
                        g = d.doc.getTextRange(f);
                    return g !== "" ? {
                        text: "{" + g + "}",
                        selection: !1
                    } : {
                        text: "{}",
                        selection: [1, 1]
                    }
                }
                if (e == "}") {
                    var h = c.getCursorPosition(),
                        i = d.doc.getLine(h.row),
                        j = i.substring(h.column, h.column + 1);
                    if (j == "}") {
                        var k = d.$findOpeningBracket("}", {
                            column: h.column + 1,
                            row: h.row
                        });
                        if (k !== null) return {
                            text: "",
                            selection: [1, 1]
                        }
                    }
                } else if (e == "\n") {
                    var h = c.getCursorPosition(),
                        i = d.doc.getLine(h.row),
                        j = i.substring(h.column, h.column + 1);
                    if (j == "}") {
                        var l = d.findMatchingBracket({
                            row: h.row,
                            column: h.column + 1
                        });
                        if (!l) return null;
                        var m = this.getNextLineIndent(a, i.substring(0, i.length - 1), d.getTabString()),
                            n = this.$getIndent(d.doc.getLine(l.row));
                        return {
                            text: "\n" + m + "\n" + n,
                            selection: [1, m.length, 1, m.length]
                        }
                    }
                }
            }), this.add("braces", "deletion", function(a, b, c, d, e) {
                var f = d.doc.getTextRange(e);
                if (!e.isMultiLine() && f == "{") {
                    var g = d.doc.getLine(e.start.row),
                        h = g.substring(e.end.column, e.end.column + 1);
                    if (h == "}") return e.end.column++, e
                }
            }), this.add("parens", "insertion", function(a, b, c, d, e) {
                if (e == "(") {
                    var f = c.getSelectionRange(),
                        g = d.doc.getTextRange(f);
                    return g !== "" ? {
                        text: "(" + g + ")",
                        selection: !1
                    } : {
                        text: "()",
                        selection: [1, 1]
                    }
                }
                if (e == ")") {
                    var h = c.getCursorPosition(),
                        i = d.doc.getLine(h.row),
                        j = i.substring(h.column, h.column + 1);
                    if (j == ")") {
                        var k = d.$findOpeningBracket(")", {
                            column: h.column + 1,
                            row: h.row
                        });
                        if (k !== null) return {
                            text: "",
                            selection: [1, 1]
                        }
                    }
                }
            }), this.add("parens", "deletion", function(a, b, c, d, e) {
                var f = d.doc.getTextRange(e);
                if (!e.isMultiLine() && f == "(") {
                    var g = d.doc.getLine(e.start.row),
                        h = g.substring(e.start.column + 1, e.start.column + 2);
                    if (h == ")") return e.end.column++, e
                }
            }), this.add("string_dquotes", "insertion", function(a, b, c, d, e) {
                if (e == '"') {
                    var f = c.getSelectionRange(),
                        g = d.doc.getTextRange(f);
                    if (g !== "") return {
                        text: '"' + g + '"',
                        selection: !1
                    };
                    var h = c.getCursorPosition(),
                        i = d.doc.getLine(h.row),
                        j = i.substring(h.column - 1, h.column);
                    if (j == "\\") return null;
                    var k = d.getTokens(f.start.row, f.start.row)[0].tokens,
                        l = 0,
                        m, n = -1;
                    for (var o = 0; o < k.length; o++) {
                        m = k[o], m.type == "string" ? n = -1 : n < 0 && (n = m.value.indexOf('"'));
                        if (m.value.length + l > f.start.column) break;
                        l += k[o].value.length
                    }
                    if (!m || n < 0 && m.type !== "comment" && (m.type !== "string" || f.start.column !== m.value.length + l - 1 && m.value.lastIndexOf('"') === m.value.length - 1)) return {
                        text: '""',
                        selection: [1, 1]
                    };
                    if (m && m.type === "string") {
                        var p = i.substring(h.column, h.column + 1);
                        if (p == '"') return {
                            text: "",
                            selection: [1, 1]
                        }
                    }
                }
            }), this.add("string_dquotes", "deletion", function(a, b, c, d, e) {
                var f = d.doc.getTextRange(e);
                if (!e.isMultiLine() && f == '"') {
                    var g = d.doc.getLine(e.start.row),
                        h = g.substring(e.start.column + 1, e.start.column + 2);
                    if (h == '"') return e.end.column++, e
                }
            })
        };
    d.inherits(f, e), b.CstyleBehaviour = f
}), define("ace/mode/java_highlight_rules", ["require", "exports", "module", "pilot/oop", "pilot/lang", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function(a, b, c) {
    var d = a("pilot/oop"),
        e = a("pilot/lang"),
        f = a("ace/mode/doc_comment_highlight_rules").DocCommentHighlightRules,
        g = a("ace/mode/text_highlight_rules").TextHighlightRules,
        h = function() {
            var a = e.arrayToMap("abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while".split("|")),
                b = e.arrayToMap("null|Infinity|NaN|undefined".split("|")),
                c = e.arrayToMap("AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object".split("|")),
                d = e.arrayToMap("".split("|"));
            this.$rules = {
                start: [{
                    token: "comment",
                    regex: "\\/\\/.*$"
                }, (new f).getStartRule("doc-start"), {
                    token: "comment",
                    merge: !0,
                    regex: "\\/\\*",
                    next: "comment"
                }, {
                    token: "string.regexp",
                    regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
                }, {
                    token: "string",
                    regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
                }, {
                    token: "string",
                    regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
                }, {
                    token: "constant.numeric",
                    regex: "0[xX][0-9a-fA-F]+\\b"
                }, {
                    token: "constant.numeric",
                    regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
                }, {
                    token: "constant.language.boolean",
                    regex: "(?:true|false)\\b"
                }, {
                    token: function(e) {
                        return e == "this" ? "variable.language" : a.hasOwnProperty(e) ? "keyword" : c.hasOwnProperty(e) ? "support.function" : d.hasOwnProperty(e) ? "support.function" : b.hasOwnProperty(e) ? "constant.language" : "identifier"
                    },
                    regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
                }, {
                    token: "keyword.operator",
                    regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
                }, {
                    token: "lparen",
                    regex: "[[({]"
                }, {
                    token: "rparen",
                    regex: "[\\])}]"
                }, {
                    token: "text",
                    regex: "\\s+"
                }],
                comment: [{
                    token: "comment",
                    regex: ".*?\\*\\/",
                    next: "start"
                }, {
                    token: "comment",
                    merge: !0,
                    regex: ".+"
                }]
            }, this.embedRules(f, "doc-", [(new f).getEndRule("start")])
        };
    d.inherits(h, g), b.JavaHighlightRules = h
})