App-Mxpress-PDF
view release on metacpan or search on metacpan
public/javascripts/ace/mode-terraform.js view on Meta::CPAN
{
token: "punctuation.quote.terraform",
regex: "'",
push:
[{
token: 'punctuation.quote.terraform',
regex: "'",
next: 'pop'
},
{include: "escaped_chars"},
{defaultToken: 'string'}]
},
{
token: "punctuation.quote.terraform",
regex: '"',
push:
[{
token: 'punctuation.quote.terraform',
regex: '"',
next: 'pop'
},
{include: "interpolation"},
{include: "escaped_chars"},
{defaultToken: 'string'}]
}
],
"escaped_chars": [
{
token: "constant.escaped_char.terraform",
regex: "\\\\."
}
],
"operators": [
{
token: "keyword.operator",
regex: "\\?|:|==|!=|>|<|>=|<=|&&|\\|\\\||!|%|&|\\*|\\+|\\-|/|="
}
],
"interpolation": [
{// TODO: double $
token: "punctuation.interpolated.begin.terraform",
regex: "\\$?\\$\\{",
push: [{
token: "punctuation.interpolated.end.terraform",
regex: "\\}",
next: "pop"
},
{include: "interpolated_variables"},
{include: "operators"},
{include: "constants"},
{include: "strings"},
{include: "functions"},
{include: "parenthesis"},
{defaultToken: "punctuation"}
]
}
],
"functions": [
{
token: "keyword.function.terraform",
regex: "\\b(abs|basename|base64decode|base64encode|base64gzip|base64sha256|base64sha512|bcrypt|ceil|chomp|chunklist|cidrhost|cidrnetmask|cidrsubnet|coalesce|coalescelist|compact|concat|contains|dirname|distinct|element|file|floor|flat...
}
],
"parenthesis": [
{
token: "paren.lparen",
regex: "\\["
},
{
token: "paren.rparen",
regex: "\\]"
}
]
};
this.normalizeRules();
};
oop.inherits(TerraformHighlightRules, TextHighlightRules);
exports.TerraformHighlightRules = TerraformHighlightRules;
});
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
( run in 2.076 seconds using v1.01-cache-2.11-cpan-5b529ec07f3 )