修改Enlighter高亮插件,添加自定义关键字

/*! EnlighterJS Syntax Highlighter 2.12.0 | MIT License (X11) | https://enlighterjs.org/ | May 16 2018 */
!
function() {
    var e = window.EnlighterJS = new Class({
        Implements: Options,
        options: {
            language: "generic",
            theme: "Enlighter",
            renderer: "Block",
            indent: -1,
            forceTheme: !1,
            rawButton: !0,
            windowButton: !0,
            infoButton: !0,
            ampersandCleanup: !0,
            rawcodeDoubleclick: !1
        },
        renderer: null,
        originalCodeblock: null,
        container: null,
        isRendered: !1,
        languageManager: null,
        rawContentContainer: null,
        output: null,
        textFilter: null,
        rawCode: null,
        initialize: function(t, n, a) {
            this.setOptions(n),
            this.languageManager = new e.LanguageManager(this.options),
            this.textFilter = new e.TextFilter(this.options),
            "Inline" == this.options.renderer ? this.renderer = new e.Renderer.InlineRenderer(this.options, this.textFilter) : this.renderer = new e.Renderer.BlockRenderer(this.options, this.textFilter),
            this.originalCodeblock = e.Dom.id(t),
            a && (this.container = e.Dom.id(a))
        },
        enlight: function(t) {
            if (t) {
                var n = this.originalCodeblock.get("data-enlighter-language");
                if ("no-highlight" == n) return;
                if (this.originalCodeblock.setStyle("display", "none"), this.isRendered) return this.container.setStyle("display", "inherit"),
                this;
                var a = this.languageManager.getLanguage(n),
                s = (this.options.forceTheme ? null: this.originalCodeblock.get("data-enlighter-theme")) || this.options.theme || "Enlighter",
                i = new e.SpecialLineHighlighter(this.originalCodeblock.get("data-enlighter-highlight"), this.originalCodeblock.get("data-enlighter-lineoffset")),
                r = new e.Language[a](this.getRawCode(!0));
                this.output = this.renderer.render(r, i, {
                    lineOffset: this.originalCodeblock.get("data-enlighter-lineoffset") || null,
                    lineNumbers: this.originalCodeblock.get("data-enlighter-linenumbers")
                }),
                this.output.addClass(s.toLowerCase() + "EnlighterJS").addClass("EnlighterJS"),
                "Block" == this.options.renderer ? (this.container || (this.container = new e.Dom.Element("div"), this.container.inject(this.originalCodeblock, "after")), this.container.addClass("EnlighterJSWrapper").addClass(s.toLowerCase() + "EnlighterJSWrapper"), this.container.grab(this.output), this.rawContentContainer = new e.Dom.Element("pre", {
                    text: this.getRawCode(!1),
                    styles: {
                        display: "none"
                    }
                }), this.container.grab(this.rawContentContainer), this.options.rawcodeDoubleclick && this.container.addEvent("dblclick",
                function() {
                    this.toggleRawCode()
                }.bind(this)), (this.options.rawButton || this.options.windowButton || this.options.infoButton) && this.container.grab(new e.UI.Toolbar(this))) : this.container ? this.container.grab(this.output) : (this.output.inject(this.originalCodeblock, "after"), this.container = this.output),
                this.isRendered = !0
            } else this.isRendered && (this.originalCodeblock.setStyle("display", "inherit"), this.container.setStyle("display", "none"));
            return this
        },
        dispose: function() {
            this.isRendered && (this.originalCodeblock.setStyle("display", null), this.container.setStyle("display", "none"), this.rawContentContainer.setStyle("display", "none"), this.container.dispose(), this.rawContentContainer.dispose(), this.container = null, this.rawContentContainer = null, this.isRendered = !1)
        },
        getRawCode: function(e) {
            var t = this.rawCode;
            if (null == t && (t = this.originalCodeblock.get("html"), t = t.replace(/(^\s*\n|\n\s*$)/gi, ""), t = this.textFilter.filterInput(t), this.options.ampersandCleanup === !0 && (t = t.replace(/&amp;/gim, "&")), t = t.replace(/&lt;/gim, "<").replace(/&gt;/gim, ">").replace(/&nbsp;/gim, " "), this.rawCode = t), e === !0) {
                var n = this.options.indent.toInt();
                n > -1 && (t = t.replace(/(\t*)/gim,
                function(e, t, a, s) {
                    return new Array(n * t.length + 1).join(" ")
                }))
            }
            return t
        },
        toggleRawCode: function(e) {
            null != this.output && ("boolean" != typeof e && (e = "none" == this.rawContentContainer.getStyle("display")), e ? (this.output.setStyle("display", "none"), this.rawContentContainer.setStyle("display", "block")) : (this.output.setStyle("display", "block"), this.rawContentContainer.setStyle("display", "none")))
        },
        light: function() {
            return this.enlight(!0)
        },
        unlight: function() {
            return this.enlight(!1)
        }
    });
    e.Language = {},
    e.Tokenizer = {},
    e.Renderer = {},
    e.Util = {},
    e.UI = {},
    e.TextFilter = new Class({
        Implements: Options,
        options: {
            cryptex: {
                enabled: !1,
                email: "protected.email@example.tld"
            }
        },
        initialize: function(e) {
            this.setOptions(e)
        },
        filterOutput: function(e) {
            return e
        },
        filterInput: function(e) {
            return this.options.cryptex.enabled === !0 && (e = e.replace(/<!--CTX!--><span (rel="([a-f0-9]+)")?[\s\S]*?<!--\/CTX!-->/gim,
            function(e, t, n, a, s) {
                return n && n.length > 2 && "undefined" != typeof window.Cryptex ? window.Cryptex.decode(n) : this.options.cryptex.email
            }.bind(this))),
            e
        }
    }),
    e.Dom = {
        getElement: function(e) {
            return document.getElement(e)
        },
        getElements: function(e) {
            return document.getElements(e)
        },
        id: function(e) {
            return document.id(e)
        }
    },
    e.Dom.Element = Element,
    e.SpecialLineHighlighter = new Class({
        specialLines: {},
        initialize: function(e, t) {
            if (null != e && 0 != e.length) {
                var n = null != t && t.toInt() > 1 ? t.toInt() - 1 : 0,
                a = e.split(",");
                a.each(function(e, t) {
                    var a = e.match(/([0-9]+)-([0-9]+)/);
                    if (null != a) {
                        var s = a[1].toInt() - n,
                        i = a[2].toInt() - n;
                        if (i > s) for (var r = s; i >= r; r++) this.specialLines["l" + r] = !0
                    } else this.specialLines["l" + (e.toInt() - n)] = !0
                }.bind(this))
            }
        },
        isSpecialLine: function(e) {
            return this.specialLines["l" + e] || !1
        }
    }),
    e.LanguageManager = new Class({
        Implements: Options,
        options: {
            language: "generic"
        },
        initialize: function(e) {
            this.setOptions(e)
        },
        languageAliases: {
            standard: "generic",
            js: "javascript",
            md: "markdown",
            "c++": "cpp",
            c: "cpp",
            styles: "css",
            bash: "shell",
            py: "python",
            html: "xml",
            jquery: "javascript",
            mootools: "javascript",
            "ext.js": "javascript",
            "c#": "csharp",
            conf: "ini"
        },
        getLanguage: function(t) {
            var n = null != this.options.language ? this.options.language.trim().toLowerCase() : "";
            return this.languageAliases[n] && (n = this.languageAliases[n]),
            "" != n.trim() && e.Language[n] || (n = "generic"),
            null == t || "" == t.trim() ? n: (t = t.trim().toLowerCase(), this.languageAliases[t] && (t = this.languageAliases[t]), e.Language[t] ? t: n)
        }
    }),
    e.Renderer.InlineRenderer = new Class({
        Implements: Options,
        options: {
            inlineContainerTag: "span"
        },
        textFilter: null,
        initialize: function(e, t) {
            this.setOptions(e),
            this.textFilter = t
        },
        render: function(t, n, a) {
            var s = new e.Dom.Element(this.options.inlineContainerTag);
            return t.getTokens().each(function(t, n) {
                s.grab(new e.Dom.Element("span", {
                    "class": t.alias,
                    text: this.textFilter.filterOutput(t.text)
                }))
            },
            this),
            s
        }
    }),
    e.Renderer.BlockRenderer = new Class({
        Implements: Options,
        options: {
            hover: "hoverEnabled",
            oddClassname: "odd",
            evenClassname: "even",
            showLinenumbers: !0
        },
        textFilter: null,
        initialize: function(e, t) {
            this.setOptions(e),
            this.textFilter = t
        },
        render: function(t, n, a) {
            var s = e.Dom.Element,
            i = null;
            i = new s(null != a.lineNumbers ? "true" === a.lineNumbers.toLowerCase() ? "ol": "ul": this.options.showLinenumbers ? "ol": "ul"),
            (a.lineNumbers || this.options.showLinenumbers) && a.lineOffset && a.lineOffset.toInt() > 1 && i.set("start", a.lineOffset);
            var r = 1,
            o = t.getTokens(),
            l = " " + this.options.oddClassname || "",
            c = " " + this.options.evenClassname || "",
            m = new s("li", {
                "class": (n.isSpecialLine(r) ? "specialline": "") + l
            }),
            g = function(e, t) {
                m.grab(new s("span", {
                    "class": e,
                    text: this.textFilter.filterOutput(t)
                }))
            }.bind(this);
            return Array.each(o,
            function(e) {
                var t = e.text.split("\n");
                t.length > 1 ? (g(e.alias, t.shift()), Array.each(t,
                function(t, a) {
                    i.grab(m),
                    r++,
                    m = new s("li", {
                        "class": (n.isSpecialLine(r) ? "specialline": "") + (r % 2 == 0 ? c: l)
                    }),
                    g(e.alias, t)
                })) : g(e.alias, e.text)
            }),
            i.grab(m),
            this.options.hover && "NULL" != this.options.hover && i.addClass(this.options.hover),
            i
        }
    }),
    e.Tokenizer.Standard = new Class({
        initialize: function() {},
        getTokens: function(e, t) {
            var n = function(e, t, n) {
                return {
                    text: e,
                    alias: t,
                    index: n,
                    length: e.length,
                    end: e.length + n
                }
            },
            a = this.getPreprocessedTokens(n),
            s = [];
            Array.each(e.getRules(),
            function(e) {
                for (var s; s = e.pattern.exec(t);) if (e.pattern.lastIndex = s.index + 1, 1 == s.length) a.push(n(s[0], e.alias, s.index));
                else for (var i = 1; i < s.length; i++) s[i] && s[i].length > 0 && a.push(n(s[i], e.alias, s.index + s[0].indexOf(s[i])))
            }),
            a = a.sort(function(e, t) {
                return e.index - t.index
            });
            for (var s = [], i = 0, r = 0; r < a.length; r++) {
                i < a[r].index && s.push(n(t.substring(i, a[r].index), "", i)),
                s.push(a[r]),
                i = a[r].end;
                for (var o = !1,
                l = r + 1; l < a.length; l++) if (a[l].index >= i) {
                    r = l - 1,
                    o = !0;
                    break
                }
                if (o === !1) break
            }
            return i < t.length && s.push(n(t.substring(i), "", i)),
            s
        },
        getPreprocessedTokens: function(e) {
            return []
        }
    }),
    EnlighterJS.Tokenizer.Xml = new Class({
        Extends: EnlighterJS.Tokenizer.Standard,
        code: null,
        getTokens: function(e, t) {
            return this.code = t,
            this.parent(e, t)
        },
        getPreprocessedTokens: function(e) {
            for (var t = [], n = /((?:\&lt;|<)[A-Z:_][A-Z0-9:._-]*)([\s\S]*?)(\/?(?:\&gt;|>))/gi, a = /\b([\w:-]+)([ \t]*)(=)([ \t]*)(['"][^'"]+['"]|[^'" \t]+)/gi, s = null, i = null, r = 0; null != (s = n.exec(this.code));) {
                for (t.push(e(s[1], "kw1", s.index)); null != (i = a.exec(s[2]));) r = s.index + s[1].length + i.index,
                t.push(e(i[1], "kw2", r)),
                r += i[1].length + i[2].length,
                t.push(e(i[3], "kw1", r)),
                r += i[3].length + i[4].length,
                t.push(e(i[5], "st0", r));
                t.push(e(s[3], "kw1", s.index + s[1].length + s[2].length))
            }
            return t
        }
    }),
    e.UI.CodeWindow = function(e) {
        e = e.replace(/&/gim, "&amp;").replace(/</gim, "&lt;").replace(/>/gim, "&gt;");
        var t = window.open("", "", "width=" + (window.screen.width - 200) + ", height=" + (screen.height - 300) + ", menubar=no, titlebar=no, toolbar=no, top=100, left=100, scrollbars=yes, status=no");
        t.document.body.innerHTML = "<pre>" + e + "</pre>",
        t.document.title = "EnlighterJS Sourcecode"
    },
    e.UI.Toolbar = new Class({
        Implements: Options,
        options: {
            toolbar: {
                rawTitle: "Toggle RAW Code",
                windowTitle: "Open Code in new Window",
                infoTitle: "EnlighterJS Syntax Highlighter"
            }
        },
        container: null,
        initialize: function(t) {
            this.setOptions(t.options),
            this.container = new e.Dom.Element("div", {
                "class": "EnlighterJSToolbar"
            }),
            this.options.infoButton && this.container.grab(new e.Dom.Element("a", {
                "class": "EnlighterJSInfoButton",
                title: this.options.toolbar.infoTitle,
                events: {
                    click: function() {
                        window.open("http://enlighterjs.org")
                    }.bind(this)
                }
            })),
            this.options.rawButton && this.container.grab(new e.Dom.Element("a", {
                "class": "EnlighterJSRawButton",
                title: this.options.toolbar.rawTitle,
                events: {
                    click: function() {
                        t.toggleRawCode()
                    }.bind(this)
                }
            })),
            this.options.windowButton && this.container.grab(new e.Dom.Element("a", {
                "class": "EnlighterJSWindowButton",
                title: this.options.toolbar.windowTitle,
                events: {
                    click: function() {
                        e.UI.CodeWindow(t.getRawCode(!1))
                    }.bind(this)
                }
            })),
            this.container.grab(new e.Dom.Element("span", {
                "class": "clear"
            }))
        },
        toElement: function() {
            return this.container
        }
    }),
    Element.implement({
        enlight: function(t) {
            t = "undefined" == typeof t ? {}: t,
            t = t === !0 ? {}: t;
            var n = this.retrieve("EnlighterInstance");
            return "dispose" === t && n ? (n.dispose(), this.eliminate("EnligterInstance"), this) : (t === !1 ? null !== n && n.enlight(!1) : (null === n && (n = new e(this, t, null), this.store("EnlighterInstance", n)), n.enlight(t)), this)
        },
        light: function(e) {
            return this.enlight(e)
        },
        unlight: function() {
            return this.enlight(!1)
        }
    }),
    e.Util.Helper = function(t, n) {
        if (! (null == t || t.length && 0 == t.length)) if (n = n || {},
        n.grouping && n.grouping === !1) t.enlight(n);
        else {
            var a = {},
            s = [];
            Array.each(t,
            function(e) {
                var t = e.get("data-enlighter-group");
                t ? a[t] ? a[t].push(e) : a[t] = [e] : s.push(e)
            }),
            s.each(function(e) {
                e.enlight(n)
            }),
            Object.each(a,
            function(t) {
                var a = Object.clone(n);
                a.forceTheme = !0,
                a.theme = t[0].get("data-enlighter-theme") || n.theme || "Enlighter";
                var s = new e.UI.TabPane(a.theme);
                Array.each(t,
                function(t, n) {
                    var i = s.addTab(t.get("data-enlighter-title") || t.get("data-enlighter-language") || a.language);
                    new e(t, a, i).enlight(!0)
                }.bind(this)),
                s.getContainer().inject(t[0], "before"),
                s.selectTab(0)
            }.bind(this))
        }
    },
    e.UI.TabPane = new Class({
        container: null,
        controlContainer: null,
        paneContainer: null,
        tabs: [],
        selectedTabIndex: 0,
        initialize: function(t) {
            this.container = new e.Dom.Element("div", {
                "class": "EnlighterJSTabPane " + t.toLowerCase() + "EnlighterJSTabPane"
            }),
            this.controlContainer = new e.Dom.Element("ul"),
            this.paneContainer = new e.Dom.Element("div", {
                "class": "pane"
            });
            var n = new e.Dom.Element("div", {
                "class": "controls"
            });
            n.grab(this.controlContainer),
            this.container.grab(n),
            this.container.grab(this.paneContainer)
        },
        selectTab: function(e) {
            e < this.tabs.length && (this.tabs[this.selectedTabIndex].pane.setStyle("display", "none"), this.tabs[this.selectedTabIndex].control.removeClass("selected"), this.tabs[e].pane.setStyle("display", "block"), this.tabs[e].control.addClass("selected"), this.selectedTabIndex = e)
        },
        addTab: function(t) {
            var n = new e.Dom.Element("li", {
                text: t
            });
            this.controlContainer.grab(n);
            var a = this.tabs.length;
            n.addEvent("click",
            function() {
                this.selectTab(a)
            }.bind(this));
            var s = new e.Dom.Element("div", {
                styles: {
                    display: "none"
                }
            });
            return this.paneContainer.grab(s),
            this.tabs.push({
                control: n,
                pane: s
            }),
            s
        },
        getContainer: function() {
            return this.container
        }
    }),
    window.addEvent("domready",
    function() {
        var t = e.Dom.getElement('meta[name="EnlighterJS"]');
        if (t) {
            var n = {
                language: t.get("data-language") || "generic",
                theme: t.get("data-theme") || "Enlighter",
                indent: t.get("data-indent").toInt() || -1,
                hover: t.get("data-hover") || "hoverEnabled",
                rawButton: "true" === t.get("data-rawcodebutton"),
                windowButton: "true" === t.get("data-windowbutton"),
                infoButton: "true" === t.get("data-infobutton"),
                showLinenumbers: "false" !== t.get("data-linenumbers")
            },
            a = t.get("data-selector-block") || "pre",
            s = t.get("data-selector-inline") || "code";
            "NULL" != a && (n.renderer = "Block", e.Util.Helper(e.Dom.getElements(a), n)),
            "NULL" != s && (n.renderer = "Inline", n.grouping = !1, e.Util.Helper(e.Dom.getElements(s), n))
        }
    }),
    e.Util.Init = function(t, n, a) {
        a = a || {},
        t && (a.renderer = "Block", e.Util.Helper(e.Dom.getElements(t), a)),
        n && (a.renderer = "Inline", a.grouping = !1, e.Util.Helper(e.Dom.getElements(n), a))
    },
    e.Language.generic = new Class({
        tokenizerType: "Standard",
        tokenizer: null,
        code: null,
        patterns: {},
        keywords: {},
        delimiters: {
            start: null,
            end: null
        },
        common: {
            slashComments: /(?:^|[^\\])\/\/.*$/gm,
            poundComments: /#.*$/gm,
            multiComments: /\/\*[\s\S]*?\*\//gm,
            aposStrings: /'[^'\\]*(?:\\.[^'\\]*)*'/gm,
            quotedStrings: /"[^"\\]*(?:\\.[^"\\]*)*"/gm,
            multiLineSingleQuotedStrings: /'[^'\\]*(?:\\.[^'\\]*)*'/gm,
            multiLineDoubleQuotedStrings: /"[^"\\]*(?:\\.[^"\\]*)*"/gm,
            multiLineStrings: /'[^'\\]*(?:\\.[^'\\]*)*'|"[^"\\]*(?:\\.[^"\\]*)*"/gm,
            singleQuotedString: /'[^'\\\r\n]*(?:\\.[^'\\\r\n]*)*'/gm,
            doubleQuotedString: /"[^"\\\r\n]*(?:\\.[^"\\\r\n]*)*"/gm,
            strings: /'[^'\\\r\n]*(?:\\.[^'\\\r\n]*)*'|"[^"\\\r\n]*(?:\\.[^"\\\r\n]*)*"/gm,
            properties: /\.([\w]+)\s*/gi,
            methodCalls: /\.([\w]+)\s*\(/gm,
            functionCalls: /\b([\w]+)\s*\(/gm,
            brackets: /\{|}|\(|\)|\[|]/g,
            numbers: /\b((?:(\d+)?\.)?[0-9]+|0x[0-9A-F]+)\b/gi
        },
        initialize: function(e) {
            this.setupLanguage(),
            this.rules = [],
            this.code = e,
            this.tokenizer = new EnlighterJS.Tokenizer[this.tokenizerType],
            this.delimiters.start && this.rules.push({
                pattern: this.delimiters.start,
                alias: "de1"
            }),
            this.delimiters.end && this.rules.push({
                pattern: this.delimiters.end,
                alias: "de2"
            }),
            Object.each(this.keywords,
            function(e, t) {
                "" != e.csv && this.rules.push({
                    pattern: this.csvToRegExp(e.csv, e.mod || "g"),
                    alias: e.alias
                })
            },
            this),
            Object.each(this.patterns,
            function(e, t) {
                this.rules.push(e)
            },
            this)
        },
        getRuleByName: function(e) {},
        setupLanguage: function() {
            this.patterns = {
                strings: {
                    pattern: this.common.strings,
                    alias: "st0"
                },
                fn: {
                    pattern: this.common.functionCalls,
                    alias: "kw1"
                },
                me: {
                    pattern: this.common.methodCalls,
                    alias: "kw2"
                },
                brackets: {
                    pattern: this.common.brackets,
                    alias: "br0"
                },
                numbers: {
                    pattern: this.common.numbers,
                    alias: "nu0"
                },
                comment0: {
                    pattern: this.common.slashComments,
                    alias: "co1"
                },
                comment1: {
                    pattern: this.common.poundComments,
                    alias: "co1"
                },
                comment3: {
                    pattern: this.common.multiComments,
                    alias: "co2"
                }
            }
        },
        getTokens: function() {
            return this.tokenizer.getTokens(this, this.code)
        },
        getRules: function() {
            return this.rules
        },
        csvToRegExp: function(e, t) {
            return new RegExp("\\b(" + e.replace(/,\s*/g, "|") + ")\\b", t)
        },
        delimToRegExp: function(e, t, n, a, s) {
            e = e.escapeRegExp(),
            t && (t = t.escapeRegExp()),
            n = n ? n.escapeRegExp() : e;
            var i = t ? e + "[^" + n + t + "\\n]*(?:" + t + ".[^" + n + t + "\\n]*)*" + n: e + "[^" + n + "\\n]*" + n;
            return new RegExp(i + (s || ""), a || "")
        },
        strictRegExp: function() {
            for (var e = "(",
            t = 0; t < arguments.length; t++) e += arguments[t].escapeRegExp(),
            e += t < arguments.length - 1 ? "|": "";
            return e += ")",
            new RegExp(e, "gim")
        }
    }),
    e.Language.asm = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.patterns = {
                singleLineComments: {
                    pattern: /(;.*)$/gm,
                    alias: "co1"
                },
                controls: {
                    pattern: /(\$.*)$/gm,
                    alias: "co2"
                },
                strings: {
                    pattern: this.common.strings,
                    alias: "st0"
                },
                instruction: {
                    pattern: /(^|:)\s*?(\w+)\s+/gm,
                    alias: "kw3"
                },
                label: {
                    pattern: /^\s*?([A-Z\?_][A-Z0-9\?_]+:)\s*?/gim,
                    alias: "kw1"
                },
                indirect: {
                    pattern: /@\w+/gi,
                    alias: "kw4"
                },
                immediate: {
                    pattern: /#\w+/gi,
                    alias: "kw4"
                },
                hex: {
                    pattern: /[A-F0-9][A-F0-9$]+?H/gi,
                    alias: "nu0"
                },
                integer: {
                    pattern: /\d[\d$]+?D/gi,
                    alias: "nu0"
                },
                binary: {
                    pattern: /[01][01$]+?B/gi,
                    alias: "nu0"
                },
                octals: {
                    pattern: /[0-7][0-7$]+?(?:Q|O)/gi,
                    alias: "nu0"
                },
                hex2: {
                    pattern: /(0x[A-F0-9]+|\$[A-F0-9]+)/gi,
                    alias: "nu0"
                },
                binary2: {
                    pattern: /(0b[01]+)/g,
                    alias: "nu0"
                },
                integer2: {
                    pattern: /\b(\d+)/g,
                    alias: "nu0"
                },
                functions: {
                    pattern: this.common.functionCalls,
                    alias: "me0"
                }
            }
        }
    }),
    e.Language.avrasm = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.patterns = {
                singleLineComments: {
                    pattern: /(;.*)$/gm,
                    alias: "co1"
                },
                directives: {
                    pattern: /^\s*?\.(\w+)\s+/gm,
                    alias: "kw1"
                },
                register: {
                    pattern: /\b(r\d{1,2})/gi,
                    alias: "kw1"
                },
                macroparam: {
                    pattern: /(@[0-9])/gi,
                    alias: "kw4"
                },
                label: {
                    pattern: /^\s*?(\w+:)\s*?/gm,
                    alias: "kw3"
                },
                instruction: {
                    pattern: /(^|:)\s*?(\w+)\s+/gm,
                    alias: "kw3"
                },
                strings: {
                    pattern: this.common.strings,
                    alias: "st0"
                },
                hex: {
                    pattern: /(0x[A-F0-9]+|\$[A-F0-9]+)/gi,
                    alias: "nu0"
                },
                binary: {
                    pattern: /(0b[01]+)/g,
                    alias: "nu0"
                },
                integer: {
                    pattern: /\b(\d+)/g,
                    alias: "nu0"
                },
                functions: {
                    pattern: this.common.functionCalls,
                    alias: "me0"
                },
                ioregister: {
                    pattern: /\b[A-Z]{2,}[0-9]?[0-9]?\b/g,
                    alias: "kw4"
                }
            }
        }
    }),
    EnlighterJS.Language.css = new Class({
        Extends: EnlighterJS.Language.generic,
        setupLanguage: function() {
            this.keywords = {},
            this.patterns = {
                comments2: {
                    pattern: /\/\*![\s\S]*?\*\//gm,
                    alias: "co2"
                },
                comments: {
                    pattern: this.common.multiComments,
                    alias: "co1"
                },
                strings: {
                    pattern: this.common.strings,
                    alias: "st0"
                },
                selectors: {
                    pattern: /(?:^|}|\/)\s*([^\\\/{@]+)\s*\{/gi,
                    alias: "kw1"
                },
                directives: {
                    pattern: /(@[a-z]+)\s+/gi,
                    alias: "kw2"
                },
                rules: {
                    pattern: /([\w-]+)\s*:/g,
                    alias: "kw3"
                },
                uri: {
                    pattern: /url\s*\([^\)]*\)/gi,
                    alias: "kw4"
                },
                units: {
                    pattern: /\b(\d+[\.\d+-]?\s*(%|[a-z]{1,3})?)/gi,
                    alias: "nu0"
                },
                hexColors: {
                    pattern: /(#[A-F0-9]{3}([A-F0-9]{3})?)\b/gi,
                    alias: "nu0"
                },
                brackets: {
                    pattern: this.common.brackets,
                    alias: "br0"
                },
                symbols: {
                    pattern: /,|\.|;|:|>/g,
                    alias: "sy0"
                }
            }
        }
    }),
    e.Language.cpp = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.keywords = {
                cpp: {
                    csv: "and,and_eq,asm,bitand,bitor,break,case,catch,class,compl,const,const_cast,continue,default,delete,do,dynamic_cast,else,enum,explicit,export,extern,for,friend,goto,if,inline,mutable,namespace,new,not,not_eq,operator,or,or_eq,private,protected,public,reinterpret_cast,return,signed,sizeof,static,static_cast,struct,switch,template,this,throw,try,typedef,typeid,typename,union,unsigned,using,virtual,volatile,while,xor,xor_eq",
                    alias: "kw1"
                },
                cppX11: {
                    csv: "alignas,alignof,char16_t,char32_t,constexpr,decltype,noexcept,nullptr,static_assert,thread_local",
                    alias: "kw4"
                },
                directives: {
                    csv: "__LINE__,__FILE__,__DATE__,__TIME__,__cplusplus",
                    alias: "kw2"
                },
                            cppMFC: {
                                   csv: "CAnimateCtrl,CArchive,CArchiveException,CArray,CAsyncMonikerFile,CAsyncSocket,CBitmap,CBitmapButton,CBrush,CButton,CByteArray,CCachedDataPathProperty,CCheckListBox,CClientDC,CCmdTarget,CCmdUI,CColorDialog,CComboBox,CComboBoxEx,CCommandLineInfo,CCommonDialog,CConnectionPoint,CControlBar,CCriticalSection,CCtrlView,CDBException,CDBVariant,CDC,CDHtmlDialog,CDWordArray,CDaoDatabase,CDaoException,CDaoFieldExchange,CDaoQueryDef,CDaoRecordView,CDaoRecordset,CDaoTableDef,CDaoWorkspace,CDataExchange,CDataPathProperty,CDatabase,CDateTimeCtrl,CDialog,CDialogBar,CDocItem,CDocObjectServer,CDocObjectServerItem,CDocTemplate,CDockState,CDocument,CDragListBox,CDumpContext,CEdit,CEditView,CEvent,CException,CFieldExchange,CFile,CFileDialog,CFileException,CFileFind,CFileTime,CFileTimeSpan,CFindReplaceDialog,CFixedStringT,CFont,CFontDialog,CFontHolder,CFormView,CFrameWnd,CFtpConnection,CFtpFileFind,CGdiObject,CGopherConnection,CGopherFile,CGopherFileFind,CGopherLocator,CHeaderCtrl,CHotKeyCtrl,CHtmlEditCtrl,CHtmlEditCtrlBase,CHtmlEditDoc,CHtmlEditView,CHtmlView,CHttpConnection,CHttpFile,CIPAddressCtrl,CImage,CImageList,CInternetConnection,CInternetException,CInternetFile,CInternetSession,CLinkCtrl,CList,CListBox,CListCtrl,CListView,CLongBinary,CMDIChildWnd,CMDIFrameWnd,CMap,CMapPtrToPtr,CMapPtrToWord,CMapStringToOb,CMapStringToPtr,CMapStringToString,CMapWordToOb,CMapWordToPtr,CMemFile,CMemoryException,CMenu,CMetaFileDC,CMiniFrameWnd,CMonikerFile,CMonthCalCtrl,CMultiDocTemplate,CMultiLock,CMultiPageDHtmlDialog,CMutex,CNetAddressCtrl,CNotSupportedException,CObArray,CObList,CObject,COccManager,COleBusyDialog,COleChangeIconDialog,COleChangeSourceDialog,COleClientItem,COleCmdUI,COleControl,COleControlContainer,COleControlModule,COleControlSite,COleConvertDialog,COleCurrency,COleDBRecordView,COleDataObject,COleDataSource,COleDateTime,COleDateTimeSpan,COleDialog,COleDispatchDriver,COleDispatchException,COleDocObjectItem,COleDocument,COleDropSource,COleDropTarget,COleException,COleIPFrameWnd,COleInsertDialog,COleLinkingDoc,COleLinksDialog,COleMessageFilter,COleObjectFactory,COlePasteSpecialDialog,COlePropertiesDialog,COlePropertyPage,COleResizeBar,COleSafeArray,COleServerDoc,COleServerItem,COleStreamFile,COleTemplateServer,COleUpdateDialog,COleVariant,CPageSetupDialog,CPagerCtrl,CPaintDC,CPalette,CPen,CPictureHolder,CPoint,CPrintDialog,CPrintDialogEx,CProgressCtrl,CPropExchange,CPropertyPage,CPropertySheet,CPtrArray,CPtrList,CReBar,CReBarCtrl,CRecentFileList,CRecordView,CRecordset,CRect,CRectTracker,CResourceException,CRgn,CRichEditCntrItem,CRichEditCtrl,CRichEditDoc,CRichEditView,CScrollBar,CScrollView,CSemaphore,CSharedFile,CSimpleStringT,CSingleDocTemplate,CSingleLock,CSize,CSliderCtrl,CSocket,CSocketFile,CSpinButtonCtrl,CSplitButton,CSplitterWnd,CStatic,CStatusBar,CStatusBarCtrl,CStdioFile,CStrBuf,CString,CStringArray,CStringData,CStringList,CSyncObject,CTabCtrl,CTime,CTimeSpan,CToolBar,CToolBarCtrl,CToolTipCtrl,CTreeCtrl,CTreeView,CTypedPtrArray,CTypedPtrList,CTypedPtrMap,CUIntArray,CUserException,CView,CWaitCursor,CWinApp,CWinThread,CWindowDC,CWnd,CWordArray,Class",
                                   alias: "kw3"
                            },
                            cppWin32: {
                                   csv: "ULONG,PULONG,USHORT,PUSHORT,UCHAR,PUCHAR,PSZ,DWORD,BOOL,BYTE,WORD,FLOAT,PFLOAT,PBOOL,LPBOOL,PBYTE,LPBYTE,PINT,LPINT,PWORD,LPWORD,LPLONG,PDWORD,LPDWORD,LPVOID,LPCVOID,INT,UINT,PUINT,WPARAM,LPARAM,LRESULT,ATOM,SPHANDLE,LPHANDLE,HGLOBAL,HLOCAL,GLOBALHANDLE,LOCALHANDLE,HGDIOBJ,PHKEY,HMODULE,HFILE,HCURSOR,HFILE,COLORREF,LPCOLORREF,tagRECT,LPCRECT,_RECTL,LPCRECTL,tagPOINT,_POINTL,tagSIZE,SIZEL,LPSIZEL,tagPOINTS,_FILETIME",
                                   alias: "kw3"
                            },
                cppBaseType: {
                    csv: "auto,bool,char,double,false,float,int,long,wchar_t,true,register,short,void",
                    alias: "kw3"
                },
                cppMyCls: {
                    csv: "CAPI,CASM,CASMCompileData,CAliEditEncrypt,CAlipayEditCtrl,CAntiC,CAntiVC,CBinaryStream,CConfigFile,CDebug,CEncrypt,CGlobalMgr,CHWID,CHook,CHookApi,CIPManager,CJVMLoader,CMCLicense,CMail_21cn,CMail_IMAP,CMail_POP3,CMail_WangyiWAP,CMail_sina,CMail_sohu,CMail_wangyi,CMemory,CMemoryMap,CModemSoft,CPS,CRK_Interface,CRas,CRemoteAnswer,CSHA1,CSRAnswer,CSRDialog,CSRDiasm,CSRFile,CSRHttp,CSRInterface,CSRLogEdit,CSRMail,CSRMsg,CSRNetWork,CSRProcess,CSRPropertyItem,CSRRegKey,CSRSocketComm,CSRStudioApp,CSRTemplateDlg,CSRTmplateMemoryFileArray<_SR_TMFA>,CSRVCodeInputDlg,CSRWinApp,CSRWnd,CSYS,CSafeArrayHelper,CScriptObject,CSendData,CStr,CSysHook,CSystemClear,CTxtOutFile,CUi,CUtils,CXMLReader,CckStudio,ClsGetExportFunction,Json,tinyxml2,CSRHttpServer,CSRIOCPS,CSRWebSocket,CSRCollection,CStream",
                    alias: "kw3"
                }
            },
            this.patterns = {
                slashComments: {
                    pattern: this.common.slashComments,
                    alias: "co1"
                },
                multiComments: {
                    pattern: this.common.multiComments,
                    alias: "co2"
                },
                chars: {
                    pattern: this.common.singleQuotedString,
                    alias: "st0"
                },
                strings: {
                    pattern: this.common.doubleQuotedString,
                    alias: "st1"
                },
                annotation: {
                    pattern: /@[\W\w_][\w\d_]+/gm,
                    alias: "st1"
                },
                numbers: {
                    pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim,
                    alias: "nu0"
                },
                properties: {
                    pattern: this.common.properties,
                    alias: "me0"
                },
                brackets: {
                    pattern: this.common.brackets,
                    alias: "br0"
                },
                functionCalls: {
                    pattern: this.common.functionCalls,
                    alias: "de1"
                },
                directives: {
                    pattern: /#.*$/gm,
                    alias: "kw2"
                }
            }
        }
    }),
    e.Language.csharp = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.keywords = {
                reserved: {
                    csv: "as, base, break, case, catch, checked, continue, default, do, else, event, explicit, false, finally, fixed, for, foreach, goto, if, implicit, internal, is, lock, namespace, new, null, operator, params, private, protected, public, ref, return, sizeof, stackalloc, switch, this, throw, true, try, typeof, unchecked, using, void, while",
                    alias: "kw1"
                },
                keywords: {
                    csv: "abstract, async, class, const, delegate, dynamic, event, extern, in, interface, out, override, readonly, sealed, static, unsafe, virtual, volatile",
                    alias: "kw3"
                },
                primitives: {
                    csv: "bool, byte, char, decimal, double, enum, float, int, long, sbyte, short, struct, uint, ulong, ushort, object, string",
                    alias: "kw2"
                },
                internal: {
                    csv: "System",
                    alias: "kw4"
                }
            },
            this.patterns = {
                slashComments: {
                    pattern: this.common.slashComments,
                    alias: "co1"
                },
                multiComments: {
                    pattern: this.common.multiComments,
                    alias: "co2"
                },
                chars: {
                    pattern: this.common.singleQuotedString,
                    alias: "st0"
                },
                strings: {
                    pattern: this.common.doubleQuotedString,
                    alias: "st1"
                },
                numbers: {
                    pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim,
                    alias: "nu0"
                },
                brackets: {
                    pattern: this.common.brackets,
                    alias: "br0"
                },
                functionCalls: {
                    pattern: this.common.functionCalls,
                    alias: "me0"
                },
                methodCalls: {
                    pattern: this.common.methodCalls,
                    alias: "me1"
                }
            }
        }
    }),
    e.Language.diff = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.keywords = {},
            this.patterns = {
                comments: {
                    pattern: /^((---|\+\+\+) .*)/gm,
                    alias: "co1"
                },
                stats: {
                    pattern: /^(@@.*@@\s*)/gm,
                    alias: "nu0"
                },
                add: {
                    pattern: /^(\+.*)/gm,
                    alias: "re0"
                },
                del: {
                    pattern: /^(-.*)/gm,
                    alias: "st0"
                }
            }
        }
    }),
    e.Language.ini = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.keywords = {},
            this.patterns = {
                singleLineComments: {
                    pattern: /(;.*)$/gm,
                    alias: "co1"
                },
                section: {
                    pattern: /^\s*?(\[.*\])\s*?$/gm,
                    alias: "kw4"
                },
                directive: {
                    pattern: /^\s*?[a-z0-9\._-]+\s*?=/gim,
                    alias: "kw1"
                },
                "boolean": {
                    pattern: /\b(true|false|on|off|yes|no)\b/gim,
                    alias: "kw2"
                },
                strings: {
                    pattern: this.common.doubleQuotedString,
                    alias: "st1"
                },
                numbers: {
                    pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)[a-z]*?\b/gim,
                    alias: "nu0"
                },
                brackets: {
                    pattern: this.common.brackets,
                    alias: "br0"
                }
            }
        }
    }),
    e.Language.java = new Class({
        Extends: e.Language.generic,
        setupLanguage: function(e) {
            this.keywords = {
                reserved: {
                    csv: "continue, for, new, switch, assert, default, goto, synchronized, do, if, this, break, throw, else, throws, case, instanceof, return, transient, catch, try, final, finally, strictfp, volatile, const, native, super, while",
                    alias: "kw1"
                },
                keywords: {
                    csv: "abstract, package, private, implements, protected, public, import, extends, interface, static, void, class",
                    alias: "kw3"
                },
                primitives: {
                    csv: "byte, short, int, long, float, double, boolean, char, String",
                    alias: "kw2"
                },
                internal: {
                    csv: "System",
                    alias: "kw4"
                }
            },
            this.patterns = {
                slashComments: {
                    pattern: this.common.slashComments,
                    alias: "co1"
                },
                multiComments: {
                    pattern: this.common.multiComments,
                    alias: "co2"
                },
                chars: {
                    pattern: this.common.singleQuotedString,
                    alias: "st0"
                },
                strings: {
                    pattern: this.common.doubleQuotedString,
                    alias: "st1"
                },
                annotation: {
                    pattern: /@[\W\w_][\w\d_]+/gm,
                    alias: "st1"
                },
                numbers: {
                    pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim,
                    alias: "nu0"
                },
                properties: {
                    pattern: this.common.properties,
                    alias: "me0"
                },
                brackets: {
                    pattern: this.common.brackets,
                    alias: "br0"
                },
                functionCalls: {
                    pattern: this.common.functionCalls,
                    alias: "kw1"
                }
            }
        }
    }),
    e.Language.javascript = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.keywords = {
                commonKeywords: {
                    csv: "as, break, case, catch, continue, delete, do, else, eval, finally, for, if, in, is, instanceof, return, switch, this, throw, try, typeof, void, while, write, with",
                    alias: "kw1"
                },
                langKeywords: {
                    csv: "class, const, default, debugger, export, extends, false, function, import, namespace, new, null, package, private, protected, public, super, true, use, var",
                    alias: "kw2"
                },
                windowKeywords: {
                    csv: "alert, confirm, open, print, prompt",
                    alias: "kw3"
                }
            },
            this.patterns = {
                slashComments: {
                    pattern: this.common.slashComments,
                    alias: "co1"
                },
                multiComments: {
                    pattern: this.common.multiComments,
                    alias: "co2"
                },
                strings: {
                    pattern: this.common.strings,
                    alias: "st0"
                },
                methodCalls: {
                    pattern: this.common.properties,
                    alias: "me0"
                },
                brackets: {
                    pattern: this.common.brackets,
                    alias: "br0"
                },
                numbers: {
                    pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+)\b/gi,
                    alias: "nu0"
                },
                regex: {
                    pattern: this.delimToRegExp("/", "\\", "/", "g", "[gimy]*"),
                    alias: "re0"
                },
                symbols: {
                    pattern: /\+|-|\*|\/|%|!|@|&|\||\^|\<|\>|=|,|\.|;|\?|:/g,
                    alias: "sy0"
                }
            },
            this.delimiters = {
                start: this.strictRegExp('<script type="text/javascript">', '<script language="javascript">'),
                end: this.strictRegExp("</script>")
            }
        }
    }),
    e.Language.json = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.keywords = {
                values: {
                    csv: "true, false, null",
                    alias: "kw2"
                }
            },
            this.patterns = {
                keys: {
                    pattern: /("[^"\\\r\n]+?")\s*?:/gi,
                    alias: "kw1"
                },
                strings: {
                    pattern: this.common.strings,
                    alias: "st0"
                },
                brackets: {
                    pattern: this.common.brackets,
                    alias: "br0"
                },
                numbers: {
                    pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+)\b/gi,
                    alias: "nu0"
                },
                symbols: {
                    pattern: /,|:/g,
                    alias: "sy0"
                }
            },
            this.delimiters = {}
        }
    }),
    e.Language.kotlin = new Class({
        Extends: e.Language.generic,
        setupLanguage: function(e) {
            this.keywords = {
                reserved: {
                    csv: "package, as, typealias, class, this, super, val, var, fun, for, null, true, false, is, in, throw, return, break, continue, object, if, try, finally, else, while, do, when, interface, typeof",
                    alias: "kw1"
                },
                keywords: {
                    csv: "import, typealias, constructor, by, where, to, init, companion, abstract, final, enum, open, annotation, sealed, data, lateinit, override, private, protected, public, internal, vararg, noinline, crossinline, reified, const, suspend, tailrec, operator, infix, inline, external",
                    alias: "kw2"
                }
            },
            this.patterns = {
                slashComments: {
                    pattern: this.common.slashComments,
                    alias: "co1"
                },
                multiComments: {
                    pattern: this.common.multiComments,
                    alias: "co2"
                },
                chars: {
                    pattern: this.common.singleQuotedString,
                    alias: "st0"
                },
                multiLineStrings: {
                    pattern: /"""[\s\S]*"""/gm,
                    alias: "st1"
                },
                strings: {
                    pattern: this.common.doubleQuotedString,
                    alias: "st1"
                },
                annotation: {
                    pattern: /@[\W\w_][\w\d_]+/gm,
                    alias: "st1"
                },
                numbers: {
                    pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim,
                    alias: "nu0"
                },
                properties: {
                    pattern: this.common.properties,
                    alias: "me0"
                },
                brackets: {
                    pattern: this.common.brackets,
                    alias: "br0"
                },
                functionCalls: {
                    pattern: this.common.functionCalls,
                    alias: "kw4"
                }
            }
        }
    }),
    e.Language.lua = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.keywords = {
                reserved: {
                    csv: "and,break,do,else,elseif,end,for,function,if,in,local,or,repeat,return,not,then,until,while",
                    alias: "kw1"
                },
                values: {
                    csv: "false,nil,true",
                    alias: "kw2"
                }
            },
            this.patterns = {
                multiLineComments: {
                    pattern: /--\[\[[\s\S]*?]]/g,
                    alias: "co1"
                },
                singleLineComments: {
                    pattern: /(--.*)$/gm,
                    alias: "co1"
                },
                specialComments: {
                    pattern: /---\[\[[\s\S]*?(]])/g,
                    alias: "co1"
                },
                strings: {
                    pattern: this.common.strings,
                    alias: "st0"
                },
                mlstring: {
                    pattern: /(\[(=*)\[[\S\s]*?]\2])/g,
                    alias: "st1"
                },
                brackets: {
                    pattern: this.common.brackets,
                    alias: "br0"
                },
                numbers: {
                    pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?)/gim,
                    alias: "nu0"
                },
                functionCalls: {
                    pattern: this.common.functionCalls,
                    alias: "me0"
                },
                methodCalls: {
                    pattern: this.common.methodCalls,
                    alias: "me1"
                }
            }
        }
    }),
    e.Language.matlab = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.keywords = {
                kw: {
                    csv: "__FILE__,__LINE__,break,case,catch,classdef,continue,do,else,elseif,end,end_try_catch,end_unwind_protect,endclassdef,endenumeration,endevents,endfor,endfunction,endif,endmethods,endparfor,endproperties,endswitch,endwhile,enumeration,events,for,function,global,if,methods,otherwise,parfor,persistent,properties,return,static,switch,try,until,unwind_protect,unwind_protect_cleanup,while",
                    alias: "kw1",
                    mod: "gi"
                },
                "const": {
                    csv: "true, false",
                    alias: "kw3",
                    mod: "gi"
                }
            },
            this.patterns = {
                lineComments: {
                    pattern: /%.*$/gm,
                    alias: "co1"
                },
                blockComments: {
                    pattern: /%%.*$/gm,
                    alias: "co2"
                },
                fn: {
                    pattern: this.common.functionCalls,
                    alias: "me0"
                },
                fn2: {
                    pattern: /\b([\w]+)\s*;/gm,
                    alias: "me0"
                },
                me: {
                    pattern: this.common.methodCalls,
                    alias: "me1"
                },
                brackets: {
                    pattern: this.common.brackets,
                    alias: "br0"
                },
                strings: {
                    pattern: this.common.singleQuotedString,
                    alias: "st0"
                },
                numbers: {
                    pattern: this.common.numbers,
                    alias: "nu0"
                },
                fhandle: {
                    pattern: /(@[\w]+)\s*/gm,
                    alias: "kw3"
                },
                symbols: {
                    pattern: /\+|-|\*|\/|%|!|@|&|\||\^|<|>|=|,|\.|;|\?|:|\[|]/g,
                    alias: "sy0"
                },
                classdef: {
                    pattern: /classdef\s+(\w+(?:\s*<\s*\w+)?)\s*$/gim,
                    alias: "kw4"
                }
            }
        }
    }),
    e.Language.markdown = new Class({
        Extends: e.Language.generic,
        setupLanguage: function(e) {
            this.patterns = {
                header1: {
                    pattern: /^(.+)\n=+\n/gim,
                    alias: "st1"
                },
                header2: {
                    pattern: /^(.+)\n-+\n/gim,
                    alias: "st2"
                },
                header3: {
                    pattern: /[#]{1,6}.*/gim,
                    alias: "st0"
                },
                ul: {
                    pattern: /^\*\s*.*/gim,
                    alias: "kw1"
                },
                ol: {
                    pattern: /^\d+\..*/gim,
                    alias: "kw1"
                },
                italics: {
                    pattern: /\*.*?\*/g,
                    alias: "kw3"
                },
                bold: {
                    pattern: /\*\*.*?\*\*/g,
                    alias: "kw3"
                },
                url: {
                    pattern: /\[[^\]]*\]\([^\)]*\)/g,
                    alias: "kw4"
                }
            }
        }
    }),
    e.Language.msdos = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.keywords = {
                keywords: {
                    csv: "if, else, goto, for, in, do, call, exit, not, exist, defined, shift, cd, dir, echo, setlocal, endlocal, pause, copy, append, assoc, at, attrib, break, cacls, cd, chcp, chdir, chkdsk, chkntfs, cls, color, date, dir, erase, fs, help, keyb, label, md, mkdir, mode, more, move, path, pause, print, popd, pushd, promt, rd, recover, rem, rename, replace, restore, rmdir, sort, start, subst, time, title, tree, type, ver, verify, vol, ren, del",
                    alias: "kw1",
                    mod: "gi"
                },
                reserved: {
                    csv: "errorlevel, prn, nul, lpt3, lpt2, lpt1, con, com4, com3, com2, com1, aux",
                    alias: "kw2",
                    mod: "gi"
                },
                system: {
                    csv: "cmd, comp, compact, convert, diskcomp, diskcopy, doskey, find, findstr, format, ftype, graftabl, ping, net, ipconfig, taskkill, xcopy",
                    alias: "kw3",
                    mod: "gi"
                },
                operators: {
                    csv: "equ, neq, lss, leq, gtr, geq, ==",
                    alias: "sy0",
                    mod: "gi"
                }
            },
            this.patterns = {
                comments: {
                    pattern: /^((\s*@?rem\b|::).*)$/gm,
                    alias: "co1"
                },
                numbers: {
                    pattern: this.common.numbers,
                    alias: "nu0"
                },
                setVar: {
                    pattern: /(?:^|\s+)(@?set\s+(?:\/[ap]\s+)?\w+)=/gim,
                    alias: "kw2"
                },
                variables: {
                    pattern: /(%[\d\*]\b|%\w+%|%%\w\b|%~[dpnx]+\d\b|%\w+:\w+=\w+%|%\w+:~(?:\d+,)?\d+%)/gim,
                    alias: "me0"
                },
                functions: {
                    pattern: /(?:^|\s+):\w+\s*?/gm,
                    alias: "me1"
                }
            }
        }
    }),
    e.Language.nsis = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.keywords = {
                commands: {
                    csv: "Function, PageEx, Section, SectionGroup, SubSection, Abort, AddBrandingImage, AddSize, AllowRootDirInstall, AllowSkipFiles, AutoCloseWindow, BGFont, BGGradient, BrandingText, BringToFront, Call, CallInstDLL, Caption, ChangeUI, CheckBitmap, ClearErrors, CompletedText, ComponentText, CopyFiles, CRCCheck, CreateDirectory, CreateFont, CreateShortCut, Delete, DeleteINISec, DeleteINIStr, DeleteRegKey, DeleteRegValue, DetailPrint, DetailsButtonText, DirText, DirVar, DirVerify, EnableWindow, EnumRegKey, EnumRegValue, Exch, Exec, ExecShell, ExecWait, ExpandEnvStrings, File, FileBufSize, FileClose, FileErrorText, FileOpen, FileRead, FileReadByte, FileReadUTF16LE, FileReadWord, FileSeek, FileWrite, FileWriteByte, FileWriteUTF16LE, FileWriteWord, FindClose, FindFirst, FindNext, FindWindow, FlushINI, FunctionEnd, GetCurInstType, GetCurrentAddress, GetDlgItem, GetDLLVersion, GetDLLVersionLocal, GetErrorLevel, GetFileTime, GetFileTimeLocal, GetFullPathName, GetFunctionAddress, GetInstDirError, GetLabelAddress, GetTempFileName, Goto, HideWindow, Icon, IfAbort, IfErrors, IfFileExists, IfRebootFlag, IfSilent, InitPluginsDir, InstallButtonText, InstallColors, InstallDir, InstallDirRegKey, InstProgressFlags, InstType, InstTypeGetText, InstTypeSetText, IntCmp, IntCmpU, IntFmt, IntOp, IsWindow, LangString, LicenseBkColor, LicenseData, LicenseForceSelection, LicenseLangString, LicenseText, LoadLanguageFile, LockWindow, LogSet, LogText, ManifestDPIAware, ManifestSupportedOS, MessageBox, MiscButtonText, Name, Nop, OutFile, Page, PageCallbacks, PageExEnd, Pop, Push, Quit, ReadEnvStr, ReadINIStr, ReadRegDWORD, ReadRegStr, Reboot, RegDLL, Rename, RequestExecutionLevel, ReserveFile, Return, RMDir, SearchPath, SectionEnd, SectionGetFlags, SectionGetInstTypes, SectionGetSize, SectionGetText, SectionGroupEnd, SectionIn, SectionSetFlags, SectionSetInstTypes, SectionSetSize, SectionSetText, SendMessage, SetAutoClose, SetBrandingImage, SetCompress, SetCompressor, SetCompressorDictSize, SetCtlColors, SetCurInstType, SetDatablockOptimize, SetDateSave, SetDetailsPrint, SetDetailsView, SetErrorLevel, SetErrors, SetFileAttributes, SetFont, SetOutPath, SetOverwrite, SetPluginUnload, SetRebootFlag, SetRegView, SetShellVarContext, SetSilent, ShowInstDetails, ShowUninstDetails, ShowWindow, SilentInstall, SilentUnInstall, Sleep, SpaceTexts, StrCmp, StrCmpS, StrCpy, StrLen, SubCaption, SubSectionEnd, Unicode, UninstallButtonText, UninstallCaption, UninstallIcon, UninstallSubCaption, UninstallText, UninstPage, UnRegDLL, Var, VIAddVersionKey, VIFileVersion, VIProductVersion, WindowIcon, WriteINIStr, WriteRegBin, WriteRegDWORD, WriteRegExpandStr, WriteRegStr, WriteUninstaller, XPStyle",
                    alias: "kw1"
                },
                states: {
                    csv: "admin, all, auto, both, colored, false, force, hide, highest, lastused, leave, listonly, none, normal, notset, off, on, open, print, show, silent, silentlog, smooth, textonly, true, user",
                    alias: "kw2"
                },
                statics: {
                    csv: "ARCHIVE, FILE_ATTRIBUTE_ARCHIVE, FILE_ATTRIBUTE_NORMAL, FILE_ATTRIBUTE_OFFLINE, FILE_ATTRIBUTE_READONLY, FILE_ATTRIBUTE_SYSTEM, FILE_ATTRIBUTE_TEMPORARY, HKCR, HKCU, HKDD, HKEY_CLASSES_ROOT, HKEY_CURRENT_CONFIG, HKEY_CURRENT_USER, HKEY_DYN_DATA, HKEY_LOCAL_MACHINE, HKEY_PERFORMANCE_DATA, HKEY_USERS, HKLM, HKPD, HKU, IDABORT, IDCANCEL, IDIGNORE, IDNO, IDOK, IDRETRY, IDYES, MB_ABORTRETRYIGNORE, MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON3, MB_DEFBUTTON4, MB_ICONEXCLAMATION, MB_ICONINFORMATION, MB_ICONQUESTION, MB_ICONSTOP, MB_OK, MB_OKCANCEL, MB_RETRYCANCEL, MB_RIGHT, MB_RTLREADING, MB_SETFOREGROUND, MB_TOPMOST, MB_USERICON, MB_YESNO, NORMAL, OFFLINE, READONLY, SHCTX, SHELL_CONTEXT, SYSTEM, TEMPORARY",
                    alias: "kw3"
                }
            },
            this.patterns = {
                brackets: {
                    pattern: this.common.brackets,
                    alias: "br0"
                },
                commentMultiline: {
                    pattern: this.common.multiComments,
                    alias: "co2"
                },
                commentPound: {
                    pattern: this.common.poundComments,
                    alias: "co1"
                },
                commentSemicolon: {
                    pattern: /;.*$/gm,
                    alias: "co1"
                },
                compilerFlags: {
                    pattern: /(!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|makensis|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning))/g,
                    alias: "kw2"
                },
                defines: {
                    pattern: /[\$]\{{1,2}[0-9a-zA-Z_][\w]*[\}]/gim,
                    alias: "kw4"
                },
                jumps: {
                    pattern: /([(\+|\-)]([0-9]+))/g,
                    alias: "nu0"
                },
                langStrings: {
                    pattern: /[\$]\({1,2}[0-9a-zA-Z_][\w]*[\)]/gim,
                    alias: "kw3"
                },
                escapeChars: {
                    pattern: /([\$]\\(n|r|t|[\$]))/g,
                    alias: "kw4"
                },
                numbers: {
                    pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][\-+]?[0-9]+)?|0x[A-F0-9]+)\b/gi,
                    alias: "nu0"
                },
                pluginCommands: {
                    pattern: /(([0-9a-zA-Z_]+)[:{2}]([0-9a-zA-Z_]+))/g,
                    alias: "kw2"
                },
                strings: {
                    pattern: this.common.strings,
                    alias: "st0"
                },
                variables: {
                    pattern: /[\$]{1,2}[0-9a-zA-Z_][\w]*/gim,
                    alias: "kw4"
                }
            }
        }
    }),
    EnlighterJS.Language.php = new Class({
        Extends: EnlighterJS.Language.generic,
        tokenizerType: "Standard",
        setupLanguage: function() {
            this.keywords = {
                keywords: {
                    csv: "__halt_compiler,abstract,and,as,break,callable,case,catch,class,clone,const,continue,declare,default,do,else,elseif,enddeclare,endfor,endforeach,endif,endswitch,endwhile,extends,final,finally,function,global,goto,implements,instanceof,insteadof,interface,namespace,new,or,private,protected,public,static,throw,trait,try,use,var,xor,yield",
                    alias: "kw1"
                },
                reserved: {
                    csv: "int,float,bool,string,true,false,null,resource,object,mixed,numeric",
                    alias: "kw4",
                    mod: "gi"
                }
            },
            this.patterns = {
                keywordsFn: {
                    pattern: /(require_once|include_once|array|die|exit|echo|print|empty|eval|include|isset|list|require|unset|if|switch|while|foreach|for|return)(?:\s*\(|\s+)?/gi,
                    alias: "kw1"
                },
                inherit: {
                    pattern: /(self|parent|\$this)/gi,
                    alias: "kw4"
                },
                slashComments: {
                    pattern: this.common.slashComments,
                    alias: "co1"
                },
                multiComments: {
                    pattern: this.common.multiComments,
                    alias: "co2"
                },
                dqStrings: {
                    pattern: this.common.multiLineDoubleQuotedStrings,
                    alias: "st0"
                },
                sqStrings: {
                    pattern: this.common.multiLineSingleQuotedStrings,
                    alias: "st1"
                },
                heredocs: {
                    pattern: /(<<<\s*?('?)([A-Z0-9]+)\2[^\n]*?\n[\s\S]*?\n\3(?![A-Z0-9\s]))/gim,
                    alias: "st1"
                },
                numbers: {
                    pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][\-+]?[0-9]+)?|0x[A-F0-9]+)\b/gi,
                    alias: "nu0"
                },
                variables: {
                    pattern: /\$[A-Z_][\w]*/gim,
                    alias: "kw3"
                },
                functions: {
                    pattern: this.common.functionCalls,
                    alias: "me0"
                },
                methods: {
                    pattern: /(?:->|::)([\w]+)/gim,
                    alias: "me1"
                },
                constants: {
                    pattern: /\b[A-Z][A-Z0-9_]+[A-Z]\b/g,
                    alias: "kw4"
                },
                lconstants: {
                    pattern: /\b__[A-Z][A-Z0-9_]+__\b/g,
                    alias: "re0"
                },
                brackets: {
                    pattern: this.common.brackets,
                    alias: "br0"
                },
                symbols: {
                    pattern: /!|@|&|<|>|=|=>|-|\+/g,
                    alias: "sy0"
                }
            },
            this.delimiters = {
                start: this.strictRegExp("<?php"),
                end: this.strictRegExp("?>")
            }
        }
    }),
    e.Language.python = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.keywords = {
                reserved: {
                    csv: "and, del, from, not, while, as, elif, global, or, with, assert, else, if, pass, yield, break, except, import, print, class, exec, in, raise, continue, finally, is, return, def, for, lambda, try",
                    alias: "kw1"
                },
                functions: {
                    csv: "__import__, abs, all, any, apply, bin, callable, chr, cmp, coerce, compile, delattr, dir, divmod, eval, execfile, filter, format, getattr, globals, hasattr, hash, hex, id, input, intern, isinstance, issubclass, iter, len, locals, map, max, min, next, oct, open, ord, pow, print, range, raw_input, reduce, reload, repr, round, setattr, sorted, sum, unichr, vars, zip",
                    alias: "kw2"
                },
                classes: {
                    csv: "ArithmeticError, AssertionError, AttributeError, BaseException, BufferError, BytesWarning, DeprecationWarning, EOFError, EnvironmentError, Exception, FloatingPointError, FutureWarning, GeneratorExit, IOError, ImportError, ImportWarning, IndentationError, IndexError, KeyError, KeyboardInterrupt, LookupError, MemoryError, NameError, NotImplementedError, OSError, OverflowError, PendingDeprecationWarning, ReferenceError, RuntimeError, RuntimeWarning, StandardError, StopIteration, SyntaxError, SyntaxWarning, SystemError, SystemExit, TabError, TypeError, UnboundLocalError, UnicodeDecodeError, UnicodeEncodeError, UnicodeError, UnicodeTranslateError, UnicodeWarning, UserWarning, ValueError, Warning, ZeroDivisionError, basestring, bool, buffer, bytearray, bytes, classmethod, complex, dict, enumerate, file, float, frozenset, int, list, long, object, property, reversed, set, slice, staticmethod, str, super, tuple, type, unicode, xrange",
                    alias: "kw2"
                }
            },
            this.patterns = {
                poundComments: {
                    pattern: this.common.poundComments,
                    alias: "co1"
                },
                multiStringComments1: {
                    pattern: /"""[\s\S]*?"""/gm,
                    alias: "co2"
                },
                multiStringComments2: {
                    pattern: /'''[\s\S]*?'''/gm,
                    alias: "co2"
                },
                strings: {
                    pattern: this.common.strings,
                    alias: "st0"
                },
                tickStrings: {
                    pattern: this.delimToRegExp("`", "\\", "`", "gm"),
                    alias: "st0"
                },
                delimString: {
                    pattern: /(%[q|Q|x]?(\W)[^\2\\\n]*(?:\\.[^\2\\]*)*(\2|\)|\]|\}))/gm,
                    alias: "st1"
                },
                heredoc: {
                    pattern: /(<<(\'?)([A-Z0-9]+)\2[^\n]*?\n[\s\S]*\n\3(?![\w]))/gim,
                    alias: "st2"
                },
                variables: {
                    pattern: /(@[A-Za-z_][\w]*|@@[A-Za-z_][\w]*|\$(?:\-[\S]|[\w]+)|\b[A-Z][\w]*)/g,
                    alias: "kw3"
                },
                rubySymbols: {
                    pattern: /[^:](:[\w]+)/g,
                    alias: "kw4"
                },
                constants: {
                    pattern: /\b[A-Z][\w]*/g,
                    alias: "kw3"
                },
                numbers: {
                    pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim,
                    alias: "nu0"
                },
                properties: {
                    pattern: this.common.properties,
                    alias: "me0"
                },
                brackets: {
                    pattern: this.common.brackets,
                    alias: "br0"
                },
                delimRegex: {
                    pattern: /(%r(\W)[^\2\\\n]*(?:\\.[^\2\\\n]*?)*(\2|\)|\]|\})[iomx]*)/gm,
                    alias: "re0"
                },
                literalRegex: {
                    pattern: this.delimToRegExp("/", "\\", "/", "g", "[iomx]*"),
                    alias: "re0"
                }
            }
        }
    }),
    e.Language.cython = new Class({
        Extends: e.Language.python,
        setupLanguage: function() {
            this.parent(),
            this.keywords.reserved.csv += ", __all__, include, cimport, pyximport, cythonize, cdef, cpdef, ctypedef, property, IF, ELIF, ELSE, DEF",
            this.keywords.functions.csv += ", __dealloc__, __get__, __init__, fopen",
            this.keywords.classes.csv += ", PyErr_Fetch, PyErr_Occurred, PyErr_WarnEx, char, double, extern, namespace, public, struct, void, union, unsigned, enum"
        }
    }),
    e.Language.raw = new Class({
        Extends: e.Language.generic,
        initialize: function(e) {
            this.code = e
        },
        getTokens: function() {
            var e = function(e, t, n) {
                return {
                    text: e,
                    alias: t,
                    index: n,
                    length: e.length,
                    end: e.length + n
                }
            };
            return [e(this.code, "", 0)]
        }
    }),
    e.Language.ruby = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.keywords = {
                reserved: {
                    csv: "__FILE__, __LINE__, alias, and, BEGIN, begin, break, case, class, def, defined, do, else, elsif, END, end, ensure, false, for, if, in, module, next, nil, not, or, redo, rescue, retry, return, self, super, then, true, undef, unless, until, when, while, yield",
                    alias: "kw1"
                },
                functions: {
                    csv: "abort, at_exit, autoload, binding, block_given, callcc, caller, catch, chomp, chop, eval, exec, exit, exit!, fail, fork, format, gets, global_variables, gsub, lambda, proc, load, local_variables, loop, open, p, print, proc, putc, puts, raise, fail, rand, readline, readlines, require, scan, select, set_trace_func, sleep, split, sprintf, format, srand, syscall, system, sub, test, throw, trace_var, trap, untrace_var",
                    alias: "kw2"
                },
                classes: {
                    csv: "Abbrev, ArgumentError, Array, Base64, Benchmark, Benchmark::Tms, Bignum, Binding, CGI, Cookie, HtmlExtension, QueryExtension, Session, FileStore, MemoryStore, Class, Comparable, Complex, ConditionVariable, Continuation, Data, Date, DateTime, Dir, EOFError, Enumerable, Errno, Exception, FalseClass, File, Constants, Stat, FileTest, FileUtils, CopyContext_, DryRun, NoWrite, Verbose, Find, Fixnum, Float, FloatDomainError, GC, Generator, Hash, IO, IOError, Iconv, Failure, IllegalSequence, InvalidCharacter, OutOfRange, IndexError, Integer, Interrupt, Kernel, LoadError, LocalJumpError, Logger, Application, LogDevice, Severity, ShiftingError, Marshal, MatchData, Math, Matrix, Method, Module, Mutex, NameError, NilClass, NoMemoryError, NoMethodError, NotImplementedError, Numeric, Object, ObjectSpace, Observable, Pathname, Precision, Proc, Process, GID, Status, Sys, UID, Queue, Range, RangeError, Regexp, RegexpError, RuntimeError, ScriptError, SecurityError, Set, Shellwords, Signal, SignalException, Singleton, SingletonClassMethods, SizedQueue, SortedSet, StandardError, String, StringScanner, StringScanner::Error, Struct, Symbol, SyncEnumerator, SyntaxError, SystemCallError, SystemExit, SystemStackError, Tempfile, Test, Unit, Thread, ThreadError, ThreadGroup, ThreadsWait, Time, TrueClass, TypeError, UnboundMethod, Vector, YAML, ZeroDivisionError, Zlib, BufError, DataError, Deflate, Error, GzipFile, CRCError, Error, LengthError, NoFooter, GzipReader, GzipWriter, Inflate, MemError, NeedDict, StreamEnd, StreamError, VersionError, ZStream, fatal",
                    alias: "kw2"
                }
            },
            this.patterns = {
                poundComments: {
                    pattern: this.common.poundComments,
                    alias: "co1"
                },
                multiComments: {
                    pattern: /^=begin[\s\S]*?^=end/gm,
                    alias: "co2"
                },
                strings: {
                    pattern: this.common.strings,
                    alias: "st0"
                },
                tickStrings: {
                    pattern: this.delimToRegExp("`", "\\", "`", "gm"),
                    alias: "st0"
                },
                delimString: {
                    pattern: /(%[q|Q|x]?(\W)[^\2\\\n]*(?:\\.[^\2\\]*)*(\2|\)|\]|\}))/gm,
                    alias: "st1"
                },
                heredoc: {
                    pattern: /(<<(\'?)([A-Z0-9]+)\2[^\n]*?\n[\s\S]*\n\3(?![\w]))/gim,
                    alias: "st2"
                },
                variables: {
                    pattern: /(@[A-Za-z_][\w]*|@@[A-Za-z_][\w]*|\$(?:\-[\S]|[\w]+)|\b[A-Z][\w]*)/g,
                    alias: "kw3"
                },
                rubySymbols: {
                    pattern: /[^:](:[\w]+)/g,
                    alias: "kw4"
                },
                constants: {
                    pattern: /\b[A-Z][\w]*/g,
                    alias: "kw3"
                },
                numbers: {
                    pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+|0b[0-1_]+)\b/gim,
                    alias: "nu0"
                },
                properties: {
                    pattern: this.common.properties,
                    alias: "me0"
                },
                brackets: {
                    pattern: this.common.brackets,
                    alias: "br0"
                },
                delimRegex: {
                    pattern: /(%r(\W)[^\2\\\n]*(?:\\.[^\2\\\n]*?)*(\2|\)|\]|\})[iomx]*)/gm,
                    alias: "re0"
                },
                literalRegex: {
                    pattern: this.delimToRegExp("/", "\\", "/", "g", "[iomx]*"),
                    alias: "re0"
                }
            }
        }
    }),
    e.Language.rust = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.keywords = {
                kw: {
                    csv: "As,Break,Crate,Else,Enum,Extern,False,Fn,For,If,Impl,In,Let,Loop,Match,Mod,Move,Mut,Pub,Ref,Return,Static,SelfValue,SelfType,Struct,Super,True,Trait,Type,Unsafe,Use,Virtual,While,Continue,Box,Const,Where,Proc,Alignof,Become,Offsetof,Priv,Pure,Sizeof,Typeof,Unsized,Yield,Do,Abstract,Final,Override,Macro",
                    alias: "kw1",
                    mod: "gi"
                }
            },
            this.patterns = {
                slashComments: {
                    pattern: this.common.slashComments,
                    alias: "co1"
                },
                multiComments: {
                    pattern: this.common.multiComments,
                    alias: "co1"
                },
                slashDocComments: {
                    pattern: /(?:^|[^\\])\/\/[\/!].*$/gm,
                    alias: "co2"
                },
                multiDocComments: {
                    pattern: /\/\*[\*!][\s\S]*?\*\//gm,
                    alias: "co2"
                },
                chars: {
                    pattern: /'.'/gm,
                    alias: "st0"
                },
                rawStrings: {
                    pattern: /r((#+)".*?"\2)/gm,
                    alias: "st1"
                },
                strings: {
                    pattern: /("(?:\\.|\\\s*\n|\\s*\r\n|[^\\"])*")/g,
                    alias: "st1"
                },
                directives: {
                    pattern: /^\s*#.*$/gm,
                    alias: "sy0"
                },
                brackets: {
                    pattern: this.common.brackets,
                    alias: "br0"
                },
                intLiteral: {
                    pattern: /\b([0-9_]+|0o[0-9_]+|0x[A-F0-9_]+|0b[0-1_]+)(u8|i8|u16|i16|u32|i32|u64|i64|isize|usize)?\b/gim,
                    alias: "nu0"
                },
                floatLiteral: {
                    pattern: /\b([0-9_]+\.?[0-9_]+?(e\+[0-9_]+)?)(?:f32|f64)?\b/gim,
                    alias: "nu0"
                },
                methodDefs: {
                    pattern: /fn\s+([\w]+)\s*(<\w+\s*>)?\(/gm,
                    alias: "kw2"
                },
                funCalls: {
                    pattern: /\b\.?([\w]+)\s*(\(|::)/gm,
                    alias: "kw3"
                },
                macro: {
                    pattern: /\b([\w]+)!/gm,
                    alias: "kw4"
                },
                symbols: {
                    pattern: /\+|-|\*|\/|%|!|@|&|\||\^|<|<<|>>|>|=|,|\.|;|\?|:|self/g,
                    alias: "sy0"
                }
            }
        }
    }),
    e.Language.shell = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.keywords = {
                keywords: {
                    csv: "if, fi, then, elif, else, for, do, done, until, while, break, continue, case, esac, return, function, in, eq, ne, gt, lt, ge, le",
                    alias: "kw1"
                }
            },
            this.patterns = {
                comments: {
                    pattern: /((?:^\s*|\s+)#.*$)/gm,
                    alias: "co1"
                },
                strings: {
                    pattern: this.common.strings,
                    alias: "st0"
                },
                backticks: {
                    pattern: /`.*?`/gm,
                    alias: "st1"
                },
                braces: {
                    pattern: /=(\$\(.*?\))/gm,
                    alias: "me1"
                },
                cases: {
                    pattern: /^\s*\w+\)\s*$/gm,
                    alias: "kw2"
                },
                def: {
                    pattern: /^(\s*\w+)=/gm,
                    alias: "kw4"
                },
                vars: {
                    pattern: /(\$(?:\{\w+\}|\w+))\b/gim,
                    alias: "kw4"
                },
                functions: {
                    pattern: /^\s*(?:function\b)?\w+\(\)\s*\{/gm,
                    alias: "kw3"
                }
            }
        }
    }),
    e.Language.squirrel = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.keywords = {
                reserved: {
                    csv: "base,break,case,catch,class,clone,constructor,continue,const,default,delete,else,enum,extends,false,for,foreach,function,if,in,instanceof,local,null,resume,return,static,switch,this,throw,true,try,typeof,while,yield",
                    alias: "kw1"
                }
            },
            this.patterns = {
                slashComments: {
                    pattern: this.common.slashComments,
                    alias: "co1"
                },
                poundComments: {
                    pattern: this.common.poundComments,
                    alias: "co1"
                },
                multiComments: {
                    pattern: this.common.multiComments,
                    alias: "co2"
                },
                strings: {
                    pattern: this.common.doubleQuotedString,
                    alias: "st0"
                },
                numbers: {
                    pattern: /\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+)\b/gim,
                    alias: "nu0"
                },
                charnumber: {
                    pattern: this.common.singleQuotedString,
                    alias: "nu0"
                },
                brackets: {
                    pattern: this.common.brackets,
                    alias: "br0"
                },
                functionCalls: {
                    pattern: this.common.functionCalls,
                    alias: "me0"
                },
                methodCalls: {
                    pattern: this.common.methodCalls,
                    alias: "me1"
                },
                properties: {
                    pattern: this.common.properties,
                    alias: "me1"
                }
            }
        }
    }),
    e.Language.sql = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.keywords = {
                keywords: {
                    csv: "savepoint, start, absolute, action, add, after, alter, as, asc, at, authorization, begin, bigint, binary, bit, by, cascade, char, character, check, checkpoint, close, collate, column, commit, committed, connect, connection, constraint, contains, continue, create, cube, current, current_date, current_time, cursor, database, date, deallocate, dec, decimal, declare, default, delete, desc, distinct, double, drop, dynamic, else, end, end-exec, escape, except, exec, execute, false, fetch, first, float, for, force, foreign, forward, free, from, full, function, global, goto, grant, group, grouping, having, hour, ignore, index, inner, insensitive, insert, instead, int, integer, intersect, into, is, isolation, key, last, level, load, local, max, min, minute, modify, move, name, national, nchar, next, no, numeric, of, off, on, only, open, option, order, out, output, partial, password, precision, prepare, primary, prior, privileges, procedure, public, read, real, references, relative, repeatable, restrict, return, returns, revoke, rollback, rollup, rows, rule, schema, scroll, second, section, select, sequence, serializable, set, size, smallint, static, statistics, table, temp, temporary, then, time, timestamp, to, top, transaction, translation, trigger, true, truncate, uncommitted, union, unique, update, values, varchar, varying, view, when, where, with, work",
                    alias: "kw1",
                    mod: "gi"
                },
                functions: {
                    csv: "abs, avg, case, cast, coalesce, convert, count, current_timestamp, current_user, day, isnull, left, lower, month, nullif, replace, right, session_user, space, substring, sum, system_user, upper, user, year",
                    alias: "kw2",
                    mod: "gi"
                },
                operators: {
                    csv: "all, and, any, between, cross, in, join, like, not, null, or, outer, some, if",
                    alias: "kw3",
                    mod: "gi"
                }
            },
            this.patterns = {
                singleLineComments: {
                    pattern: /--(.*)$/gm,
                    alias: "co1"
                },
                multiLineComments: {
                    pattern: this.common.multiComments,
                    alias: "co2"
                },
                multiLineStrings: {
                    pattern: this.common.multiLineStrings,
                    alias: "st0"
                },
                numbers: {
                    pattern: this.common.numbers,
                    alias: "nu0"
                },
                columns: {
                    pattern: /`[^`\\]*(?:\\.[^`\\]*)*`/gm,
                    alias: "kw4"
                }
            }
        }
    }),
    e.Language.vhdl = new Class({
        Extends: e.Language.generic,
        setupLanguage: function() {
            this.keywords = {
                keywords: {
                    csv: "abs,access,after,alias,all,and,architecture,array,assert,attribute,begin,block,body,buffer,bus,case,component,configuration,constant,disconnect,downto,else,elsif,end,entity,exit,file,for,function,generate,generic,group,guarded,if,impure,in,inertial,inout,is,label,library,linkage,literal,loop,map,mod,nand,new,next,nor,not,null,of,on,open,or,others,out,package,port,postponed,procedure,process,pure,range,record,register,reject,rem,report,return,rol,ror,select,severity,signal,shared,sla,sll,sra,srl,subtype,then,to,transport,type,unaffected,units,until,use,variable,wait,when,while,with,xnor,xor",
                    alias: "kw1",
                    mod: "gi"
                },
                operators: {
                    csv: "abs,not,mod,rem,sll,srl,sla,sra,rol,ror,and,or,nand,nor,xor,xnor",
                    alias: "sy0"
                }
            },
            this.patterns = {
                comments: {
                    pattern: /((?:^\s*|\s+)--.*$)/gm,
                    alias: "co1"
                },
                uses: {
                    pattern: /^\s*(?:use|library)\s*(\S+);/gim,
                    alias: "kw4"
                },
                functions: {
                    pattern: this.common.functionCalls,
                    alias: "kw2"
                },
                operators: {
                    pattern: /\*\*|\*|\/|\+|\-|&|=|\/=|<|<=|>|>=/g,
                    alias: "sy0"
                },
                strings: {
                    pattern: this.common.strings,
                    alias: "st1"
                },
                numbers: {
                    pattern: this.common.numbers,
                    alias: "nu0"
                },
                brackets: {
                    pattern: this.common.brackets,
                    alias: "br0"
                }
            }
        }
    }),
    EnlighterJS.Language.xml = new Class({
        Extends: EnlighterJS.Language.generic,
        tokenizerType: "Xml",
        setupLanguage: function() {
            this.patterns = {
                comments: {
                    pattern: /(?:&lt;|<)!--[\s\S]*?--(?:&gt;|>)/gim,
                    alias: "co2"
                },
                cdata: {
                    pattern: /(?:&lt;|<)!\[CDATA\[[\s\S]*?]](?:&gt;|>)/gim,
                    alias: "st1"
                },
                closingTags: {
                    pattern: /(?:&lt;|<)\/[A-Z:_][A-Z0-9:._-]*?(?:&gt;|>)/gi,
                    alias: "kw1"
                },
                doctype: {
                    pattern: /(?:&lt;|<)!DOCTYPE[\s\S]+?(?:&gt;|>)/gim,
                    alias: "st2"
                },
                version: {
                    pattern: /(?:&lt;|<)\?xml[\s\S]+?\?(?:&gt;|>)/gim,
                    alias: "kw2"
                }
            }
        }
    })
} ();

 

发表评论

电子邮件地址不会被公开。