App-Mxpress-PDF

 view release on metacpan or  search on metacpan

public/javascripts/ace/mode-html_elixir.js  view on Meta::CPAN

            defaultToken : "comment.doc",
            caseInsensitive: true
        }]
    };
};

oop.inherits(DocCommentHighlightRules, TextHighlightRules);

DocCommentHighlightRules.getTagRule = function(start) {
    return {
        token : "comment.doc.tag.storage.type",
        regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
    };
};

DocCommentHighlightRules.getStartRule = function(start) {
    return {
        token : "comment.doc", // doc comment
        regex : "\\/\\*(?=\\*)",
        next  : start
    };
};

DocCommentHighlightRules.getEndRule = function (start) {
    return {
        token : "comment.doc", // closing comment
        regex : "\\*\\/",
        next  : start
    };
};


exports.DocCommentHighlightRules = DocCommentHighlightRules;

});

define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
"use strict";

var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";

var JavaScriptHighlightRules = function(options) {
    var keywordMapper = this.createKeywordMapper({
        "variable.language":
            "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|"  + // Constructors
            "Namespace|QName|XML|XMLList|"                                             + // E4X
            "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|"   +
            "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|"                    +
            "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|"   + // Errors
            "SyntaxError|TypeError|URIError|"                                          +
            "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
            "isNaN|parseFloat|parseInt|"                                               +
            "JSON|Math|"                                                               + // Other
            "this|arguments|prototype|window|document"                                 , // Pseudo
        "keyword":
            "const|yield|import|get|set|async|await|" +
            "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
            "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
            "__parent__|__count__|escape|unescape|with|__proto__|" +
            "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
        "storage.type":
            "const|let|var|function",
        "constant.language":
            "null|Infinity|NaN|undefined",
        "support.function":
            "alert",
        "constant.language.boolean": "true|false"
    }, "identifier");
    var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";

    var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
        "u[0-9a-fA-F]{4}|" + // unicode
        "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
        "[0-2][0-7]{0,2}|" + // oct
        "3[0-7][0-7]?|" + // oct
        "[4-7][0-7]?|" + //oct
        ".)";

    this.$rules = {
        "no_regex" : [
            DocCommentHighlightRules.getStartRule("doc-start"),
            comments("no_regex"),
            {
                token : "string",
                regex : "'(?=.)",
                next  : "qstring"
            }, {
                token : "string",
                regex : '"(?=.)',
                next  : "qqstring"
            }, {
                token : "constant.numeric", // hexadecimal, octal and binary
                regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
            }, {
                token : "constant.numeric", // decimal integers and floats
                regex : /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
            }, {
                token : [
                    "storage.type", "punctuation.operator", "support.function",
                    "punctuation.operator", "entity.name.function", "text","keyword.operator"
                ],
                regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
                next: "function_arguments"
            }, {
                token : [
                    "storage.type", "punctuation.operator", "entity.name.function", "text",
                    "keyword.operator", "text", "storage.type", "text", "paren.lparen"
                ],
                regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
                next: "function_arguments"
            }, {
                token : [
                    "entity.name.function", "text", "keyword.operator", "text", "storage.type",
                    "text", "paren.lparen"
                ],
                regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
                next: "function_arguments"
            }, {
                token : [
                    "storage.type", "punctuation.operator", "entity.name.function", "text",
                    "keyword.operator", "text",
                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
                ],
                regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
                next: "function_arguments"
            }, {
                token : [
                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
                ],

public/javascripts/ace/mode-html_elixir.js  view on Meta::CPAN


var ElixirHighlightRules = function() {

    this.$rules = { start: 
       [ { token: 
            [ 'meta.module.elixir',
              'keyword.control.module.elixir',
              'meta.module.elixir',
              'entity.name.type.module.elixir' ],
           regex: '^(\\s*)(defmodule)(\\s+)((?:[A-Z]\\w*\\s*\\.\\s*)*[A-Z]\\w*)' },
         { token: 'comment.documentation.heredoc',
           regex: '@(?:module|type)?doc (?:~[a-z])?"""',
           push: 
            [ { token: 'comment.documentation.heredoc',
                regex: '\\s*"""',
                next: 'pop' },
              { include: '#interpolated_elixir' },
              { include: '#escaped_char' },
              { defaultToken: 'comment.documentation.heredoc' } ],
           comment: '@doc with heredocs is treated as documentation' },
         { token: 'comment.documentation.heredoc',
           regex: '@(?:module|type)?doc ~[A-Z]"""',
           push: 
            [ { token: 'comment.documentation.heredoc',
                regex: '\\s*"""',
                next: 'pop' },
              { defaultToken: 'comment.documentation.heredoc' } ],
           comment: '@doc with heredocs is treated as documentation' },
         { token: 'comment.documentation.heredoc',
           regex: '@(?:module|type)?doc (?:~[a-z])?\'\'\'',
           push: 
            [ { token: 'comment.documentation.heredoc',
                regex: '\\s*\'\'\'',
                next: 'pop' },
              { include: '#interpolated_elixir' },
              { include: '#escaped_char' },
              { defaultToken: 'comment.documentation.heredoc' } ],
           comment: '@doc with heredocs is treated as documentation' },
         { token: 'comment.documentation.heredoc',
           regex: '@(?:module|type)?doc ~[A-Z]\'\'\'',
           push: 
            [ { token: 'comment.documentation.heredoc',
                regex: '\\s*\'\'\'',
                next: 'pop' },
              { defaultToken: 'comment.documentation.heredoc' } ],
           comment: '@doc with heredocs is treated as documentation' },
         { token: 'comment.documentation.false',
           regex: '@(?:module|type)?doc false',
           comment: '@doc false is treated as documentation' },
         { token: 'comment.documentation.string',
           regex: '@(?:module|type)?doc "',
           push: 
            [ { token: 'comment.documentation.string',
                regex: '"',
                next: 'pop' },
              { include: '#interpolated_elixir' },
              { include: '#escaped_char' },
              { defaultToken: 'comment.documentation.string' } ],
           comment: '@doc with string is treated as documentation' },
         { token: 'keyword.control.elixir',
           regex: '\\b(?:do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defdelegate|defcallback|defmacrocallback|defexception|defoverridable|exit|after|rescue|catch|else|raise|th...
           TODO: 'FIXME: regexp doesn\'t have js equivalent',
           originalRegex: '(?<!\\.)\\b(do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defdelegate|defcallback|defmacrocallback|defexception|defoverridable|exit|after|rescue|catch...
         { token: 'keyword.operator.elixir',
           regex: '\\b(?:and|not|or|when|xor|in|inlist|inbits)\\b',
           TODO: 'FIXME: regexp doesn\'t have js equivalent',
           originalRegex: '(?<!\\.)\\b(and|not|or|when|xor|in|inlist|inbits)\\b',
           comment: ' as above, just doesn\'t need a \'end\' and does a logic operation' },
         { token: 'constant.language.elixir',
           regex: '\\b(?:nil|true|false)\\b(?![?!])' },
         { token: 'variable.language.elixir',
           regex: '\\b__(?:CALLER|ENV|MODULE|DIR)__\\b(?![?!])' },
         { token: 
            [ 'punctuation.definition.variable.elixir',
              'variable.other.readwrite.module.elixir' ],
           regex: '(@)([a-zA-Z_]\\w*)' },
         { token: 
            [ 'punctuation.definition.variable.elixir',
              'variable.other.anonymous.elixir' ],
           regex: '(&)(\\d*)' },
         { token: 'variable.other.constant.elixir',
           regex: '\\b[A-Z]\\w*\\b' },
         { token: 'constant.numeric.elixir',
           regex: '\\b(?:0x[\\da-fA-F](?:_?[\\da-fA-F])*|\\d(?:_?\\d)*(?:\\.(?![^[:space:][:digit:]])(?:_?\\d)*)?(?:[eE][-+]?\\d(?:_?\\d)*)?|0b[01]+|0o[0-7]+)\\b',
           TODO: 'FIXME: regexp doesn\'t have js equivalent',
           originalRegex: '\\b(0x\\h(?>_?\\h)*|\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?|0b[01]+|0o[0-7]+)\\b' },
         { token: 'punctuation.definition.constant.elixir',
           regex: ':\'',
           push: 
            [ { token: 'punctuation.definition.constant.elixir',
                regex: '\'',
                next: 'pop' },
              { include: '#interpolated_elixir' },
              { include: '#escaped_char' },
              { defaultToken: 'constant.other.symbol.single-quoted.elixir' } ] },
         { token: 'punctuation.definition.constant.elixir',
           regex: ':"',
           push: 
            [ { token: 'punctuation.definition.constant.elixir',
                regex: '"',
                next: 'pop' },
              { include: '#interpolated_elixir' },
              { include: '#escaped_char' },
              { defaultToken: 'constant.other.symbol.double-quoted.elixir' } ] },
         { token: 'punctuation.definition.string.begin.elixir',
           regex: '(?:\'\'\')',
           TODO: 'FIXME: regexp doesn\'t have js equivalent',
           originalRegex: '(?>\'\'\')',
           push: 
            [ { token: 'punctuation.definition.string.end.elixir',
                regex: '^\\s*\'\'\'',
                next: 'pop' },
              { include: '#interpolated_elixir' },
              { include: '#escaped_char' },
              { defaultToken: 'support.function.variable.quoted.single.heredoc.elixir' } ],
           comment: 'Single-quoted heredocs' },
         { token: 'punctuation.definition.string.begin.elixir',
           regex: '\'',
           push: 
            [ { token: 'punctuation.definition.string.end.elixir',
                regex: '\'',
                next: 'pop' },
              { include: '#interpolated_elixir' },



( run in 1.448 second using v1.01-cache-2.11-cpan-39bf76dae61 )