App-Mxpress-PDF

 view release on metacpan or  search on metacpan

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

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

var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;

var ActionScriptHighlightRules = function() {

    this.$rules = { start: 
       [ { token: 'support.class.actionscript.2',
           regex: '\\b(?:R(?:ecordset|DBMSResolver|adioButton(?:Group)?)|X(?:ML(?:Socket|Node|Connector)?|UpdateResolverDataHolder)|M(?:M(?:Save|Execute)|icrophoneMicrophone|o(?:use|vieClip(?:Loader)?)|e(?:nu(?:Bar)?|dia(?:Controller|Display|Playback...
         { token: 'support.function.actionscript.2',
           regex: '\\b(?:s(?:h(?:ift|ow(?:GridLines|Menu|Border|Settings|Headers|ColumnHeaders|Today|Preferences)?|ad(?:ow|ePane))|c(?:hema|ale(?:X|Mode|Y|Content)|r(?:oll(?:Track|Drag)?|een(?:Resolution|Color|DPI)))|t(?:yleSheet|op(?:Drag|A(?:nimati...
         { token: 'support.constant.actionscript.2',
           regex: '\\b(?:__proto__|__resolve|_accProps|_alpha|_changed|_currentframe|_droptarget|_flash|_focusrect|_framesloaded|_global|_height|_highquality|_level|_listeners|_lockroot|_name|_parent|_quality|_root|_rotation|_soundbuftime|_target|_to...
         { token: 'keyword.control.actionscript.2',
           regex: '\\b(?:dynamic|extends|import|implements|interface|public|private|new|static|super|var|for|in|break|continue|while|do|return|if|else|case|switch)\\b' },
         { token: 'storage.type.actionscript.2',
           regex: '\\b(?:Boolean|Number|String|Void)\\b' },
         { token: 'constant.language.actionscript.2',
           regex: '\\b(?:null|undefined|true|false)\\b' },
         { token: 'constant.numeric.actionscript.2',
           regex: '\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b' },
         { token: 'punctuation.definition.string.begin.actionscript.2',
           regex: '"',
           push: 
            [ { token: 'punctuation.definition.string.end.actionscript.2',
                regex: '"',
                next: 'pop' },
              { token: 'constant.character.escape.actionscript.2',
                regex: '\\\\.' },
              { defaultToken: 'string.quoted.double.actionscript.2' } ] },
         { token: 'punctuation.definition.string.begin.actionscript.2',
           regex: '\'',
           push: 
            [ { token: 'punctuation.definition.string.end.actionscript.2',
                regex: '\'',
                next: 'pop' },
              { token: 'constant.character.escape.actionscript.2',
                regex: '\\\\.' },
              { defaultToken: 'string.quoted.single.actionscript.2' } ] },
         { token: 'support.constant.actionscript.2',
           regex: '\\b(?:BACKSPACE|CAPSLOCK|CONTROL|DELETEKEY|DOWN|END|ENTER|HOME|INSERT|LEFT|LN10|LN2|LOG10E|LOG2E|MAX_VALUE|MIN_VALUE|NEGATIVE_INFINITY|NaN|PGDN|PGUP|PI|POSITIVE_INFINITY|RIGHT|SPACE|SQRT1_2|SQRT2|UP)\\b' },
         { token: 'punctuation.definition.comment.actionscript.2',
           regex: '/\\*',
           push: 
            [ { token: 'punctuation.definition.comment.actionscript.2',
                regex: '\\*/',
                next: 'pop' },
              { defaultToken: 'comment.block.actionscript.2' } ] },
         { token: 'punctuation.definition.comment.actionscript.2',
           regex: '//.*$',
           push_: 
            [ { token: 'comment.line.double-slash.actionscript.2',
                regex: '$',
                next: 'pop' },
              { defaultToken: 'comment.line.double-slash.actionscript.2' } ] },
         { token: 'keyword.operator.actionscript.2',
           regex: '\\binstanceof\\b' },
         { token: 'keyword.operator.symbolic.actionscript.2',
           regex: '[-!%&*+=/?:]' },
         { token: 
            [ 'meta.preprocessor.actionscript.2',
              'punctuation.definition.preprocessor.actionscript.2',
              'meta.preprocessor.actionscript.2' ],
           regex: '^([ \\t]*)(#)([a-zA-Z]+)' },
         { token: 
            [ 'storage.type.function.actionscript.2',
              'meta.function.actionscript.2',
              'entity.name.function.actionscript.2',
              'meta.function.actionscript.2',
              'punctuation.definition.parameters.begin.actionscript.2' ],
           regex: '\\b(function)(\\s+)([a-zA-Z_]\\w*)(\\s*)(\\()',
           push: 
            [ { token: 'punctuation.definition.parameters.end.actionscript.2',
                regex: '\\)',
                next: 'pop' },
              { token: 'variable.parameter.function.actionscript.2',
                regex: '[^,)$]+' },
              { defaultToken: 'meta.function.actionscript.2' } ] },
         { token: 
            [ 'storage.type.class.actionscript.2',
              'meta.class.actionscript.2',
              'entity.name.type.class.actionscript.2',
              'meta.class.actionscript.2',
              'storage.modifier.extends.actionscript.2',
              'meta.class.actionscript.2',
              'entity.other.inherited-class.actionscript.2' ],
           regex: '\\b(class)(\\s+)([a-zA-Z_](?:\\w|\\.)*)(?:(\\s+)(extends)(\\s+)([a-zA-Z_](?:\\w|\\.)*))?' } ] };
    
    this.normalizeRules();
};

ActionScriptHighlightRules.metaData = { fileTypes: [ 'as' ],
      keyEquivalent: '^~A',
      name: 'ActionScript',
      scopeName: 'source.actionscript.2' };


oop.inherits(ActionScriptHighlightRules, TextHighlightRules);

exports.ActionScriptHighlightRules = ActionScriptHighlightRules;
});

define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
"use strict";

var oop = require("../../lib/oop");
var Range = require("../../range").Range;
var BaseFoldMode = require("./fold_mode").FoldMode;

var FoldMode = exports.FoldMode = function(commentRegex) {
    if (commentRegex) {
        this.foldingStartMarker = new RegExp(
            this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
        );
        this.foldingStopMarker = new RegExp(
            this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
        );
    }
};
oop.inherits(FoldMode, BaseFoldMode);

(function() {
    
    this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
    this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
    this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
    this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
    this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
    this._getFoldWidgetBase = this.getFoldWidget;
    this.getFoldWidget = function(session, foldStyle, row) {
        var line = session.getLine(row);
    
        if (this.singleLineBlockCommentRe.test(line)) {
            if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
                return "";
        }
    
        var fw = this._getFoldWidgetBase(session, foldStyle, row);
    
        if (!fw && this.startRegionRe.test(line))
            return "start"; // lineCommentRegionStart
    
        return fw;
    };

    this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
        var line = session.getLine(row);
        
        if (this.startRegionRe.test(line))
            return this.getCommentRegionBlock(session, line, row);
        
        var match = line.match(this.foldingStartMarker);
        if (match) {
            var i = match.index;

            if (match[1])
                return this.openingBracketBlock(session, match[1], row, i);
                
            var range = session.getCommentFoldRange(row, i + match[0].length, 1);
            
            if (range && !range.isMultiLine()) {
                if (forceMultiline) {
                    range = this.getSectionRange(session, row);
                } else if (foldStyle != "all")
                    range = null;
            }
            
            return range;

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

        var line = session.getLine(row);
        var startIndent = line.search(/\S/);
        var startRow = row;
        var startColumn = line.length;
        row = row + 1;
        var endRow = row;
        var maxRow = session.getLength();
        while (++row < maxRow) {
            line = session.getLine(row);
            var indent = line.search(/\S/);
            if (indent === -1)
                continue;
            if  (startIndent > indent)
                break;
            var subRange = this.getFoldWidgetRange(session, "all", row);
            
            if (subRange) {
                if (subRange.start.row <= startRow) {
                    break;
                } else if (subRange.isMultiLine()) {
                    row = subRange.end.row;
                } else if (startIndent == indent) {
                    break;
                }
            }
            endRow = row;
        }
        
        return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
    };
    this.getCommentRegionBlock = function(session, line, row) {
        var startColumn = line.search(/\s*$/);
        var maxRow = session.getLength();
        var startRow = row;
        
        var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
        var depth = 1;
        while (++row < maxRow) {
            line = session.getLine(row);
            var m = re.exec(line);
            if (!m) continue;
            if (m[1]) depth--;
            else depth++;

            if (!depth) break;
        }

        var endRow = row;
        if (endRow > startRow) {
            return new Range(startRow, startColumn, endRow, line.length);
        }
    };

}).call(FoldMode.prototype);

});

define("ace/mode/actionscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/actionscript_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
"use strict";

var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
var ActionScriptHighlightRules = require("./actionscript_highlight_rules").ActionScriptHighlightRules;
var FoldMode = require("./folding/cstyle").FoldMode;

var Mode = function() {
    this.HighlightRules = ActionScriptHighlightRules;
    this.foldingRules = new FoldMode();
    this.$behaviour = this.$defaultBehaviour;
};
oop.inherits(Mode, TextMode);

(function() {
    this.lineCommentStart = "//";
    this.blockComment = {start: "/*", end: "*/"};
    this.$id = "ace/mode/actionscript";
    this.snippetFileId = "ace/snippets/actionscript";
}).call(Mode.prototype);

exports.Mode = Mode;
});                (function() {
                    window.require(["ace/mode/actionscript"], function(m) {
                        if (typeof module == "object" && typeof exports == "object" && module) {
                            module.exports = m;
                        }
                    });
                })();
            



( run in 0.478 second using v1.01-cache-2.11-cpan-84de2e75c66 )