kopia lustrzana https://github.com/c9/core
Mon Apr 23 04:57:38 CEST 2018
rodzic
e015d0f99e
commit
a9e86b17fa
|
@ -2861,7 +2861,7 @@ exports.importCssString = function importCssString(cssText, id, container) {
|
|||
|
||||
if (root == doc)
|
||||
root = exports.getDocumentHead(doc);
|
||||
root.appendChild(style);
|
||||
root.insertBefore(style, root.firstChild);
|
||||
};
|
||||
|
||||
exports.importCssStylsheet = function(uri, doc) {
|
||||
|
@ -6193,6 +6193,8 @@ var TextInput = function(parentNode, host) {
|
|||
this.focus = function() {
|
||||
if (tempStyle || HAS_FOCUS_ARGS || this.$focusScroll == "browser")
|
||||
return text.focus({ preventScroll: true });
|
||||
if (!document.documentElement.contains(text))
|
||||
return;
|
||||
var top = text.style.top;
|
||||
text.style.position = "fixed";
|
||||
text.style.top = "0px";
|
||||
|
@ -7970,7 +7972,7 @@ oop.inherits(CommandManager, MultiHashHandler);
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (typeof command === "string")
|
||||
command = this.commands[command];
|
||||
|
||||
|
@ -7980,6 +7982,9 @@ oop.inherits(CommandManager, MultiHashHandler);
|
|||
if (editor && editor.$readOnly && !command.readOnly)
|
||||
return false;
|
||||
|
||||
if (this.$checkCommandState != false && command.isAvailable && !command.isAvailable(editor))
|
||||
return false;
|
||||
|
||||
var e = {editor: editor, command: command, args: args};
|
||||
e.returnValue = this._emit("exec", e);
|
||||
this._signal("afterExec", e);
|
||||
|
@ -19343,6 +19348,8 @@ exports.set = function(key, value) {
|
|||
exports.all = function() {
|
||||
return lang.copyObject(options);
|
||||
};
|
||||
|
||||
exports.$modes = {};
|
||||
exports.moduleUrl = function(name, component) {
|
||||
if (options.$moduleUrls[name])
|
||||
return options.$moduleUrls[name];
|
||||
|
@ -22918,7 +22925,7 @@ var Tokenizer = function(rules) {
|
|||
|
||||
this.removeCapturingGroups = function(src) {
|
||||
var r = src.replace(
|
||||
/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,
|
||||
/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!]|(\()/g,
|
||||
function(x, y) {return y ? "(?:" : x;}
|
||||
);
|
||||
return r;
|
||||
|
@ -23829,6 +23836,7 @@ exports.wordChars = String.fromCharCode.apply(null, str);
|
|||
|
||||
define("ace/mode/text",[], function(require, exports, module) {
|
||||
"use strict";
|
||||
var config = require("../config");
|
||||
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
@ -24066,8 +24074,15 @@ var Mode = function() {
|
|||
this.$modes = {};
|
||||
for (var i in mapping) {
|
||||
if (mapping[i]) {
|
||||
var Mode = mapping[i];
|
||||
var id = Mode.prototype.$id;
|
||||
var mode = config.$modes[id];
|
||||
if (!mode)
|
||||
config.$modes[id] = mode = new Mode();
|
||||
if (!config.$modes[i])
|
||||
config.$modes[i] = mode;
|
||||
this.$embeds.push(i);
|
||||
this.$modes[i] = new mapping[i]();
|
||||
this.$modes[i] = mode;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24087,8 +24102,16 @@ var Mode = function() {
|
|||
|
||||
this.$delegator = function(method, args, defaultHandler) {
|
||||
var state = args[0];
|
||||
if (typeof state != "string")
|
||||
if (typeof state != "string") {
|
||||
if (Array.isArray(state[2])) {
|
||||
var language = state[2][state[2].length - 1];
|
||||
var mode = this.$modes[language];
|
||||
if (mode)
|
||||
return mode[method].apply(mode, [state[1]].concat([].slice.call(args, 1)));
|
||||
}
|
||||
state = state[0];
|
||||
}
|
||||
|
||||
for (var i = 0; i < this.$embeds.length; i++) {
|
||||
if (!this.$modes[this.$embeds[i]]) continue;
|
||||
|
||||
|
@ -26596,7 +26619,7 @@ EditSession.$uid = 0;
|
|||
this._signal("tokenizerUpdate", e);
|
||||
};
|
||||
|
||||
this.$modes = {};
|
||||
this.$modes = config.$modes;
|
||||
this.$mode = null;
|
||||
this.$modeId = null;
|
||||
this.setMode = function(mode, cb) {
|
||||
|
@ -27320,15 +27343,11 @@ EditSession.$uid = 0;
|
|||
return Math.min(indentation, maxIndent);
|
||||
}
|
||||
function addSplit(screenPos) {
|
||||
var displayed = tokens.slice(lastSplit, screenPos);
|
||||
var len = displayed.length;
|
||||
displayed.join("")
|
||||
.replace(/12/g, function() {
|
||||
len -= 1;
|
||||
})
|
||||
.replace(/2/g, function() {
|
||||
len -= 1;
|
||||
});
|
||||
var len = screenPos - lastSplit;
|
||||
for (var i = lastSplit; i < screenPos; i++) {
|
||||
var ch = tokens[i];
|
||||
if (ch === 12 || ch === 2) len -= 1;
|
||||
}
|
||||
|
||||
if (!splits.length) {
|
||||
indent = getWrapIndent();
|
||||
|
@ -27834,15 +27853,22 @@ config.defineOptions(EditSession.prototype, "session", {
|
|||
if (val != this.$wrapAsCode) {
|
||||
this.$wrapAsCode = val;
|
||||
if (this.$useWrapMode) {
|
||||
this.$modified = true;
|
||||
this.$resetRowCache(0);
|
||||
this.$updateWrapData(0, this.getLength() - 1);
|
||||
this.$useWrapMode = false;
|
||||
this.setUseWrapMode(true);
|
||||
}
|
||||
}
|
||||
},
|
||||
initialValue: "auto"
|
||||
},
|
||||
indentedSoftWrap: { initialValue: true },
|
||||
indentedSoftWrap: {
|
||||
set: function() {
|
||||
if (this.$useWrapMode) {
|
||||
this.$useWrapMode = false;
|
||||
this.setUseWrapMode(true);
|
||||
}
|
||||
},
|
||||
initialValue: true
|
||||
},
|
||||
firstLineNumber: {
|
||||
set: function() {this._signal("changeBreakpoint");},
|
||||
initialValue: 1
|
||||
|
@ -30863,12 +30889,13 @@ var Lines = function(element, canvasHeight) {
|
|||
|
||||
this.cells = [];
|
||||
this.cellCache = [];
|
||||
this.$offsetCoefficient = 0;
|
||||
};
|
||||
|
||||
(function() {
|
||||
|
||||
this.moveContainer = function(config) {
|
||||
dom.translate(this.element, 0, -((config.firstRowScreen * config.lineHeight) % this.canvasHeight));
|
||||
dom.translate(this.element, 0, -((config.firstRowScreen * config.lineHeight) % this.canvasHeight) - config.offset * this.$offsetCoefficient);
|
||||
};
|
||||
|
||||
this.pageChanged = function(oldConfig, newConfig) {
|
||||
|
@ -30966,6 +30993,7 @@ var Lines = function(element, canvasHeight) {
|
|||
row: row
|
||||
};
|
||||
}
|
||||
cell.row = row;
|
||||
|
||||
return cell;
|
||||
};
|
||||
|
@ -30997,6 +31025,7 @@ var Gutter = function(parentEl) {
|
|||
this.$updateAnnotations = this.$updateAnnotations.bind(this);
|
||||
|
||||
this.$lines = new Lines(this.element);
|
||||
this.$lines.$offsetCoefficient = 1;
|
||||
};
|
||||
|
||||
(function() {
|
||||
|
@ -31318,7 +31347,6 @@ var Gutter = function(parentEl) {
|
|||
dom.setStyle(cell.element.style, "top", this.$lines.computeLineTop(row, config, session) + "px");
|
||||
|
||||
cell.text = text;
|
||||
cell.row = row;
|
||||
return cell;
|
||||
};
|
||||
|
||||
|
@ -32937,6 +32965,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
dom.setStyle(this.scrollBarH.element.style, "left", gutterWidth + "px");
|
||||
dom.setStyle(this.scroller.style, "left", gutterWidth + this.margin.left + "px");
|
||||
size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth() - this.margin.h);
|
||||
dom.setStyle(this.$gutter.style, "left", this.margin.left + "px");
|
||||
|
||||
var right = this.scrollBarV.getWidth() + "px";
|
||||
dom.setStyle(this.scrollBarH.element.style, "right", right);
|
||||
|
@ -33226,8 +33255,6 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.$updateScrollBarV();
|
||||
if (changes & this.CHANGE_H_SCROLL)
|
||||
this.$updateScrollBarH();
|
||||
|
||||
dom.translate(this.$gutter, this.margin.left, -config.offset);
|
||||
dom.translate(this.content, -this.scrollLeft, -config.offset);
|
||||
|
||||
var width = config.width + 2 * this.$padding + "px";
|
||||
|
@ -60371,6 +60398,7 @@ var supportedModes = {
|
|||
Erlang: ["erl|hrl"],
|
||||
Forth: ["frt|fs|ldr|fth|4th"],
|
||||
Fortran: ["f|f90"],
|
||||
FSharp: ["fsi|fs|ml|mli|fsx|fsscript"],
|
||||
FTL: ["ftl"],
|
||||
Gcode: ["gcode"],
|
||||
Gherkin: ["feature"],
|
||||
|
@ -60428,6 +60456,7 @@ var supportedModes = {
|
|||
Pascal: ["pas|p"],
|
||||
Perl: ["pl|pm"],
|
||||
pgSQL: ["pgsql"],
|
||||
PHP_Laravel_blade: ["blade.php"],
|
||||
PHP: ["php|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
|
||||
Pig: ["pig"],
|
||||
Powershell: ["ps1"],
|
||||
|
@ -60451,6 +60480,7 @@ var supportedModes = {
|
|||
SCSS: ["scss"],
|
||||
SH: ["sh|bash|^.bashrc"],
|
||||
SJS: ["sjs"],
|
||||
Slim: ["slim|skim"],
|
||||
Smarty: ["smarty|tpl"],
|
||||
snippets: ["snippets"],
|
||||
Soy_Template:["soy"],
|
||||
|
@ -60491,7 +60521,8 @@ var nameOverrides = {
|
|||
coffee: "CoffeeScript",
|
||||
HTML_Ruby: "HTML (Ruby)",
|
||||
HTML_Elixir: "HTML (Elixir)",
|
||||
FTL: "FreeMarker"
|
||||
FTL: "FreeMarker",
|
||||
PHP_Laravel_blade: "PHP (Blade Template)"
|
||||
};
|
||||
var modesByName = {};
|
||||
for (var name in supportedModes) {
|
||||
|
@ -149590,6 +149621,7 @@ define("plugins/c9.ide.keys/commands",[], function(require, exports, module) {
|
|||
var keyUtil = require("ace/lib/keys");
|
||||
var KeyBinding = require("ace/keyboard/keybinding").KeyBinding;
|
||||
var CommandManager = require("ace/commands/command_manager").CommandManager;
|
||||
CommandManager.prototype.$checkCommandState = false;
|
||||
|
||||
var nav = navigator.platform.toLowerCase();
|
||||
var platform = nav.indexOf("mac") > -1 ? "mac" : "win";
|
||||
|
|
|
@ -918,12 +918,13 @@ var Lines = function(element, canvasHeight) {
|
|||
|
||||
this.cells = [];
|
||||
this.cellCache = [];
|
||||
this.$offsetCoefficient = 0;
|
||||
};
|
||||
|
||||
(function() {
|
||||
|
||||
this.moveContainer = function(config) {
|
||||
dom.translate(this.element, 0, -((config.firstRowScreen * config.lineHeight) % this.canvasHeight));
|
||||
dom.translate(this.element, 0, -((config.firstRowScreen * config.lineHeight) % this.canvasHeight) - config.offset * this.$offsetCoefficient);
|
||||
};
|
||||
|
||||
this.pageChanged = function(oldConfig, newConfig) {
|
||||
|
@ -1021,6 +1022,7 @@ var Lines = function(element, canvasHeight) {
|
|||
row: row
|
||||
};
|
||||
}
|
||||
cell.row = row;
|
||||
|
||||
return cell;
|
||||
};
|
||||
|
@ -1052,6 +1054,7 @@ var Gutter = function(parentEl) {
|
|||
this.$updateAnnotations = this.$updateAnnotations.bind(this);
|
||||
|
||||
this.$lines = new Lines(this.element);
|
||||
this.$lines.$offsetCoefficient = 1;
|
||||
};
|
||||
|
||||
(function() {
|
||||
|
@ -1373,7 +1376,6 @@ var Gutter = function(parentEl) {
|
|||
dom.setStyle(cell.element.style, "top", this.$lines.computeLineTop(row, config, session) + "px");
|
||||
|
||||
cell.text = text;
|
||||
cell.row = row;
|
||||
return cell;
|
||||
};
|
||||
|
||||
|
@ -3169,6 +3171,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
dom.setStyle(this.scrollBarH.element.style, "left", gutterWidth + "px");
|
||||
dom.setStyle(this.scroller.style, "left", gutterWidth + this.margin.left + "px");
|
||||
size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth() - this.margin.h);
|
||||
dom.setStyle(this.$gutter.style, "left", this.margin.left + "px");
|
||||
|
||||
var right = this.scrollBarV.getWidth() + "px";
|
||||
dom.setStyle(this.scrollBarH.element.style, "right", right);
|
||||
|
@ -3458,8 +3461,6 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.$updateScrollBarV();
|
||||
if (changes & this.CHANGE_H_SCROLL)
|
||||
this.$updateScrollBarH();
|
||||
|
||||
dom.translate(this.$gutter, this.margin.left, -config.offset);
|
||||
dom.translate(this.content, -this.scrollLeft, -config.offset);
|
||||
|
||||
var width = config.width + 2 * this.$padding + "px";
|
||||
|
@ -5103,9 +5104,16 @@ var keyWordCompleter = {
|
|||
|
||||
var snippetCompleter = {
|
||||
getCompletions: function(editor, session, pos, prefix, callback) {
|
||||
var scopes = [];
|
||||
var token = session.getTokenAt(pos.row, pos.column);
|
||||
if (token && token.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/))
|
||||
scopes.push('html-tag');
|
||||
else
|
||||
scopes = snippetManager.getActiveScopes(editor);
|
||||
|
||||
var snippetMap = snippetManager.snippetMap;
|
||||
var completions = [];
|
||||
snippetManager.getActiveScopes(editor).forEach(function(scope) {
|
||||
scopes.forEach(function(scope) {
|
||||
var snippets = snippetMap[scope] || [];
|
||||
for (var i = snippets.length; i--;) {
|
||||
var s = snippets[i];
|
||||
|
|
|
@ -73,6 +73,7 @@ var supportedModes = {
|
|||
Erlang: ["erl|hrl"],
|
||||
Forth: ["frt|fs|ldr|fth|4th"],
|
||||
Fortran: ["f|f90"],
|
||||
FSharp: ["fsi|fs|ml|mli|fsx|fsscript"],
|
||||
FTL: ["ftl"],
|
||||
Gcode: ["gcode"],
|
||||
Gherkin: ["feature"],
|
||||
|
@ -130,6 +131,7 @@ var supportedModes = {
|
|||
Pascal: ["pas|p"],
|
||||
Perl: ["pl|pm"],
|
||||
pgSQL: ["pgsql"],
|
||||
PHP_Laravel_blade: ["blade.php"],
|
||||
PHP: ["php|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
|
||||
Pig: ["pig"],
|
||||
Powershell: ["ps1"],
|
||||
|
@ -153,6 +155,7 @@ var supportedModes = {
|
|||
SCSS: ["scss"],
|
||||
SH: ["sh|bash|^.bashrc"],
|
||||
SJS: ["sjs"],
|
||||
Slim: ["slim|skim"],
|
||||
Smarty: ["smarty|tpl"],
|
||||
snippets: ["snippets"],
|
||||
Soy_Template:["soy"],
|
||||
|
@ -193,7 +196,8 @@ var nameOverrides = {
|
|||
coffee: "CoffeeScript",
|
||||
HTML_Ruby: "HTML (Ruby)",
|
||||
HTML_Elixir: "HTML (Elixir)",
|
||||
FTL: "FreeMarker"
|
||||
FTL: "FreeMarker",
|
||||
PHP_Laravel_blade: "PHP (Blade Template)"
|
||||
};
|
||||
var modesByName = {};
|
||||
for (var name in supportedModes) {
|
||||
|
|
|
@ -132,6 +132,7 @@ var supportedModes = {
|
|||
Erlang: ["erl|hrl"],
|
||||
Forth: ["frt|fs|ldr|fth|4th"],
|
||||
Fortran: ["f|f90"],
|
||||
FSharp: ["fsi|fs|ml|mli|fsx|fsscript"],
|
||||
FTL: ["ftl"],
|
||||
Gcode: ["gcode"],
|
||||
Gherkin: ["feature"],
|
||||
|
@ -189,6 +190,7 @@ var supportedModes = {
|
|||
Pascal: ["pas|p"],
|
||||
Perl: ["pl|pm"],
|
||||
pgSQL: ["pgsql"],
|
||||
PHP_Laravel_blade: ["blade.php"],
|
||||
PHP: ["php|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
|
||||
Pig: ["pig"],
|
||||
Powershell: ["ps1"],
|
||||
|
@ -212,6 +214,7 @@ var supportedModes = {
|
|||
SCSS: ["scss"],
|
||||
SH: ["sh|bash|^.bashrc"],
|
||||
SJS: ["sjs"],
|
||||
Slim: ["slim|skim"],
|
||||
Smarty: ["smarty|tpl"],
|
||||
snippets: ["snippets"],
|
||||
Soy_Template:["soy"],
|
||||
|
@ -252,7 +255,8 @@ var nameOverrides = {
|
|||
coffee: "CoffeeScript",
|
||||
HTML_Ruby: "HTML (Ruby)",
|
||||
HTML_Elixir: "HTML (Elixir)",
|
||||
FTL: "FreeMarker"
|
||||
FTL: "FreeMarker",
|
||||
PHP_Laravel_blade: "PHP (Blade Template)"
|
||||
};
|
||||
var modesByName = {};
|
||||
for (var name in supportedModes) {
|
||||
|
@ -476,6 +480,9 @@ var optionGroups = {
|
|||
type: "number",
|
||||
path: "printMarginColumn"
|
||||
}],
|
||||
"Indented Soft Wrap": {
|
||||
path: "indentedSoftWrap"
|
||||
},
|
||||
"Highlight selected word": {
|
||||
path: "highlightSelectedWord"
|
||||
},
|
||||
|
@ -654,7 +661,7 @@ var OptionPanel = function(editor, element) {
|
|||
value = parseFloat(value);
|
||||
if (option.onchange)
|
||||
option.onchange(value);
|
||||
else
|
||||
else if (option.path)
|
||||
this.editor.setOption(option.path, value);
|
||||
this._signal("setOption", {name: option.path, value: value});
|
||||
};
|
||||
|
|
|
@ -132,6 +132,7 @@ var supportedModes = {
|
|||
Erlang: ["erl|hrl"],
|
||||
Forth: ["frt|fs|ldr|fth|4th"],
|
||||
Fortran: ["f|f90"],
|
||||
FSharp: ["fsi|fs|ml|mli|fsx|fsscript"],
|
||||
FTL: ["ftl"],
|
||||
Gcode: ["gcode"],
|
||||
Gherkin: ["feature"],
|
||||
|
@ -189,6 +190,7 @@ var supportedModes = {
|
|||
Pascal: ["pas|p"],
|
||||
Perl: ["pl|pm"],
|
||||
pgSQL: ["pgsql"],
|
||||
PHP_Laravel_blade: ["blade.php"],
|
||||
PHP: ["php|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
|
||||
Pig: ["pig"],
|
||||
Powershell: ["ps1"],
|
||||
|
@ -212,6 +214,7 @@ var supportedModes = {
|
|||
SCSS: ["scss"],
|
||||
SH: ["sh|bash|^.bashrc"],
|
||||
SJS: ["sjs"],
|
||||
Slim: ["slim|skim"],
|
||||
Smarty: ["smarty|tpl"],
|
||||
snippets: ["snippets"],
|
||||
Soy_Template:["soy"],
|
||||
|
@ -252,7 +255,8 @@ var nameOverrides = {
|
|||
coffee: "CoffeeScript",
|
||||
HTML_Ruby: "HTML (Ruby)",
|
||||
HTML_Elixir: "HTML (Elixir)",
|
||||
FTL: "FreeMarker"
|
||||
FTL: "FreeMarker",
|
||||
PHP_Laravel_blade: "PHP (Blade Template)"
|
||||
};
|
||||
var modesByName = {};
|
||||
for (var name in supportedModes) {
|
||||
|
@ -476,6 +480,9 @@ var optionGroups = {
|
|||
type: "number",
|
||||
path: "printMarginColumn"
|
||||
}],
|
||||
"Indented Soft Wrap": {
|
||||
path: "indentedSoftWrap"
|
||||
},
|
||||
"Highlight selected word": {
|
||||
path: "highlightSelectedWord"
|
||||
},
|
||||
|
@ -654,7 +661,7 @@ var OptionPanel = function(editor, element) {
|
|||
value = parseFloat(value);
|
||||
if (option.onchange)
|
||||
option.onchange(value);
|
||||
else
|
||||
else if (option.path)
|
||||
this.editor.setOption(option.path, value);
|
||||
this._signal("setOption", {name: option.path, value: value});
|
||||
};
|
||||
|
|
|
@ -10,12 +10,13 @@ var Lines = function(element, canvasHeight) {
|
|||
|
||||
this.cells = [];
|
||||
this.cellCache = [];
|
||||
this.$offsetCoefficient = 0;
|
||||
};
|
||||
|
||||
(function() {
|
||||
|
||||
this.moveContainer = function(config) {
|
||||
dom.translate(this.element, 0, -((config.firstRowScreen * config.lineHeight) % this.canvasHeight));
|
||||
dom.translate(this.element, 0, -((config.firstRowScreen * config.lineHeight) % this.canvasHeight) - config.offset * this.$offsetCoefficient);
|
||||
};
|
||||
|
||||
this.pageChanged = function(oldConfig, newConfig) {
|
||||
|
@ -113,6 +114,7 @@ var Lines = function(element, canvasHeight) {
|
|||
row: row
|
||||
};
|
||||
}
|
||||
cell.row = row;
|
||||
|
||||
return cell;
|
||||
};
|
||||
|
@ -144,6 +146,7 @@ var Gutter = function(parentEl) {
|
|||
this.$updateAnnotations = this.$updateAnnotations.bind(this);
|
||||
|
||||
this.$lines = new Lines(this.element);
|
||||
this.$lines.$offsetCoefficient = 1;
|
||||
};
|
||||
|
||||
(function() {
|
||||
|
@ -465,7 +468,6 @@ var Gutter = function(parentEl) {
|
|||
dom.setStyle(cell.element.style, "top", this.$lines.computeLineTop(row, config, session) + "px");
|
||||
|
||||
cell.text = text;
|
||||
cell.row = row;
|
||||
return cell;
|
||||
};
|
||||
|
||||
|
@ -2261,6 +2263,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
dom.setStyle(this.scrollBarH.element.style, "left", gutterWidth + "px");
|
||||
dom.setStyle(this.scroller.style, "left", gutterWidth + this.margin.left + "px");
|
||||
size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth() - this.margin.h);
|
||||
dom.setStyle(this.$gutter.style, "left", this.margin.left + "px");
|
||||
|
||||
var right = this.scrollBarV.getWidth() + "px";
|
||||
dom.setStyle(this.scrollBarH.element.style, "right", right);
|
||||
|
@ -2550,8 +2553,6 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.$updateScrollBarV();
|
||||
if (changes & this.CHANGE_H_SCROLL)
|
||||
this.$updateScrollBarH();
|
||||
|
||||
dom.translate(this.$gutter, this.margin.left, -config.offset);
|
||||
dom.translate(this.content, -this.scrollLeft, -config.offset);
|
||||
|
||||
var width = config.width + 2 * this.$padding + "px";
|
||||
|
|
|
@ -10,12 +10,13 @@ var Lines = function(element, canvasHeight) {
|
|||
|
||||
this.cells = [];
|
||||
this.cellCache = [];
|
||||
this.$offsetCoefficient = 0;
|
||||
};
|
||||
|
||||
(function() {
|
||||
|
||||
this.moveContainer = function(config) {
|
||||
dom.translate(this.element, 0, -((config.firstRowScreen * config.lineHeight) % this.canvasHeight));
|
||||
dom.translate(this.element, 0, -((config.firstRowScreen * config.lineHeight) % this.canvasHeight) - config.offset * this.$offsetCoefficient);
|
||||
};
|
||||
|
||||
this.pageChanged = function(oldConfig, newConfig) {
|
||||
|
@ -113,6 +114,7 @@ var Lines = function(element, canvasHeight) {
|
|||
row: row
|
||||
};
|
||||
}
|
||||
cell.row = row;
|
||||
|
||||
return cell;
|
||||
};
|
||||
|
|
|
@ -618,12 +618,13 @@ var Lines = function(element, canvasHeight) {
|
|||
|
||||
this.cells = [];
|
||||
this.cellCache = [];
|
||||
this.$offsetCoefficient = 0;
|
||||
};
|
||||
|
||||
(function() {
|
||||
|
||||
this.moveContainer = function(config) {
|
||||
dom.translate(this.element, 0, -((config.firstRowScreen * config.lineHeight) % this.canvasHeight));
|
||||
dom.translate(this.element, 0, -((config.firstRowScreen * config.lineHeight) % this.canvasHeight) - config.offset * this.$offsetCoefficient);
|
||||
};
|
||||
|
||||
this.pageChanged = function(oldConfig, newConfig) {
|
||||
|
@ -721,6 +722,7 @@ var Lines = function(element, canvasHeight) {
|
|||
row: row
|
||||
};
|
||||
}
|
||||
cell.row = row;
|
||||
|
||||
return cell;
|
||||
};
|
||||
|
@ -752,6 +754,7 @@ var Gutter = function(parentEl) {
|
|||
this.$updateAnnotations = this.$updateAnnotations.bind(this);
|
||||
|
||||
this.$lines = new Lines(this.element);
|
||||
this.$lines.$offsetCoefficient = 1;
|
||||
};
|
||||
|
||||
(function() {
|
||||
|
@ -1073,7 +1076,6 @@ var Gutter = function(parentEl) {
|
|||
dom.setStyle(cell.element.style, "top", this.$lines.computeLineTop(row, config, session) + "px");
|
||||
|
||||
cell.text = text;
|
||||
cell.row = row;
|
||||
return cell;
|
||||
};
|
||||
|
||||
|
@ -2869,6 +2871,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
dom.setStyle(this.scrollBarH.element.style, "left", gutterWidth + "px");
|
||||
dom.setStyle(this.scroller.style, "left", gutterWidth + this.margin.left + "px");
|
||||
size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth() - this.margin.h);
|
||||
dom.setStyle(this.$gutter.style, "left", this.margin.left + "px");
|
||||
|
||||
var right = this.scrollBarV.getWidth() + "px";
|
||||
dom.setStyle(this.scrollBarH.element.style, "right", right);
|
||||
|
@ -3158,8 +3161,6 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.$updateScrollBarV();
|
||||
if (changes & this.CHANGE_H_SCROLL)
|
||||
this.$updateScrollBarH();
|
||||
|
||||
dom.translate(this.$gutter, this.margin.left, -config.offset);
|
||||
dom.translate(this.content, -this.scrollLeft, -config.offset);
|
||||
|
||||
var width = config.width + 2 * this.$padding + "px";
|
||||
|
|
|
@ -0,0 +1,164 @@
|
|||
define("ace/mode/fsharp_highlight_rules",[], function (require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
var FSharpHighlightRules = function () {
|
||||
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"variable": "this",
|
||||
"keyword": 'abstract|assert|base|begin|class|default|delegate|done|downcast|downto|elif\
|
||||
|else|exception|extern|false|finally|function|global|inherit|inline|interface|internal|lazy|match\
|
||||
|member|module|mutable|namespace|open|or|override|private|public|rec|return|return!|select|static\
|
||||
|struct|then|to|true|try|typeof|upcast|use|use!|val|void|when|while|with|yield|yield!|__SOURCE_DIRECTORY__\
|
||||
|as|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue\
|
||||
|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall\
|
||||
|trait|virtual|volatile|and|do|end|for|fun|if|in|let|let!|new|not|null|of|endif',
|
||||
"constant": "true|false"
|
||||
}, "identifier");
|
||||
|
||||
var floatNumber = "(?:(?:(?:(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.))|(?:\\d+))(?:[eE][+-]?\\d+))|(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.)))";
|
||||
|
||||
this.$rules = {
|
||||
"start": [
|
||||
{
|
||||
token: "variable.classes",
|
||||
regex: '\\[\\<[.]*\\>\\]'
|
||||
},
|
||||
{
|
||||
token: "comment",
|
||||
regex: '//.*$'
|
||||
},
|
||||
{
|
||||
token: "comment.start",
|
||||
regex: /\(\*/,
|
||||
push: "blockComment"
|
||||
},
|
||||
{
|
||||
token: "string",
|
||||
regex: "'.'"
|
||||
},
|
||||
{
|
||||
token: "string",
|
||||
regex: '"""',
|
||||
next : [{
|
||||
token : "constant.language.escape",
|
||||
regex : /\\./,
|
||||
next : "qqstring"
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '"""',
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}]
|
||||
},
|
||||
{
|
||||
token: "string",
|
||||
regex: '"',
|
||||
next : [{
|
||||
token : "constant.language.escape",
|
||||
regex : /\\./,
|
||||
next : "qqstring"
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '"',
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}]
|
||||
},
|
||||
{
|
||||
token: ["verbatim.string", "string"],
|
||||
regex: '(@?)(")',
|
||||
stateName : "qqstring",
|
||||
next : [{
|
||||
token : "constant.language.escape",
|
||||
regex : '""'
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '"',
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}]
|
||||
},
|
||||
{
|
||||
token: "constant.float",
|
||||
regex: "(?:" + floatNumber + "|\\d+)[jJ]\\b"
|
||||
},
|
||||
{
|
||||
token: "constant.float",
|
||||
regex: floatNumber
|
||||
},
|
||||
{
|
||||
token: "constant.integer",
|
||||
regex: "(?:(?:(?:[1-9]\\d*)|(?:0))|(?:0[oO]?[0-7]+)|(?:0[xX][\\dA-Fa-f]+)|(?:0[bB][01]+))\\b"
|
||||
},
|
||||
{
|
||||
token: ["keyword.type", "variable"],
|
||||
regex: "(type\\s)([a-zA-Z0-9_$\-]*\\b)"
|
||||
},
|
||||
{
|
||||
token: keywordMapper,
|
||||
regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
||||
},
|
||||
{
|
||||
token: "keyword.operator",
|
||||
regex: "\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|="
|
||||
},
|
||||
{
|
||||
token: "paren.lpar",
|
||||
regex: "[[({]"
|
||||
},
|
||||
{
|
||||
token: "paren.rpar",
|
||||
regex: "[\\])}]"
|
||||
}
|
||||
],
|
||||
blockComment: [{
|
||||
regex: /\(\*/,
|
||||
token: "comment.start",
|
||||
push: "blockComment"
|
||||
}, {
|
||||
regex: /\*\)/,
|
||||
token: "comment.end",
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "comment"
|
||||
}]
|
||||
};
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
|
||||
oop.inherits(FSharpHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.FSharpHighlightRules = FSharpHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/fsharp",[], function (require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var FSharpHighlightRules = require("./fsharp_highlight_rules").FSharpHighlightRules;
|
||||
|
||||
var Mode = function () {
|
||||
TextMode.call(this);
|
||||
this.HighlightRules = FSharpHighlightRules;
|
||||
};
|
||||
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
|
||||
(function () {
|
||||
this.lineCommentStart = "//";
|
||||
this.blockComment = {start: "(*", end: "*)"};
|
||||
|
||||
|
||||
this.$id = "ace/mode/fsharp";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
|
@ -1,3 +1,194 @@
|
|||
define("ace/mode/css_highlight_rules",[], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var lang = require("../lib/lang");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index";
|
||||
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
|
||||
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom";
|
||||
var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
|
||||
var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
|
||||
|
||||
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))";
|
||||
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
|
||||
var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
|
||||
|
||||
var CssHighlightRules = function() {
|
||||
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"support.function": supportFunction,
|
||||
"support.constant": supportConstant,
|
||||
"support.type": supportType,
|
||||
"support.constant.color": supportConstantColor,
|
||||
"support.constant.fonts": supportConstantFonts
|
||||
}, "text", true);
|
||||
this.$rules = {
|
||||
"start" : [{
|
||||
include : ["strings", "url", "comments"]
|
||||
}, {
|
||||
token: "paren.lparen",
|
||||
regex: "\\{",
|
||||
next: "ruleset"
|
||||
}, {
|
||||
token: "paren.rparen",
|
||||
regex: "\\}"
|
||||
}, {
|
||||
token: "string",
|
||||
regex: "@(?!viewport)",
|
||||
next: "media"
|
||||
}, {
|
||||
token: "keyword",
|
||||
regex: "#[a-z0-9-_]+"
|
||||
}, {
|
||||
token: "keyword",
|
||||
regex: "%"
|
||||
}, {
|
||||
token: "variable",
|
||||
regex: "\\.[a-z0-9-_]+"
|
||||
}, {
|
||||
token: "string",
|
||||
regex: ":[a-z0-9-_]+"
|
||||
}, {
|
||||
token : "constant.numeric",
|
||||
regex : numRe
|
||||
}, {
|
||||
token: "constant",
|
||||
regex: "[a-z0-9-_]+"
|
||||
}, {
|
||||
caseInsensitive: true
|
||||
}],
|
||||
|
||||
"media": [{
|
||||
include : ["strings", "url", "comments"]
|
||||
}, {
|
||||
token: "paren.lparen",
|
||||
regex: "\\{",
|
||||
next: "start"
|
||||
}, {
|
||||
token: "paren.rparen",
|
||||
regex: "\\}",
|
||||
next: "start"
|
||||
}, {
|
||||
token: "string",
|
||||
regex: ";",
|
||||
next: "start"
|
||||
}, {
|
||||
token: "keyword",
|
||||
regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
|
||||
+ "|page|font|keyframes|viewport|counter-style|font-feature-values"
|
||||
+ "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
|
||||
}],
|
||||
|
||||
"comments" : [{
|
||||
token: "comment", // multi line comment
|
||||
regex: "\\/\\*",
|
||||
push: [{
|
||||
token : "comment",
|
||||
regex : "\\*\\/",
|
||||
next : "pop"
|
||||
}, {
|
||||
defaultToken : "comment"
|
||||
}]
|
||||
}],
|
||||
|
||||
"ruleset" : [{
|
||||
regex : "-(webkit|ms|moz|o)-",
|
||||
token : "text"
|
||||
}, {
|
||||
token : "paren.rparen",
|
||||
regex : "\\}",
|
||||
next : "start"
|
||||
}, {
|
||||
include : ["strings", "url", "comments"]
|
||||
}, {
|
||||
token : ["constant.numeric", "keyword"],
|
||||
regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"
|
||||
}, {
|
||||
token : "constant.numeric",
|
||||
regex : numRe
|
||||
}, {
|
||||
token : "constant.numeric", // hex6 color
|
||||
regex : "#[a-f0-9]{6}"
|
||||
}, {
|
||||
token : "constant.numeric", // hex3 color
|
||||
regex : "#[a-f0-9]{3}"
|
||||
}, {
|
||||
token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
|
||||
regex : pseudoElements
|
||||
}, {
|
||||
token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
|
||||
regex : pseudoClasses
|
||||
}, {
|
||||
include: "url"
|
||||
}, {
|
||||
token : keywordMapper,
|
||||
regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
|
||||
}, {
|
||||
caseInsensitive: true
|
||||
}],
|
||||
|
||||
url: [{
|
||||
token : "support.function",
|
||||
regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
|
||||
push: [{
|
||||
token : "support.function",
|
||||
regex : "\\)",
|
||||
next : "pop"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}]
|
||||
}],
|
||||
|
||||
strings: [{
|
||||
token : "string.start",
|
||||
regex : "'",
|
||||
push : [{
|
||||
token : "string.end",
|
||||
regex : "'|$",
|
||||
next: "pop"
|
||||
}, {
|
||||
include : "escapes"
|
||||
}, {
|
||||
token : "constant.language.escape",
|
||||
regex : /\\$/,
|
||||
consumeLineEnd: true
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}]
|
||||
}, {
|
||||
token : "string.start",
|
||||
regex : '"',
|
||||
push : [{
|
||||
token : "string.end",
|
||||
regex : '"|$',
|
||||
next: "pop"
|
||||
}, {
|
||||
include : "escapes"
|
||||
}, {
|
||||
token : "constant.language.escape",
|
||||
regex : /\\$/,
|
||||
consumeLineEnd: true
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}]
|
||||
}],
|
||||
escapes: [{
|
||||
token : "constant.language.escape",
|
||||
regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
|
||||
}]
|
||||
|
||||
};
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
oop.inherits(CssHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.CssHighlightRules = CssHighlightRules;
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/doc_comment_highlight_rules",[], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
|
@ -723,197 +914,6 @@ oop.inherits(XmlHighlightRules, TextHighlightRules);
|
|||
exports.XmlHighlightRules = XmlHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/css_highlight_rules",[], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var lang = require("../lib/lang");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index";
|
||||
var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
|
||||
var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom";
|
||||
var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
|
||||
var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
|
||||
|
||||
var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))";
|
||||
var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
|
||||
var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
|
||||
|
||||
var CssHighlightRules = function() {
|
||||
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"support.function": supportFunction,
|
||||
"support.constant": supportConstant,
|
||||
"support.type": supportType,
|
||||
"support.constant.color": supportConstantColor,
|
||||
"support.constant.fonts": supportConstantFonts
|
||||
}, "text", true);
|
||||
this.$rules = {
|
||||
"start" : [{
|
||||
include : ["strings", "url", "comments"]
|
||||
}, {
|
||||
token: "paren.lparen",
|
||||
regex: "\\{",
|
||||
next: "ruleset"
|
||||
}, {
|
||||
token: "paren.rparen",
|
||||
regex: "\\}"
|
||||
}, {
|
||||
token: "string",
|
||||
regex: "@(?!viewport)",
|
||||
next: "media"
|
||||
}, {
|
||||
token: "keyword",
|
||||
regex: "#[a-z0-9-_]+"
|
||||
}, {
|
||||
token: "keyword",
|
||||
regex: "%"
|
||||
}, {
|
||||
token: "variable",
|
||||
regex: "\\.[a-z0-9-_]+"
|
||||
}, {
|
||||
token: "string",
|
||||
regex: ":[a-z0-9-_]+"
|
||||
}, {
|
||||
token : "constant.numeric",
|
||||
regex : numRe
|
||||
}, {
|
||||
token: "constant",
|
||||
regex: "[a-z0-9-_]+"
|
||||
}, {
|
||||
caseInsensitive: true
|
||||
}],
|
||||
|
||||
"media": [{
|
||||
include : ["strings", "url", "comments"]
|
||||
}, {
|
||||
token: "paren.lparen",
|
||||
regex: "\\{",
|
||||
next: "start"
|
||||
}, {
|
||||
token: "paren.rparen",
|
||||
regex: "\\}",
|
||||
next: "start"
|
||||
}, {
|
||||
token: "string",
|
||||
regex: ";",
|
||||
next: "start"
|
||||
}, {
|
||||
token: "keyword",
|
||||
regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
|
||||
+ "|page|font|keyframes|viewport|counter-style|font-feature-values"
|
||||
+ "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
|
||||
}],
|
||||
|
||||
"comments" : [{
|
||||
token: "comment", // multi line comment
|
||||
regex: "\\/\\*",
|
||||
push: [{
|
||||
token : "comment",
|
||||
regex : "\\*\\/",
|
||||
next : "pop"
|
||||
}, {
|
||||
defaultToken : "comment"
|
||||
}]
|
||||
}],
|
||||
|
||||
"ruleset" : [{
|
||||
regex : "-(webkit|ms|moz|o)-",
|
||||
token : "text"
|
||||
}, {
|
||||
token : "paren.rparen",
|
||||
regex : "\\}",
|
||||
next : "start"
|
||||
}, {
|
||||
include : ["strings", "url", "comments"]
|
||||
}, {
|
||||
token : ["constant.numeric", "keyword"],
|
||||
regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"
|
||||
}, {
|
||||
token : "constant.numeric",
|
||||
regex : numRe
|
||||
}, {
|
||||
token : "constant.numeric", // hex6 color
|
||||
regex : "#[a-f0-9]{6}"
|
||||
}, {
|
||||
token : "constant.numeric", // hex3 color
|
||||
regex : "#[a-f0-9]{3}"
|
||||
}, {
|
||||
token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
|
||||
regex : pseudoElements
|
||||
}, {
|
||||
token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
|
||||
regex : pseudoClasses
|
||||
}, {
|
||||
include: "url"
|
||||
}, {
|
||||
token : keywordMapper,
|
||||
regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
|
||||
}, {
|
||||
caseInsensitive: true
|
||||
}],
|
||||
|
||||
url: [{
|
||||
token : "support.function",
|
||||
regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
|
||||
push: [{
|
||||
token : "support.function",
|
||||
regex : "\\)",
|
||||
next : "pop"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}]
|
||||
}],
|
||||
|
||||
strings: [{
|
||||
token : "string.start",
|
||||
regex : "'",
|
||||
push : [{
|
||||
token : "string.end",
|
||||
regex : "'|$",
|
||||
next: "pop"
|
||||
}, {
|
||||
include : "escapes"
|
||||
}, {
|
||||
token : "constant.language.escape",
|
||||
regex : /\\$/,
|
||||
consumeLineEnd: true
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}]
|
||||
}, {
|
||||
token : "string.start",
|
||||
regex : '"',
|
||||
push : [{
|
||||
token : "string.end",
|
||||
regex : '"|$',
|
||||
next: "pop"
|
||||
}, {
|
||||
include : "escapes"
|
||||
}, {
|
||||
token : "constant.language.escape",
|
||||
regex : /\\$/,
|
||||
consumeLineEnd: true
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}]
|
||||
}],
|
||||
escapes: [{
|
||||
token : "constant.language.escape",
|
||||
regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
|
||||
}]
|
||||
|
||||
};
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
oop.inherits(CssHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.CssHighlightRules = CssHighlightRules;
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/html_highlight_rules",[], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
|
@ -999,28 +999,60 @@ exports.HtmlHighlightRules = HtmlHighlightRules;
|
|||
define("ace/mode/markdown_highlight_rules",[], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var modes = require("../config").$modes;
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var lang = require("../lib/lang");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
|
||||
var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
|
||||
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
|
||||
var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
|
||||
|
||||
var escaped = function(ch) {
|
||||
return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*";
|
||||
};
|
||||
|
||||
function github_embed(tag, prefix) {
|
||||
return { // Github style block
|
||||
token : "support.function",
|
||||
regex : "^\\s*```" + tag + "\\s*$",
|
||||
push : prefix + "start"
|
||||
};
|
||||
}
|
||||
|
||||
var MarkdownHighlightRules = function() {
|
||||
HtmlHighlightRules.call(this);
|
||||
var codeBlockStartRule = {
|
||||
token : "support.function",
|
||||
regex : /^\s*(```+[^`]*|~~~+[^~]*)$/,
|
||||
onMatch: function(value, state, stack, line) {
|
||||
var m = value.match(/^(\s*)([`~]+)(.*)/);
|
||||
var language = /[\w-]+|$/.exec(m[3])[0];
|
||||
if (!modes[language])
|
||||
language = "";
|
||||
stack.unshift("githubblock", [], [m[1], m[2], language], state);
|
||||
return this.token;
|
||||
},
|
||||
next : "githubblock"
|
||||
};
|
||||
var codeBlockRules = [{
|
||||
token : "support.function",
|
||||
regex : ".*",
|
||||
onMatch: function(value, state, stack, line) {
|
||||
var embedState = stack[1];
|
||||
var indent = stack[2][0];
|
||||
var endMarker = stack[2][1];
|
||||
var language = stack[2][2];
|
||||
|
||||
var m = /^(\s*)(`+|~+)\s*$/.exec(value);
|
||||
if (
|
||||
m && m[1].length < indent.length + 3
|
||||
&& m[2].length >= endMarker.length && m[2][0] == endMarker[0]
|
||||
) {
|
||||
stack.splice(0, 3);
|
||||
this.next = stack.shift();
|
||||
return this.token;
|
||||
}
|
||||
this.next = "";
|
||||
if (language && modes[language]) {
|
||||
var data = modes[language].getTokenizer().getLineTokens(value, embedState.slice(0));
|
||||
stack[1] = data.state;
|
||||
return data.tokens;
|
||||
}
|
||||
return this.token;
|
||||
}
|
||||
}];
|
||||
|
||||
this.$rules["start"].unshift({
|
||||
token : "empty_line",
|
||||
regex : '^$',
|
||||
|
@ -1038,15 +1070,8 @@ var MarkdownHighlightRules = function() {
|
|||
regex : /^#{1,6}(?=\s|$)/,
|
||||
next : "header"
|
||||
},
|
||||
github_embed("(?:javascript|js)", "jscode-"),
|
||||
github_embed("xml", "xmlcode-"),
|
||||
github_embed("html", "htmlcode-"),
|
||||
github_embed("css", "csscode-"),
|
||||
{ // Github style block
|
||||
token : "support.function",
|
||||
regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",
|
||||
next : "githubblock"
|
||||
}, { // block quote
|
||||
codeBlockStartRule,
|
||||
{ // block quote
|
||||
token : "string.blockquote",
|
||||
regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
|
||||
next : "blockquote"
|
||||
|
@ -1128,11 +1153,9 @@ var MarkdownHighlightRules = function() {
|
|||
next : "listblock-start"
|
||||
}, {
|
||||
include : "basic", noEscape: true
|
||||
}, { // Github style block
|
||||
token : "support.function",
|
||||
regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
|
||||
next : "githubblock"
|
||||
}, {
|
||||
},
|
||||
codeBlockStartRule,
|
||||
{
|
||||
defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly
|
||||
} ],
|
||||
|
||||
|
@ -1150,39 +1173,9 @@ var MarkdownHighlightRules = function() {
|
|||
defaultToken : "string.blockquote"
|
||||
} ],
|
||||
|
||||
"githubblock" : [ {
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken : "support.function"
|
||||
} ]
|
||||
"githubblock" : codeBlockRules
|
||||
});
|
||||
|
||||
this.embedRules(JavaScriptHighlightRules, "jscode-", [{
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.embedRules(HtmlHighlightRules, "htmlcode-", [{
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.embedRules(CssHighlightRules, "csscode-", [{
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.embedRules(XmlHighlightRules, "xmlcode-", [{
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
oop.inherits(MarkdownHighlightRules, TextHighlightRules);
|
||||
|
|
|
@ -2519,28 +2519,60 @@ exports.Mode = Mode;
|
|||
define("ace/mode/markdown_highlight_rules",[], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var modes = require("../config").$modes;
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var lang = require("../lib/lang");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
|
||||
var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
|
||||
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
|
||||
var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
|
||||
|
||||
var escaped = function(ch) {
|
||||
return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*";
|
||||
};
|
||||
|
||||
function github_embed(tag, prefix) {
|
||||
return { // Github style block
|
||||
token : "support.function",
|
||||
regex : "^\\s*```" + tag + "\\s*$",
|
||||
push : prefix + "start"
|
||||
};
|
||||
}
|
||||
|
||||
var MarkdownHighlightRules = function() {
|
||||
HtmlHighlightRules.call(this);
|
||||
var codeBlockStartRule = {
|
||||
token : "support.function",
|
||||
regex : /^\s*(```+[^`]*|~~~+[^~]*)$/,
|
||||
onMatch: function(value, state, stack, line) {
|
||||
var m = value.match(/^(\s*)([`~]+)(.*)/);
|
||||
var language = /[\w-]+|$/.exec(m[3])[0];
|
||||
if (!modes[language])
|
||||
language = "";
|
||||
stack.unshift("githubblock", [], [m[1], m[2], language], state);
|
||||
return this.token;
|
||||
},
|
||||
next : "githubblock"
|
||||
};
|
||||
var codeBlockRules = [{
|
||||
token : "support.function",
|
||||
regex : ".*",
|
||||
onMatch: function(value, state, stack, line) {
|
||||
var embedState = stack[1];
|
||||
var indent = stack[2][0];
|
||||
var endMarker = stack[2][1];
|
||||
var language = stack[2][2];
|
||||
|
||||
var m = /^(\s*)(`+|~+)\s*$/.exec(value);
|
||||
if (
|
||||
m && m[1].length < indent.length + 3
|
||||
&& m[2].length >= endMarker.length && m[2][0] == endMarker[0]
|
||||
) {
|
||||
stack.splice(0, 3);
|
||||
this.next = stack.shift();
|
||||
return this.token;
|
||||
}
|
||||
this.next = "";
|
||||
if (language && modes[language]) {
|
||||
var data = modes[language].getTokenizer().getLineTokens(value, embedState.slice(0));
|
||||
stack[1] = data.state;
|
||||
return data.tokens;
|
||||
}
|
||||
return this.token;
|
||||
}
|
||||
}];
|
||||
|
||||
this.$rules["start"].unshift({
|
||||
token : "empty_line",
|
||||
regex : '^$',
|
||||
|
@ -2558,15 +2590,8 @@ var MarkdownHighlightRules = function() {
|
|||
regex : /^#{1,6}(?=\s|$)/,
|
||||
next : "header"
|
||||
},
|
||||
github_embed("(?:javascript|js)", "jscode-"),
|
||||
github_embed("xml", "xmlcode-"),
|
||||
github_embed("html", "htmlcode-"),
|
||||
github_embed("css", "csscode-"),
|
||||
{ // Github style block
|
||||
token : "support.function",
|
||||
regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",
|
||||
next : "githubblock"
|
||||
}, { // block quote
|
||||
codeBlockStartRule,
|
||||
{ // block quote
|
||||
token : "string.blockquote",
|
||||
regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
|
||||
next : "blockquote"
|
||||
|
@ -2648,11 +2673,9 @@ var MarkdownHighlightRules = function() {
|
|||
next : "listblock-start"
|
||||
}, {
|
||||
include : "basic", noEscape: true
|
||||
}, { // Github style block
|
||||
token : "support.function",
|
||||
regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
|
||||
next : "githubblock"
|
||||
}, {
|
||||
},
|
||||
codeBlockStartRule,
|
||||
{
|
||||
defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly
|
||||
} ],
|
||||
|
||||
|
@ -2670,39 +2693,9 @@ var MarkdownHighlightRules = function() {
|
|||
defaultToken : "string.blockquote"
|
||||
} ],
|
||||
|
||||
"githubblock" : [ {
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken : "support.function"
|
||||
} ]
|
||||
"githubblock" : codeBlockRules
|
||||
});
|
||||
|
||||
this.embedRules(JavaScriptHighlightRules, "jscode-", [{
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.embedRules(HtmlHighlightRules, "htmlcode-", [{
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.embedRules(CssHighlightRules, "csscode-", [{
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.embedRules(XmlHighlightRules, "xmlcode-", [{
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
oop.inherits(MarkdownHighlightRules, TextHighlightRules);
|
||||
|
@ -2806,6 +2799,306 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|||
|
||||
});
|
||||
|
||||
define("ace/mode/sh_highlight_rules",[], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var reservedKeywords = exports.reservedKeywords = (
|
||||
'!|{|}|case|do|done|elif|else|'+
|
||||
'esac|fi|for|if|in|then|until|while|'+
|
||||
'&|;|export|local|read|typeset|unset|'+
|
||||
'elif|select|set|function|declare|readonly'
|
||||
);
|
||||
|
||||
var languageConstructs = exports.languageConstructs = (
|
||||
'[|]|alias|bg|bind|break|builtin|'+
|
||||
'cd|command|compgen|complete|continue|'+
|
||||
'dirs|disown|echo|enable|eval|exec|'+
|
||||
'exit|fc|fg|getopts|hash|help|history|'+
|
||||
'jobs|kill|let|logout|popd|printf|pushd|'+
|
||||
'pwd|return|set|shift|shopt|source|'+
|
||||
'suspend|test|times|trap|type|ulimit|'+
|
||||
'umask|unalias|wait'
|
||||
);
|
||||
|
||||
var ShHighlightRules = function() {
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"keyword": reservedKeywords,
|
||||
"support.function.builtin": languageConstructs,
|
||||
"invalid.deprecated": "debugger"
|
||||
}, "identifier");
|
||||
|
||||
var integer = "(?:(?:[1-9]\\d*)|(?:0))";
|
||||
var fraction = "(?:\\.\\d+)";
|
||||
var intPart = "(?:\\d+)";
|
||||
var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
|
||||
var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")";
|
||||
var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
|
||||
var fileDescriptor = "(?:&" + intPart + ")";
|
||||
|
||||
var variableName = "[a-zA-Z_][a-zA-Z0-9_]*";
|
||||
var variable = "(?:" + variableName + "(?==))";
|
||||
|
||||
var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))";
|
||||
|
||||
var func = "(?:" + variableName + "\\s*\\(\\))";
|
||||
|
||||
this.$rules = {
|
||||
"start" : [{
|
||||
token : "constant",
|
||||
regex : /\\./
|
||||
}, {
|
||||
token : ["text", "comment"],
|
||||
regex : /(^|\s)(#.*)$/
|
||||
}, {
|
||||
token : "string.start",
|
||||
regex : '"',
|
||||
push : [{
|
||||
token : "constant.language.escape",
|
||||
regex : /\\(?:[$`"\\]|$)/
|
||||
}, {
|
||||
include : "variables"
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : /`/ // TODO highlight `
|
||||
}, {
|
||||
token : "string.end",
|
||||
regex : '"',
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}]
|
||||
}, {
|
||||
token : "string",
|
||||
regex : "\\$'",
|
||||
push : [{
|
||||
token : "constant.language.escape",
|
||||
regex : /\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/
|
||||
}, {
|
||||
token : "string",
|
||||
regex : "'",
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}]
|
||||
}, {
|
||||
regex : "<<<",
|
||||
token : "keyword.operator"
|
||||
}, {
|
||||
stateName: "heredoc",
|
||||
regex : "(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",
|
||||
onMatch : function(value, currentState, stack) {
|
||||
var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
|
||||
var tokens = value.split(this.splitRegex);
|
||||
stack.push(next, tokens[4]);
|
||||
return [
|
||||
{type:"constant", value: tokens[1]},
|
||||
{type:"text", value: tokens[2]},
|
||||
{type:"string", value: tokens[3]},
|
||||
{type:"support.class", value: tokens[4]},
|
||||
{type:"string", value: tokens[5]}
|
||||
];
|
||||
},
|
||||
rules: {
|
||||
heredoc: [{
|
||||
onMatch: function(value, currentState, stack) {
|
||||
if (value === stack[1]) {
|
||||
stack.shift();
|
||||
stack.shift();
|
||||
this.next = stack[0] || "start";
|
||||
return "support.class";
|
||||
}
|
||||
this.next = "";
|
||||
return "string";
|
||||
},
|
||||
regex: ".*$",
|
||||
next: "start"
|
||||
}],
|
||||
indentedHeredoc: [{
|
||||
token: "string",
|
||||
regex: "^\t+"
|
||||
}, {
|
||||
onMatch: function(value, currentState, stack) {
|
||||
if (value === stack[1]) {
|
||||
stack.shift();
|
||||
stack.shift();
|
||||
this.next = stack[0] || "start";
|
||||
return "support.class";
|
||||
}
|
||||
this.next = "";
|
||||
return "string";
|
||||
},
|
||||
regex: ".*$",
|
||||
next: "start"
|
||||
}]
|
||||
}
|
||||
}, {
|
||||
regex : "$",
|
||||
token : "empty",
|
||||
next : function(currentState, stack) {
|
||||
if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
|
||||
return stack[0];
|
||||
return currentState;
|
||||
}
|
||||
}, {
|
||||
token : ["keyword", "text", "text", "text", "variable"],
|
||||
regex : /(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/
|
||||
}, {
|
||||
token : "variable.language",
|
||||
regex : builtinVariable
|
||||
}, {
|
||||
token : "variable",
|
||||
regex : variable
|
||||
}, {
|
||||
include : "variables"
|
||||
}, {
|
||||
token : "support.function",
|
||||
regex : func
|
||||
}, {
|
||||
token : "support.function",
|
||||
regex : fileDescriptor
|
||||
}, {
|
||||
token : "string", // ' string
|
||||
start : "'", end : "'"
|
||||
}, {
|
||||
token : "constant.numeric", // float
|
||||
regex : floatNumber
|
||||
}, {
|
||||
token : "constant.numeric", // integer
|
||||
regex : integer + "\\b"
|
||||
}, {
|
||||
token : keywordMapper,
|
||||
regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b"
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"
|
||||
}, {
|
||||
token : "punctuation.operator",
|
||||
regex : ";"
|
||||
}, {
|
||||
token : "paren.lparen",
|
||||
regex : "[\\[\\(\\{]"
|
||||
}, {
|
||||
token : "paren.rparen",
|
||||
regex : "[\\]]"
|
||||
}, {
|
||||
token : "paren.rparen",
|
||||
regex : "[\\)\\}]",
|
||||
next : "pop"
|
||||
}],
|
||||
variables: [{
|
||||
token : "variable",
|
||||
regex : /(\$)(\w+)/
|
||||
}, {
|
||||
token : ["variable", "paren.lparen"],
|
||||
regex : /(\$)(\()/,
|
||||
push : "start"
|
||||
}, {
|
||||
token : ["variable", "paren.lparen", "keyword.operator", "variable", "keyword.operator"],
|
||||
regex : /(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,
|
||||
push : "start"
|
||||
}, {
|
||||
token : "variable",
|
||||
regex : /\$[*@#?\-$!0_]/
|
||||
}, {
|
||||
token : ["variable", "paren.lparen"],
|
||||
regex : /(\$)(\{)/,
|
||||
push : "start"
|
||||
}]
|
||||
};
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
oop.inherits(ShHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.ShHighlightRules = ShHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/sh",[], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules;
|
||||
var Range = require("../range").Range;
|
||||
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
||||
var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = ShHighlightRules;
|
||||
this.foldingRules = new CStyleFoldMode();
|
||||
this.$behaviour = new CstyleBehaviour();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
|
||||
|
||||
this.lineCommentStart = "#";
|
||||
|
||||
this.getNextLineIndent = function(state, line, tab) {
|
||||
var indent = this.$getIndent(line);
|
||||
|
||||
var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
|
||||
var tokens = tokenizedLine.tokens;
|
||||
|
||||
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
||||
return indent;
|
||||
}
|
||||
|
||||
if (state == "start") {
|
||||
var match = line.match(/^.*[\{\(\[:]\s*$/);
|
||||
if (match) {
|
||||
indent += tab;
|
||||
}
|
||||
}
|
||||
|
||||
return indent;
|
||||
};
|
||||
|
||||
var outdents = {
|
||||
"pass": 1,
|
||||
"return": 1,
|
||||
"raise": 1,
|
||||
"break": 1,
|
||||
"continue": 1
|
||||
};
|
||||
|
||||
this.checkOutdent = function(state, line, input) {
|
||||
if (input !== "\r\n" && input !== "\r" && input !== "\n")
|
||||
return false;
|
||||
|
||||
var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens;
|
||||
|
||||
if (!tokens)
|
||||
return false;
|
||||
do {
|
||||
var last = tokens.pop();
|
||||
} while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/))));
|
||||
|
||||
if (!last)
|
||||
return false;
|
||||
|
||||
return (last.type == "keyword" && outdents[last.value]);
|
||||
};
|
||||
|
||||
this.autoOutdent = function(state, doc, row) {
|
||||
row += 1;
|
||||
var indent = this.$getIndent(doc.getLine(row));
|
||||
var tab = doc.getTabString();
|
||||
if (indent.slice(-tab.length) == tab)
|
||||
doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/sh";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
|
||||
define("ace/mode/markdown",[], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
|
@ -2821,9 +3114,12 @@ var Mode = function() {
|
|||
this.HighlightRules = MarkdownHighlightRules;
|
||||
|
||||
this.createModeDelegates({
|
||||
"js-": JavaScriptMode,
|
||||
"xml-": XmlMode,
|
||||
"html-": HtmlMode
|
||||
javascript: require("./javascript").Mode,
|
||||
html: require("./html").Mode,
|
||||
bash: require("./sh").Mode,
|
||||
sh: require("./sh").Mode,
|
||||
xml: require("./xml").Mode,
|
||||
css: require("./css").Mode
|
||||
});
|
||||
|
||||
this.foldingRules = new MarkdownFoldMode();
|
||||
|
|
|
@ -999,28 +999,60 @@ exports.HtmlHighlightRules = HtmlHighlightRules;
|
|||
define("ace/mode/markdown_highlight_rules",[], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var modes = require("../config").$modes;
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var lang = require("../lib/lang");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
|
||||
var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
|
||||
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
|
||||
var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
|
||||
|
||||
var escaped = function(ch) {
|
||||
return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*";
|
||||
};
|
||||
|
||||
function github_embed(tag, prefix) {
|
||||
return { // Github style block
|
||||
token : "support.function",
|
||||
regex : "^\\s*```" + tag + "\\s*$",
|
||||
push : prefix + "start"
|
||||
};
|
||||
}
|
||||
|
||||
var MarkdownHighlightRules = function() {
|
||||
HtmlHighlightRules.call(this);
|
||||
var codeBlockStartRule = {
|
||||
token : "support.function",
|
||||
regex : /^\s*(```+[^`]*|~~~+[^~]*)$/,
|
||||
onMatch: function(value, state, stack, line) {
|
||||
var m = value.match(/^(\s*)([`~]+)(.*)/);
|
||||
var language = /[\w-]+|$/.exec(m[3])[0];
|
||||
if (!modes[language])
|
||||
language = "";
|
||||
stack.unshift("githubblock", [], [m[1], m[2], language], state);
|
||||
return this.token;
|
||||
},
|
||||
next : "githubblock"
|
||||
};
|
||||
var codeBlockRules = [{
|
||||
token : "support.function",
|
||||
regex : ".*",
|
||||
onMatch: function(value, state, stack, line) {
|
||||
var embedState = stack[1];
|
||||
var indent = stack[2][0];
|
||||
var endMarker = stack[2][1];
|
||||
var language = stack[2][2];
|
||||
|
||||
var m = /^(\s*)(`+|~+)\s*$/.exec(value);
|
||||
if (
|
||||
m && m[1].length < indent.length + 3
|
||||
&& m[2].length >= endMarker.length && m[2][0] == endMarker[0]
|
||||
) {
|
||||
stack.splice(0, 3);
|
||||
this.next = stack.shift();
|
||||
return this.token;
|
||||
}
|
||||
this.next = "";
|
||||
if (language && modes[language]) {
|
||||
var data = modes[language].getTokenizer().getLineTokens(value, embedState.slice(0));
|
||||
stack[1] = data.state;
|
||||
return data.tokens;
|
||||
}
|
||||
return this.token;
|
||||
}
|
||||
}];
|
||||
|
||||
this.$rules["start"].unshift({
|
||||
token : "empty_line",
|
||||
regex : '^$',
|
||||
|
@ -1038,15 +1070,8 @@ var MarkdownHighlightRules = function() {
|
|||
regex : /^#{1,6}(?=\s|$)/,
|
||||
next : "header"
|
||||
},
|
||||
github_embed("(?:javascript|js)", "jscode-"),
|
||||
github_embed("xml", "xmlcode-"),
|
||||
github_embed("html", "htmlcode-"),
|
||||
github_embed("css", "csscode-"),
|
||||
{ // Github style block
|
||||
token : "support.function",
|
||||
regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",
|
||||
next : "githubblock"
|
||||
}, { // block quote
|
||||
codeBlockStartRule,
|
||||
{ // block quote
|
||||
token : "string.blockquote",
|
||||
regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
|
||||
next : "blockquote"
|
||||
|
@ -1128,11 +1153,9 @@ var MarkdownHighlightRules = function() {
|
|||
next : "listblock-start"
|
||||
}, {
|
||||
include : "basic", noEscape: true
|
||||
}, { // Github style block
|
||||
token : "support.function",
|
||||
regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
|
||||
next : "githubblock"
|
||||
}, {
|
||||
},
|
||||
codeBlockStartRule,
|
||||
{
|
||||
defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly
|
||||
} ],
|
||||
|
||||
|
@ -1150,39 +1173,9 @@ var MarkdownHighlightRules = function() {
|
|||
defaultToken : "string.blockquote"
|
||||
} ],
|
||||
|
||||
"githubblock" : [ {
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken : "support.function"
|
||||
} ]
|
||||
"githubblock" : codeBlockRules
|
||||
});
|
||||
|
||||
this.embedRules(JavaScriptHighlightRules, "jscode-", [{
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.embedRules(HtmlHighlightRules, "htmlcode-", [{
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.embedRules(CssHighlightRules, "csscode-", [{
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.embedRules(XmlHighlightRules, "xmlcode-", [{
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
oop.inherits(MarkdownHighlightRules, TextHighlightRules);
|
||||
|
|
Plik diff jest za duży
Load Diff
Plik diff jest za duży
Load Diff
|
@ -413,7 +413,7 @@ exports.importCssString = function importCssString(cssText, id, container) {
|
|||
|
||||
if (root == doc)
|
||||
root = exports.getDocumentHead(doc);
|
||||
root.appendChild(style);
|
||||
root.insertBefore(style, root.firstChild);
|
||||
};
|
||||
|
||||
exports.importCssStylsheet = function(uri, doc) {
|
||||
|
@ -833,6 +833,8 @@ exports.set = function(key, value) {
|
|||
exports.all = function() {
|
||||
return lang.copyObject(options);
|
||||
};
|
||||
|
||||
exports.$modes = {};
|
||||
exports.moduleUrl = function(name, component) {
|
||||
if (options.$moduleUrls[name])
|
||||
return options.$moduleUrls[name];
|
||||
|
@ -1084,7 +1086,7 @@ var Tokenizer = function(rules) {
|
|||
|
||||
this.removeCapturingGroups = function(src) {
|
||||
var r = src.replace(
|
||||
/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,
|
||||
/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!]|(\()/g,
|
||||
function(x, y) {return y ? "(?:" : x;}
|
||||
);
|
||||
return r;
|
||||
|
@ -2234,6 +2236,7 @@ exports.wordChars = String.fromCharCode.apply(null, str);
|
|||
|
||||
define("ace/mode/text",[], function(require, exports, module) {
|
||||
"use strict";
|
||||
var config = require("../config");
|
||||
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
@ -2471,8 +2474,15 @@ var Mode = function() {
|
|||
this.$modes = {};
|
||||
for (var i in mapping) {
|
||||
if (mapping[i]) {
|
||||
var Mode = mapping[i];
|
||||
var id = Mode.prototype.$id;
|
||||
var mode = config.$modes[id];
|
||||
if (!mode)
|
||||
config.$modes[id] = mode = new Mode();
|
||||
if (!config.$modes[i])
|
||||
config.$modes[i] = mode;
|
||||
this.$embeds.push(i);
|
||||
this.$modes[i] = new mapping[i]();
|
||||
this.$modes[i] = mode;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2492,8 +2502,16 @@ var Mode = function() {
|
|||
|
||||
this.$delegator = function(method, args, defaultHandler) {
|
||||
var state = args[0];
|
||||
if (typeof state != "string")
|
||||
if (typeof state != "string") {
|
||||
if (Array.isArray(state[2])) {
|
||||
var language = state[2][state[2].length - 1];
|
||||
var mode = this.$modes[language];
|
||||
if (mode)
|
||||
return mode[method].apply(mode, [state[1]].concat([].slice.call(args, 1)));
|
||||
}
|
||||
state = state[0];
|
||||
}
|
||||
|
||||
for (var i = 0; i < this.$embeds.length; i++) {
|
||||
if (!this.$modes[this.$embeds[i]]) continue;
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -149,6 +149,7 @@ var BlameGutter = function(editor, blameStr) {
|
|||
|
||||
this.onMousedown = this.onMousedown.bind(this);
|
||||
this.onChangeEditor = this.onChangeEditor.bind(this);
|
||||
this.onChangeSelection = this.onChangeSelection.bind(this);
|
||||
this.onMousemove = this.onMousemove.bind(this);
|
||||
this.onMouseout = this.onMouseout.bind(this);
|
||||
|
||||
|
@ -185,6 +186,7 @@ var BlameGutter = function(editor, blameStr) {
|
|||
this.closeButton = this.resizer.firstChild;
|
||||
|
||||
gutter.on("afterRender", this.drawGutter);
|
||||
editor.on("changeSelection", this.onChangeSelection);
|
||||
this.element.addEventListener("mousedown", this.onMousedown);
|
||||
this.resizer.addEventListener("mousedown", this.onMousedown);
|
||||
|
||||
|
@ -202,6 +204,7 @@ var BlameGutter = function(editor, blameStr) {
|
|||
var editor = this.editor;
|
||||
var gutter = editor.renderer.$gutterLayer;
|
||||
gutter.off("afterRender", this.drawGutter);
|
||||
editor.off("changeSelection", this.onChangeSelection);
|
||||
|
||||
editor.blameGutter = gutter.blameColumn = this.editor = null;
|
||||
|
||||
|
@ -233,6 +236,20 @@ var BlameGutter = function(editor, blameStr) {
|
|||
this.attachToEditor(e.editor);
|
||||
};
|
||||
|
||||
this.onChangeSelection = function() {
|
||||
var renderer = this.editor.renderer;
|
||||
var row = this.session.selection.cursor.row;
|
||||
|
||||
var blameData = this.blameData || [];
|
||||
|
||||
while (!blameData[row] && row > 0) row--;
|
||||
var blameCell = blameData[row];
|
||||
if (blameCell) {
|
||||
this.selectedHash = blameCell.data.hash;
|
||||
renderer.$loop.schedule(renderer.CHANGE_GUTTER | renderer.CHANGE_MARKER);
|
||||
}
|
||||
};
|
||||
|
||||
this.drawGutter = function(e, gutter) {
|
||||
var container = gutter.blameColumn.element;
|
||||
var blameData = gutter.blameColumn.blameData;
|
||||
|
@ -241,7 +258,7 @@ var BlameGutter = function(editor, blameStr) {
|
|||
var cells = gutter.$lines.cells;
|
||||
var cache = gutter.blameColumn.$cache;
|
||||
var cacheIndex = 0;
|
||||
var offset = - getTop(gutter.element) + gutter.config.offset;
|
||||
var offset = -getTop(gutter.element);
|
||||
|
||||
var commit;
|
||||
for (var i = 0; i < cells.length; i++) {
|
||||
|
@ -252,11 +269,6 @@ var BlameGutter = function(editor, blameStr) {
|
|||
if (!data && i == 0) {
|
||||
while (!blameData[row] && row > 0) row--;
|
||||
data = blameData[row]
|
||||
commit = {
|
||||
row: row,
|
||||
cell: cell,
|
||||
data: data,
|
||||
};
|
||||
}
|
||||
|
||||
if (!data)
|
||||
|
@ -271,7 +283,7 @@ var BlameGutter = function(editor, blameStr) {
|
|||
data: data,
|
||||
};
|
||||
}
|
||||
if (commit.cell == cell)
|
||||
if (commit)
|
||||
add(commit.data, commit.row, commit.cell);
|
||||
|
||||
function add(data, row, firstCell, nextCell) {
|
||||
|
@ -282,7 +294,7 @@ var BlameGutter = function(editor, blameStr) {
|
|||
el.index = row;
|
||||
el.textContent = data.text + " " + data.title;
|
||||
|
||||
var top = getTop(firstCell.element) - offset;
|
||||
var top = Math.max(getTop(firstCell.element) - offset, 0);
|
||||
var next = nextCell ? getTop(nextCell.element) - offset : gutter.config.height;
|
||||
el.style.top = top + "px";
|
||||
el.style.height = next - top + "px";
|
||||
|
@ -334,6 +346,8 @@ var BlameGutter = function(editor, blameStr) {
|
|||
var blameCell = blameData[target.index];
|
||||
if (!blameCell)
|
||||
return event.stopEvent(e);
|
||||
var pos = this.editor.renderer.screenToTextCoordinates(e.clientX, e.clientY);
|
||||
this.editor.selection.moveToPosition(pos);
|
||||
gutter.blameColumn.selectedHash = blameCell.data.hash;
|
||||
this.editor.renderer.$loop.schedule(this.editor.renderer.CHANGE_GUTTER);
|
||||
return event.stopEvent(e);
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
text-align: left !important;
|
||||
top: 0;
|
||||
z-index: 5;
|
||||
pointer-events: auto;
|
||||
pointer-events: auto!important;
|
||||
}
|
||||
.ace_blame-cell{
|
||||
border-top: solid 1px;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
"homepage": "https://github.com/isaacs/inherits#readme",
|
||||
"_id": "inherits@2.0.3",
|
||||
"_shasum": "633c2c83e3da42a502f52466022480f4208261de",
|
||||
"_from": "inherits@>=2.0.1 <2.1.0",
|
||||
"_from": "inherits@>=2.0.0 <3.0.0",
|
||||
"_npmVersion": "3.10.7",
|
||||
"_nodeVersion": "6.5.0",
|
||||
"_npmUser": {
|
||||
|
@ -58,5 +58,6 @@
|
|||
"tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328"
|
||||
},
|
||||
"directories": {},
|
||||
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
|
||||
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||
"readme": "ERROR: No README data found!"
|
||||
}
|
||||
|
|
|
@ -248,7 +248,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/ternjs/tern#readme",
|
||||
"_id": "tern@0.16.1",
|
||||
"_shasum": "17da1e5782ab1c6c62c483f20fb0bf8506907908",
|
||||
"_shasum": "ec50e0135c7fedc4bff612bcd96e6deb3b3acf95",
|
||||
"_from": "git+https://github.com/cloud9ide/tern.git#39015d544d4c00c7899fea4c95c2e5bc2720e68e",
|
||||
"_resolved": "git+https://github.com/cloud9ide/tern.git#39015d544d4c00c7899fea4c95c2e5bc2720e68e"
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
"readme": "# tern_from_ts\n\nTern signatures extracted from typescript signatures.\n\nLicense: MIT\n\nSee also https://github.com/marijnh/tern and https://github.com/borisyankov/DefinitelyTyped\n",
|
||||
"readmeFilename": "README.md",
|
||||
"_id": "tern_from_ts@0.0.1",
|
||||
"_shasum": "87a651d582f5906a2ff38f087a31de2b17f4ebff",
|
||||
"_shasum": "f531d3da424ced1931e72cd4e2bc1c27d0e7bc40",
|
||||
"_from": "git+https://github.com/cloud9ide/tern_from_ts.git#66df507986bbdd63f3bc4f0c53edb39169ce4f1c",
|
||||
"_resolved": "git+https://github.com/cloud9ide/tern_from_ts.git#66df507986bbdd63f3bc4f0c53edb39169ce4f1c"
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/gjtorikian/nak#readme",
|
||||
"_id": "nak@0.3.3",
|
||||
"_shasum": "d4bd3eb26edde97b3f5e358469247c581b12c7ff",
|
||||
"_shasum": "a54a5d17387cbc7e7c4ba6091f5b28aa9c8b0875",
|
||||
"_from": "git+https://github.com/cloud9ide/nak.git#6deef931594",
|
||||
"_resolved": "git+https://github.com/cloud9ide/nak.git#6deef931594787edd167040f7352e3e7533430e4"
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
"homepage": "https://github.com/isaacs/inherits#readme",
|
||||
"_id": "inherits@2.0.3",
|
||||
"_shasum": "633c2c83e3da42a502f52466022480f4208261de",
|
||||
"_from": "inherits@>=2.0.1 <2.1.0",
|
||||
"_from": "inherits@>=2.0.0 <3.0.0",
|
||||
"_npmVersion": "3.10.7",
|
||||
"_nodeVersion": "6.5.0",
|
||||
"_npmUser": {
|
||||
|
@ -58,5 +58,6 @@
|
|||
"tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328"
|
||||
},
|
||||
"directories": {},
|
||||
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
|
||||
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||
"readme": "ERROR: No README data found!"
|
||||
}
|
||||
|
|
|
@ -248,7 +248,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/ternjs/tern#readme",
|
||||
"_id": "tern@0.16.1",
|
||||
"_shasum": "17da1e5782ab1c6c62c483f20fb0bf8506907908",
|
||||
"_shasum": "ec50e0135c7fedc4bff612bcd96e6deb3b3acf95",
|
||||
"_from": "git+https://github.com/cloud9ide/tern.git#39015d544d4c00c7899fea4c95c2e5bc2720e68e",
|
||||
"_resolved": "git+https://github.com/cloud9ide/tern.git#39015d544d4c00c7899fea4c95c2e5bc2720e68e"
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
"readme": "# tern_from_ts\n\nTern signatures extracted from typescript signatures.\n\nLicense: MIT\n\nSee also https://github.com/marijnh/tern and https://github.com/borisyankov/DefinitelyTyped\n",
|
||||
"readmeFilename": "README.md",
|
||||
"_id": "tern_from_ts@0.0.1",
|
||||
"_shasum": "87a651d582f5906a2ff38f087a31de2b17f4ebff",
|
||||
"_shasum": "f531d3da424ced1931e72cd4e2bc1c27d0e7bc40",
|
||||
"_from": "git+https://github.com/cloud9ide/tern_from_ts.git#66df507986bbdd63f3bc4f0c53edb39169ce4f1c",
|
||||
"_resolved": "git+https://github.com/cloud9ide/tern_from_ts.git#66df507986bbdd63f3bc4f0c53edb39169ce4f1c"
|
||||
}
|
||||
|
|
|
@ -49,5 +49,5 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"licenses": [],
|
||||
"revision": "2e524ab8ba61b422d3605eafecc2140090d6a8fb"
|
||||
"revision": "15911b3ed65e69efd27d19683a2ac90c69ca4242"
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ oop.inherits(CommandManager, MultiHashHandler);
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (typeof command === "string")
|
||||
command = this.commands[command];
|
||||
|
||||
|
@ -48,6 +48,9 @@ oop.inherits(CommandManager, MultiHashHandler);
|
|||
if (editor && editor.$readOnly && !command.readOnly)
|
||||
return false;
|
||||
|
||||
if (this.$checkCommandState != false && command.isAvailable && !command.isAvailable(editor))
|
||||
return false;
|
||||
|
||||
var e = {editor: editor, command: command, args: args};
|
||||
e.returnValue = this._emit("exec", e);
|
||||
this._signal("afterExec", e);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (c) 2010, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
|
@ -14,7 +14,7 @@
|
|||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
|
@ -49,7 +49,9 @@ module.exports = {
|
|||
win: "Ctrl-L"
|
||||
},
|
||||
called: false,
|
||||
exec: function(editor) { this.called = true; }
|
||||
available: true,
|
||||
exec: function(editor) { this.called = true; },
|
||||
isAvailable: function(editor) { return this.available; }
|
||||
};
|
||||
|
||||
this.cm = new CommandManager("mac", [this.command]);
|
||||
|
@ -78,6 +80,16 @@ module.exports = {
|
|||
assert.equal(command, this.command);
|
||||
},
|
||||
|
||||
"test: command isAvailable": function() {
|
||||
this.command.available = false;
|
||||
|
||||
this.cm.exec("gotoline");
|
||||
assert.ok(!this.command.called);
|
||||
this.cm.$checkCommandState = false;
|
||||
this.cm.exec("gotoline");
|
||||
assert.ok(this.command.called);
|
||||
},
|
||||
|
||||
"test: remove command by object": function() {
|
||||
this.cm.removeCommand(this.command);
|
||||
|
||||
|
@ -133,10 +145,10 @@ module.exports = {
|
|||
called += "2";
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
var statusUpdateEmitted = false;
|
||||
this._emit = function() {statusUpdateEmitted = true};
|
||||
this._emit = function() {statusUpdateEmitted = true;};
|
||||
|
||||
this.cm.exec("togglerecording", this);
|
||||
assert.ok(this.cm.recording);
|
||||
|
|
|
@ -70,6 +70,8 @@ exports.all = function() {
|
|||
return lang.copyObject(options);
|
||||
};
|
||||
|
||||
exports.$modes = {};
|
||||
|
||||
// module loading
|
||||
exports.moduleUrl = function(name, component) {
|
||||
if (options.$moduleUrls[name])
|
||||
|
|
|
@ -839,7 +839,7 @@ EditSession.$uid = 0;
|
|||
this._signal("tokenizerUpdate", e);
|
||||
};
|
||||
|
||||
this.$modes = {};
|
||||
this.$modes = config.$modes;
|
||||
|
||||
/**
|
||||
* Sets a new text mode for the `EditSession`. This method also emits the `'changeMode'` event. If a [[BackgroundTokenizer `BackgroundTokenizer`]] is set, the `'tokenizerUpdate'` event is also emitted.
|
||||
|
@ -1817,20 +1817,13 @@ EditSession.$uid = 0;
|
|||
return Math.min(indentation, maxIndent);
|
||||
}
|
||||
function addSplit(screenPos) {
|
||||
var displayed = tokens.slice(lastSplit, screenPos);
|
||||
|
||||
// The document size is the current size - the extra width for tabs
|
||||
// and multipleWidth characters.
|
||||
var len = displayed.length;
|
||||
displayed.join("")
|
||||
// Get all the TAB_SPACEs.
|
||||
.replace(/12/g, function() {
|
||||
len -= 1;
|
||||
})
|
||||
// Get all the CHAR_EXT/multipleWidth characters.
|
||||
.replace(/2/g, function() {
|
||||
len -= 1;
|
||||
});
|
||||
var len = screenPos - lastSplit;
|
||||
for (var i = lastSplit; i < screenPos; i++) {
|
||||
var ch = tokens[i];
|
||||
if (ch === 12 || ch === 2) len -= 1;
|
||||
}
|
||||
|
||||
if (!splits.length) {
|
||||
indent = getWrapIndent();
|
||||
|
@ -2503,15 +2496,22 @@ config.defineOptions(EditSession.prototype, "session", {
|
|||
if (val != this.$wrapAsCode) {
|
||||
this.$wrapAsCode = val;
|
||||
if (this.$useWrapMode) {
|
||||
this.$modified = true;
|
||||
this.$resetRowCache(0);
|
||||
this.$updateWrapData(0, this.getLength() - 1);
|
||||
this.$useWrapMode = false;
|
||||
this.setUseWrapMode(true);
|
||||
}
|
||||
}
|
||||
},
|
||||
initialValue: "auto"
|
||||
},
|
||||
indentedSoftWrap: { initialValue: true },
|
||||
indentedSoftWrap: {
|
||||
set: function() {
|
||||
if (this.$useWrapMode) {
|
||||
this.$useWrapMode = false;
|
||||
this.setUseWrapMode(true);
|
||||
}
|
||||
},
|
||||
initialValue: true
|
||||
},
|
||||
firstLineNumber: {
|
||||
set: function() {this._signal("changeBreakpoint");},
|
||||
initialValue: 1
|
||||
|
|
|
@ -51,9 +51,18 @@ var keyWordCompleter = {
|
|||
|
||||
var snippetCompleter = {
|
||||
getCompletions: function(editor, session, pos, prefix, callback) {
|
||||
var scopes = [];
|
||||
|
||||
// set scope to html-tag if we're inside an html tag
|
||||
var token = session.getTokenAt(pos.row, pos.column);
|
||||
if (token && token.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/))
|
||||
scopes.push('html-tag');
|
||||
else
|
||||
scopes = snippetManager.getActiveScopes(editor);
|
||||
|
||||
var snippetMap = snippetManager.snippetMap;
|
||||
var completions = [];
|
||||
snippetManager.getActiveScopes(editor).forEach(function(scope) {
|
||||
scopes.forEach(function(scope) {
|
||||
var snippets = snippetMap[scope] || [];
|
||||
for (var i = snippets.length; i--;) {
|
||||
var s = snippets[i];
|
||||
|
|
|
@ -81,6 +81,7 @@ var supportedModes = {
|
|||
Erlang: ["erl|hrl"],
|
||||
Forth: ["frt|fs|ldr|fth|4th"],
|
||||
Fortran: ["f|f90"],
|
||||
FSharp: ["fsi|fs|ml|mli|fsx|fsscript"],
|
||||
FTL: ["ftl"],
|
||||
Gcode: ["gcode"],
|
||||
Gherkin: ["feature"],
|
||||
|
@ -138,6 +139,7 @@ var supportedModes = {
|
|||
Pascal: ["pas|p"],
|
||||
Perl: ["pl|pm"],
|
||||
pgSQL: ["pgsql"],
|
||||
PHP_Laravel_blade: ["blade.php"],
|
||||
PHP: ["php|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
|
||||
Pig: ["pig"],
|
||||
Powershell: ["ps1"],
|
||||
|
@ -161,6 +163,7 @@ var supportedModes = {
|
|||
SCSS: ["scss"],
|
||||
SH: ["sh|bash|^.bashrc"],
|
||||
SJS: ["sjs"],
|
||||
Slim: ["slim|skim"],
|
||||
Smarty: ["smarty|tpl"],
|
||||
snippets: ["snippets"],
|
||||
Soy_Template:["soy"],
|
||||
|
@ -202,7 +205,8 @@ var nameOverrides = {
|
|||
coffee: "CoffeeScript",
|
||||
HTML_Ruby: "HTML (Ruby)",
|
||||
HTML_Elixir: "HTML (Elixir)",
|
||||
FTL: "FreeMarker"
|
||||
FTL: "FreeMarker",
|
||||
PHP_Laravel_blade: "PHP (Blade Template)"
|
||||
};
|
||||
var modesByName = {};
|
||||
for (var name in supportedModes) {
|
||||
|
|
|
@ -144,6 +144,9 @@ var optionGroups = {
|
|||
type: "number",
|
||||
path: "printMarginColumn"
|
||||
}],
|
||||
"Indented Soft Wrap": {
|
||||
path: "indentedSoftWrap"
|
||||
},
|
||||
"Highlight selected word": {
|
||||
path: "highlightSelectedWord"
|
||||
},
|
||||
|
@ -322,7 +325,7 @@ var OptionPanel = function(editor, element) {
|
|||
value = parseFloat(value);
|
||||
if (option.onchange)
|
||||
option.onchange(value);
|
||||
else
|
||||
else if (option.path)
|
||||
this.editor.setOption(option.path, value);
|
||||
this._signal("setOption", {name: option.path, value: value});
|
||||
};
|
||||
|
|
|
@ -85,6 +85,9 @@ var TextInput = function(parentNode, host) {
|
|||
this.focus = function() {
|
||||
if (tempStyle || HAS_FOCUS_ARGS || this.$focusScroll == "browser")
|
||||
return text.focus({ preventScroll: true });
|
||||
// getBoundingClientRect on IE throws error if element is not in dom tree
|
||||
if (!document.documentElement.contains(text))
|
||||
return;
|
||||
var top = text.style.top;
|
||||
text.style.position = "fixed";
|
||||
text.style.top = "0px";
|
||||
|
|
|
@ -49,6 +49,7 @@ var Gutter = function(parentEl) {
|
|||
this.$updateAnnotations = this.$updateAnnotations.bind(this);
|
||||
|
||||
this.$lines = new Lines(this.element);
|
||||
this.$lines.$offsetCoefficient = 1;
|
||||
};
|
||||
|
||||
(function() {
|
||||
|
@ -373,7 +374,6 @@ var Gutter = function(parentEl) {
|
|||
dom.setStyle(cell.element.style, "top", this.$lines.computeLineTop(row, config, session) + "px");
|
||||
|
||||
cell.text = text;
|
||||
cell.row = row;
|
||||
return cell;
|
||||
};
|
||||
|
||||
|
|
|
@ -40,12 +40,13 @@ var Lines = function(element, canvasHeight) {
|
|||
|
||||
this.cells = [];
|
||||
this.cellCache = [];
|
||||
this.$offsetCoefficient = 0;
|
||||
};
|
||||
|
||||
(function() {
|
||||
|
||||
this.moveContainer = function(config) {
|
||||
dom.translate(this.element, 0, -((config.firstRowScreen * config.lineHeight) % this.canvasHeight));
|
||||
dom.translate(this.element, 0, -((config.firstRowScreen * config.lineHeight) % this.canvasHeight) - config.offset * this.$offsetCoefficient);
|
||||
};
|
||||
|
||||
this.pageChanged = function(oldConfig, newConfig) {
|
||||
|
@ -143,6 +144,7 @@ var Lines = function(element, canvasHeight) {
|
|||
row: row
|
||||
};
|
||||
}
|
||||
cell.row = row;
|
||||
|
||||
return cell;
|
||||
};
|
||||
|
|
|
@ -195,7 +195,7 @@ exports.importCssString = function importCssString(cssText, id, container) {
|
|||
|
||||
if (root == doc)
|
||||
root = exports.getDocumentHead(doc);
|
||||
root.appendChild(style);
|
||||
root.insertBefore(style, root.firstChild);
|
||||
};
|
||||
|
||||
exports.importCssStylsheet = function(uri, doc) {
|
||||
|
|
|
@ -1,106 +0,0 @@
|
|||
[[
|
||||
"start",
|
||||
["punctuation.definition.comment.bro","#"],
|
||||
["comment.line.number-sign.bro","#! Add countries for the originator and responder of a connection"]
|
||||
],[
|
||||
"start",
|
||||
["punctuation.definition.comment.bro","#"],
|
||||
["comment.line.number-sign.bro","#! to the connection logs."]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","module Conn;"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","export {"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["storage.modifier.bro","redef"],
|
||||
["text"," "],
|
||||
["storage.type.bro","record"],
|
||||
["text"," Conn::Info += {"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["punctuation.definition.comment.bro","#"],
|
||||
["comment.line.number-sign.bro","# Country code for the originator of the connection based "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["punctuation.definition.comment.bro","#"],
|
||||
["comment.line.number-sign.bro","# on a GeoIP lookup."]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\torig_cc: "],
|
||||
["storage.type.bro","string"],
|
||||
["text"," &optional &log;"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["punctuation.definition.comment.bro","#"],
|
||||
["comment.line.number-sign.bro","# Country code for the responser of the connection based "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["punctuation.definition.comment.bro","#"],
|
||||
["comment.line.number-sign.bro","# on a GeoIP lookup."]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\tresp_cc: "],
|
||||
["storage.type.bro","string"],
|
||||
["text"," &optional &log;"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t};"]
|
||||
],[
|
||||
"start",
|
||||
["text","}"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.function.bro"," "],
|
||||
["storage.type.bro","connection_state_remove"],
|
||||
["meta.function.bro","("],
|
||||
["entity.name.function.bro","c: connection"],
|
||||
["meta.function.bro",") "],
|
||||
"event connection_state_remove(c: connection) "
|
||||
],[
|
||||
"start",
|
||||
["text","\t{"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["storage.modifier.bro","local"],
|
||||
["text"," orig_loc = lookup_location(c$id$orig_h);"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["keyword.control.bro","if"],
|
||||
["text"," ( orig_loc?$country_code )"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\tc$conn$orig_cc = orig_loc$country_code;"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["storage.modifier.bro","local"],
|
||||
["text"," resp_loc = lookup_location(c$id$resp_h);"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["keyword.control.bro","if"],
|
||||
["text"," ( resp_loc?$country_code )"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\tc$conn$resp_cc = resp_loc$country_code;"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t}"]
|
||||
]]
|
|
@ -0,0 +1,140 @@
|
|||
[[
|
||||
"start",
|
||||
["comment.start","(*"],
|
||||
["comment"," fsharp "],
|
||||
["comment.start","(*"],
|
||||
["comment"," example "],
|
||||
["comment.end","*)"],
|
||||
["comment"," "],
|
||||
["comment.end","*)"]
|
||||
],[
|
||||
"start",
|
||||
["keyword","module"],
|
||||
["text"," "],
|
||||
["identifier","Test"],
|
||||
["text"," "],
|
||||
["keyword.operator","="]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword","let"],
|
||||
["text"," "],
|
||||
["identifier","func1"],
|
||||
["text"," "],
|
||||
["identifier","x"],
|
||||
["text"," "],
|
||||
["keyword.operator","="],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword","if"],
|
||||
["text"," "],
|
||||
["identifier","x"],
|
||||
["text"," "],
|
||||
["keyword.operator","<"],
|
||||
["text"," "],
|
||||
["constant.integer","100"],
|
||||
["text"," "],
|
||||
["keyword","then"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["identifier","x"],
|
||||
["keyword.operator","*"],
|
||||
["identifier","x"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword","else"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["identifier","x"],
|
||||
["keyword.operator","*"],
|
||||
["identifier","x"],
|
||||
["text"," "],
|
||||
["keyword.operator","+"],
|
||||
["text"," "],
|
||||
["constant.integer","1"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword","let"],
|
||||
["text"," "],
|
||||
["identifier","list"],
|
||||
["text"," "],
|
||||
["keyword.operator","="],
|
||||
["text"," "],
|
||||
["paren.lpar","("],
|
||||
["keyword.operator","-"],
|
||||
["constant.integer","1"],
|
||||
["text",", "],
|
||||
["constant.integer","42"],
|
||||
["paren.rpar",")"],
|
||||
["text"," :: "],
|
||||
["paren.lpar","["],
|
||||
["text"," "],
|
||||
["keyword","for"],
|
||||
["text"," "],
|
||||
["identifier","i"],
|
||||
["text"," "],
|
||||
["keyword","in"],
|
||||
["text"," "],
|
||||
["constant.integer","0"],
|
||||
["text"," .. "],
|
||||
["constant.integer","99"],
|
||||
["text"," "],
|
||||
["keyword.operator","->"],
|
||||
["text"," "],
|
||||
["paren.lpar","("],
|
||||
["identifier","i"],
|
||||
["text",", "],
|
||||
["identifier","func1"],
|
||||
["paren.lpar","("],
|
||||
["identifier","i"],
|
||||
["paren.rpar","))"],
|
||||
["text"," "],
|
||||
["paren.rpar","]"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword","let"],
|
||||
["text"," "],
|
||||
["identifier","verbatim"],
|
||||
["text"," "],
|
||||
["keyword.operator","="],
|
||||
["text"," "],
|
||||
["verbatim.string","@"],
|
||||
["string","\""],
|
||||
["string","c:\\Program "],
|
||||
["constant.language.escape","\"\""],
|
||||
["string"," Files\\\""]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword","let"],
|
||||
["text"," "],
|
||||
["identifier","trippleQuote"],
|
||||
["text"," "],
|
||||
["keyword.operator","="],
|
||||
["text"," "],
|
||||
["string","\"\"\" \"hello world\" \"\"\""]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["comment","// print"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["identifier","printfn"],
|
||||
["text"," "],
|
||||
["string","\"The table of squares from 0 to 99 is:"],
|
||||
["constant.language.escape","\\n"],
|
||||
["string","%A\""],
|
||||
["text"," "],
|
||||
["identifier","list"]
|
||||
]]
|
|
@ -0,0 +1,173 @@
|
|||
[[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["constant.language.jssmLanguage","machine_name :"],
|
||||
["text"," "],
|
||||
["entity.name.tag.jssmLabel.doublequoted","\"Three-state traffic light, plus off and flash-red\""],
|
||||
["text",";"]
|
||||
],[
|
||||
"start",
|
||||
["constant.language.jssmLanguage","machine_version :"],
|
||||
["text"," "],
|
||||
["constant.numeric","1.2.1"],
|
||||
["text",";"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["constant.language.jssmLanguage","jssm_version :"],
|
||||
["text"," >= "],
|
||||
["constant.numeric","5.0.0"],
|
||||
["text",";"]
|
||||
],[
|
||||
"start",
|
||||
["constant.language.jssmLanguage","graph_layout :"],
|
||||
["text"," "],
|
||||
["entity.name.tag.jssmLabel.atom","dot"],
|
||||
["text",";"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["entity.name.tag.jssmLabel.atom","on_init"],
|
||||
["text"," : "],
|
||||
["entity.name.function","${"],
|
||||
["keyword.other","setup"],
|
||||
["entity.name.function","}"],
|
||||
["text",";"]
|
||||
],[
|
||||
"start",
|
||||
["entity.name.tag.jssmLabel.atom","on_halt"],
|
||||
["text"," : "],
|
||||
["entity.name.function","${"],
|
||||
["keyword.other","finalize"],
|
||||
["entity.name.function","}"],
|
||||
["text",";"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["punctuation.definition.comment.mn","/*"],
|
||||
["comment.block.jssm"," turn on "],
|
||||
["punctuation.definition.comment.mn","*/"]
|
||||
],[
|
||||
"start",
|
||||
["entity.name.tag.jssmLabel.atom","Off"],
|
||||
["text"," "],
|
||||
["constant.character.jssmAction","'Enable'"],
|
||||
["text"," { "],
|
||||
["entity.name.tag.jssmLabel.atom","follow"],
|
||||
["text",": "],
|
||||
["entity.name.function","${"],
|
||||
["keyword.other","turned_on"],
|
||||
["entity.name.function","}"],
|
||||
["text","; } "],
|
||||
["keyword.control.transition.jssmArrow.none_legal","->"],
|
||||
["text"," "],
|
||||
["entity.name.tag.jssmLabel.atom","Red"],
|
||||
["text",";"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["comment.line.jssm","// main sequence"]
|
||||
],[
|
||||
"start",
|
||||
["entity.name.tag.jssmLabel.atom","Red"],
|
||||
["text"," "],
|
||||
["constant.character.jssmAction","'Proceed'"],
|
||||
["text"," "],
|
||||
["keyword.control.transition.jssmArrow.none_main","=>"],
|
||||
["text"," "],
|
||||
["entity.name.tag.jssmLabel.atom","Green"],
|
||||
["text"," "],
|
||||
["constant.character.jssmAction","'Proceed'"],
|
||||
["text"," "],
|
||||
["keyword.control.transition.jssmArrow.none_main","=>"],
|
||||
["text"," "],
|
||||
["entity.name.tag.jssmLabel.atom","Yellow"],
|
||||
["text"," "],
|
||||
["constant.character.jssmAction","'Proceed'"],
|
||||
["text"," "],
|
||||
["keyword.control.transition.jssmArrow.none_main","=>"],
|
||||
["text"," "],
|
||||
["entity.name.tag.jssmLabel.atom","Red"],
|
||||
["text",";"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["comment.line.jssm","// emergency flash red"]
|
||||
],[
|
||||
"start",
|
||||
["text","["],
|
||||
["entity.name.tag.jssmLabel.atom","Red"],
|
||||
["text"," "],
|
||||
["entity.name.tag.jssmLabel.atom","Yellow"],
|
||||
["text"," "],
|
||||
["entity.name.tag.jssmLabel.atom","Green"],
|
||||
["text","] "],
|
||||
["constant.character.jssmAction","'Flash'"],
|
||||
["text"," "],
|
||||
["keyword.control.transition.jssmArrow.none_legal","->"],
|
||||
["text"," "],
|
||||
["entity.name.tag.jssmLabel.atom","Flash"],
|
||||
["text",";"]
|
||||
],[
|
||||
"start",
|
||||
["entity.name.tag.jssmLabel.atom","Flash"],
|
||||
["text"," "],
|
||||
["constant.character.jssmAction","'Proceed'"],
|
||||
["text"," { "],
|
||||
["entity.name.tag.jssmLabel.atom","label"],
|
||||
["text",": "],
|
||||
["constant.character.jssmAction","'no change'"],
|
||||
["text","; } "],
|
||||
["keyword.control.transition.jssmArrow.none_legal","->"],
|
||||
["text"," "],
|
||||
["entity.name.tag.jssmLabel.atom","Flash"],
|
||||
["text"," "],
|
||||
["constant.character.jssmAction","'Exit'"],
|
||||
["text"," "],
|
||||
["keyword.control.transition.jssmArrow.none_legal","->"],
|
||||
["text"," "],
|
||||
["entity.name.tag.jssmLabel.atom","Red"],
|
||||
["text",";"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["comment.line.jssm","// turn off"]
|
||||
],[
|
||||
"start",
|
||||
["text","["],
|
||||
["entity.name.tag.jssmLabel.atom","Red"],
|
||||
["text"," "],
|
||||
["entity.name.tag.jssmLabel.atom","Yellow"],
|
||||
["text"," "],
|
||||
["entity.name.tag.jssmLabel.atom","Green"],
|
||||
["text"," "],
|
||||
["entity.name.tag.jssmLabel.atom","Flash"],
|
||||
["text","] "],
|
||||
["constant.character.jssmAction","'Disable'"],
|
||||
["text"," { "],
|
||||
["entity.name.tag.jssmLabel.atom","follow"],
|
||||
["text",": "],
|
||||
["entity.name.function","${"],
|
||||
["keyword.other","turned_off"],
|
||||
["entity.name.function","}"],
|
||||
["text","; } "],
|
||||
["keyword.control.transition.jssmArrow.none_forced","~>"],
|
||||
["text"," "],
|
||||
["entity.name.tag.jssmLabel.atom","Off"],
|
||||
["text",";"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start"
|
||||
]]
|
|
@ -1,143 +0,0 @@
|
|||
[[
|
||||
"start",
|
||||
["keyword.control","import"],
|
||||
["text"," "],
|
||||
["identifier","logic"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.control","section"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control","variables"],
|
||||
["text"," "],
|
||||
["paren.lparen","("],
|
||||
["identifier","A"],
|
||||
["text"," "],
|
||||
["punctuation.operator",":"],
|
||||
["text"," "],
|
||||
["storage.type","Type"],
|
||||
["paren.rparen",")"],
|
||||
["text"," "],
|
||||
["paren.lparen","("],
|
||||
["identifier","p"],
|
||||
["text"," "],
|
||||
["identifier","q"],
|
||||
["text"," "],
|
||||
["punctuation.operator",":"],
|
||||
["text"," "],
|
||||
["identifier","A"],
|
||||
["text"," "],
|
||||
["operator","→"],
|
||||
["text"," "],
|
||||
["storage.type","Prop"],
|
||||
["paren.rparen",")"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control","example"],
|
||||
["text"," "],
|
||||
["punctuation.operator",":"],
|
||||
["text"," "],
|
||||
["paren.lparen","("],
|
||||
["operator","∀"],
|
||||
["identifier","x"],
|
||||
["text"," "],
|
||||
["punctuation.operator",":"],
|
||||
["text"," "],
|
||||
["identifier","A"],
|
||||
["punctuation.operator",","],
|
||||
["text"," "],
|
||||
["identifier","p"],
|
||||
["text"," "],
|
||||
["identifier","x"],
|
||||
["text"," "],
|
||||
["operator","∧"],
|
||||
["text"," "],
|
||||
["identifier","q"],
|
||||
["text"," "],
|
||||
["identifier","x"],
|
||||
["paren.rparen",")"],
|
||||
["text"," "],
|
||||
["operator","→"],
|
||||
["text"," "],
|
||||
["operator","∀"],
|
||||
["identifier","y"],
|
||||
["text"," "],
|
||||
["punctuation.operator",":"],
|
||||
["text"," "],
|
||||
["identifier","A"],
|
||||
["punctuation.operator",","],
|
||||
["text"," "],
|
||||
["identifier","p"],
|
||||
["text"," "],
|
||||
["identifier","y"],
|
||||
["text"," "],
|
||||
["operator",":="]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control","assume"],
|
||||
["text"," "],
|
||||
["identifier","H"],
|
||||
["text"," "],
|
||||
["punctuation.operator",":"],
|
||||
["text"," "],
|
||||
["operator","∀"],
|
||||
["identifier","x"],
|
||||
["text"," "],
|
||||
["punctuation.operator",":"],
|
||||
["text"," "],
|
||||
["identifier","A"],
|
||||
["punctuation.operator",","],
|
||||
["text"," "],
|
||||
["identifier","p"],
|
||||
["text"," "],
|
||||
["identifier","x"],
|
||||
["text"," "],
|
||||
["operator","∧"],
|
||||
["text"," "],
|
||||
["identifier","q"],
|
||||
["text"," "],
|
||||
["identifier","x"],
|
||||
["punctuation.operator",","]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control","take"],
|
||||
["text"," "],
|
||||
["identifier","y"],
|
||||
["text"," "],
|
||||
["punctuation.operator",":"],
|
||||
["text"," "],
|
||||
["identifier","A"],
|
||||
["punctuation.operator",","]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control","show"],
|
||||
["text"," "],
|
||||
["identifier","p"],
|
||||
["text"," "],
|
||||
["identifier","y"],
|
||||
["punctuation.operator",","],
|
||||
["text"," "],
|
||||
["keyword.control","from"],
|
||||
["text"," "],
|
||||
["identifier","and"],
|
||||
["punctuation.operator","."],
|
||||
["identifier","elim_left"],
|
||||
["text"," "],
|
||||
["paren.lparen","("],
|
||||
["identifier","H"],
|
||||
["text"," "],
|
||||
["identifier","y"],
|
||||
["paren.rparen",")"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.control","end"]
|
||||
],[
|
||||
"start"
|
||||
]]
|
474
plugins/node_modules/ace/lib/ace/mode/_test/tokens_php_laravel_blade.json
wygenerowano
vendored
100644
474
plugins/node_modules/ace/lib/ace/mode/_test/tokens_php_laravel_blade.json
wygenerowano
vendored
100644
|
@ -0,0 +1,474 @@
|
|||
[[
|
||||
"start",
|
||||
["comment.start.xml","<!--"],
|
||||
["comment.xml"," Stored in resources/views/layouts/app.blade.php "],
|
||||
["comment.end.xml","-->"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","html"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","head"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","title"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","App Name - "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.directives.blade","yield"],
|
||||
["parenthesis.begin.blade","("],
|
||||
["punctuation.definition.string.begin.blade","'"],
|
||||
["string.quoted.double.blade","title"],
|
||||
["punctuation.definition.string.end.blade","'"],
|
||||
["parenthesis.end.blade",")"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","title"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"js-start",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.script.tag-name.xml","script"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["storage.type","var"],
|
||||
["text"," "],
|
||||
["identifier","app"],
|
||||
["text"," "],
|
||||
["keyword.operator","="],
|
||||
["text"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.directives.blade","json"],
|
||||
["parenthesis.begin.blade","("],
|
||||
["variable.blade","$array"],
|
||||
["parenthesis.end.blade",")"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.script.tag-name.xml","script"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","head"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","body"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.directives.blade","extends"],
|
||||
["parenthesis.begin.blade","("],
|
||||
["punctuation.definition.string.begin.blade","'"],
|
||||
["string.quoted.double.blade","layouts.app"],
|
||||
["punctuation.definition.string.end.blade","'"],
|
||||
["parenthesis.end.blade",")"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.directives.blade","section"],
|
||||
["parenthesis.begin.blade","("],
|
||||
["punctuation.definition.string.begin.blade","'"],
|
||||
["string.quoted.double.blade","sidebar"],
|
||||
["punctuation.definition.string.end.blade","'"],
|
||||
["parenthesis.end.blade",")"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.directives.blade","parent"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","This is appended to the master sidebar."],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.directives.blade","endsection"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.control.blade","if"],
|
||||
["text.xml"," "],
|
||||
["parenthesis.begin.blade","("],
|
||||
["source.blade","count"],
|
||||
["parenthesis.begin.blade","("],
|
||||
["variable.blade","$records"],
|
||||
["parenthesis.end.blade",")"],
|
||||
["source.blade"," "],
|
||||
["keyword.operator.blade","==="],
|
||||
["source.blade"," 1"],
|
||||
["parenthesis.end.blade",")"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," I have one record!"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.control.blade","else"],
|
||||
["text.xml","if "],
|
||||
["parenthesis.begin.blade","("],
|
||||
["source.blade","count"],
|
||||
["parenthesis.begin.blade","("],
|
||||
["variable.blade","$records"],
|
||||
["parenthesis.end.blade",")"],
|
||||
["source.blade"," "],
|
||||
["keyword.operator.blade",">"],
|
||||
["source.blade"," 1"],
|
||||
["parenthesis.end.blade",")"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," I have multiple records!"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.control.blade","else"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," I don't have any records!"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.control.blade","endif"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.control.blade","foreach"],
|
||||
["text.xml"," "],
|
||||
["parenthesis.begin.blade","("],
|
||||
["variable.blade","$users"],
|
||||
["source.blade"," "],
|
||||
["keyword.operator.blade","as"],
|
||||
["source.blade"," "],
|
||||
["variable.blade","$user"],
|
||||
["parenthesis.end.blade",")"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.control.blade","if"],
|
||||
["text.xml"," "],
|
||||
["parenthesis.begin.blade","("],
|
||||
["variable.blade","$user"],
|
||||
["keyword.operator.blade","->"],
|
||||
["constant.other.property.blade","type"],
|
||||
["source.blade"," "],
|
||||
["keyword.operator.blade","=="],
|
||||
["source.blade"," 1"],
|
||||
["parenthesis.end.blade",")"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.control.blade","continue"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.control.blade","endif"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","li"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["injections.begin.blade","{{"],
|
||||
["source.blade"," "],
|
||||
["variable.blade","$user"],
|
||||
["keyword.operator.blade","->"],
|
||||
["constant.other.property.blade","name"],
|
||||
["source.blade"," "],
|
||||
["injections.end.blade","}}"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","li"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.control.blade","if"],
|
||||
["text.xml"," "],
|
||||
["parenthesis.begin.blade","("],
|
||||
["variable.blade","$user"],
|
||||
["keyword.operator.blade","->"],
|
||||
["constant.other.property.blade","number"],
|
||||
["source.blade"," "],
|
||||
["keyword.operator.blade","=="],
|
||||
["source.blade"," 5"],
|
||||
["parenthesis.end.blade",")"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.control.blade","break"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.control.blade","endif"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.control.blade","endforeach"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.control.blade","foreach"],
|
||||
["text.xml"," "],
|
||||
["parenthesis.begin.blade","("],
|
||||
["variable.blade","$users"],
|
||||
["source.blade"," "],
|
||||
["keyword.operator.blade","as"],
|
||||
["source.blade"," "],
|
||||
["variable.blade","$user"],
|
||||
["parenthesis.end.blade",")"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.control.blade","continue"],
|
||||
["parenthesis.begin.blade","("],
|
||||
["variable.blade","$user"],
|
||||
["keyword.operator.blade","->"],
|
||||
["constant.other.property.blade","type"],
|
||||
["source.blade"," "],
|
||||
["keyword.operator.blade","=="],
|
||||
["source.blade"," 1"],
|
||||
["parenthesis.end.blade",")"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","li"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["injections.begin.blade","{{"],
|
||||
["source.blade"," "],
|
||||
["variable.blade","$user"],
|
||||
["keyword.operator.blade","->"],
|
||||
["constant.other.property.blade","name"],
|
||||
["source.blade"," "],
|
||||
["injections.end.blade","}}"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","li"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.control.blade","break"],
|
||||
["parenthesis.begin.blade","("],
|
||||
["variable.blade","$user"],
|
||||
["keyword.operator.blade","->"],
|
||||
["constant.other.property.blade","number"],
|
||||
["source.blade"," "],
|
||||
["keyword.operator.blade","=="],
|
||||
["source.blade"," 5"],
|
||||
["parenthesis.end.blade",")"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.control.blade","endforeach"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.directives.blade","include"],
|
||||
["parenthesis.begin.blade","("],
|
||||
["punctuation.definition.string.begin.blade","'"],
|
||||
["string.quoted.double.blade","shared.errors"],
|
||||
["punctuation.definition.string.end.blade","'"],
|
||||
["parenthesis.end.blade",")"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.form.tag-name.xml","form"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["comment.start.xml","<!--"],
|
||||
["comment.xml"," Form Contents "],
|
||||
["comment.end.xml","-->"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.form.tag-name.xml","form"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.directives.blade","includeIf"],
|
||||
["parenthesis.begin.blade","("],
|
||||
["punctuation.definition.string.begin.blade","'"],
|
||||
["string.quoted.double.blade","view.name"],
|
||||
["punctuation.definition.string.end.blade","'"],
|
||||
["keyword.operator.blade",","],
|
||||
["source.blade"," ["],
|
||||
["punctuation.definition.string.begin.blade","'"],
|
||||
["string.quoted.double.blade","some"],
|
||||
["punctuation.definition.string.end.blade","'"],
|
||||
["source.blade"," "],
|
||||
["keyword.operator.blade","=>"],
|
||||
["source.blade"," "],
|
||||
["punctuation.definition.string.begin.blade","'"],
|
||||
["string.quoted.double.blade","data"],
|
||||
["punctuation.definition.string.end.blade","'"],
|
||||
["source.blade","]"],
|
||||
["parenthesis.end.blade",")"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.directives.blade","env"],
|
||||
["parenthesis.begin.blade","("],
|
||||
["punctuation.definition.string.begin.blade","'"],
|
||||
["string.quoted.double.blade","local"],
|
||||
["punctuation.definition.string.end.blade","'"],
|
||||
["parenthesis.end.blade",")"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["punctuation.definition.comment.blade","// The application is in the local environment..."]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.directives.blade","elseenv"],
|
||||
["parenthesis.begin.blade","("],
|
||||
["punctuation.definition.string.begin.blade","'"],
|
||||
["string.quoted.double.blade","testing"],
|
||||
["punctuation.definition.string.end.blade","'"],
|
||||
["parenthesis.end.blade",")"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["punctuation.definition.comment.blade","// The application is in the testing environment..."]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.control.blade","else"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["punctuation.definition.comment.blade","// The application is not in the local or testing environment..."]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.directives.blade","endenv"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","class"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"container\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["directive.declaration.blade","@"],
|
||||
["keyword.directives.blade","yield"],
|
||||
["parenthesis.begin.blade","("],
|
||||
["punctuation.definition.string.begin.blade","'"],
|
||||
["string.quoted.double.blade","content"],
|
||||
["punctuation.definition.string.end.blade","'"],
|
||||
["parenthesis.end.blade",")"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","body"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","html"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
]]
|
|
@ -0,0 +1,722 @@
|
|||
[[
|
||||
"start",
|
||||
["keyword","Red"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["variable.set-word","info:"],
|
||||
["text"," "],
|
||||
["keyword.native","func"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["variable.lit-word","'fn"],
|
||||
["text"," "],
|
||||
["variable.refinement","/name"],
|
||||
["text"," "],
|
||||
["variable.refinement","/intro"],
|
||||
["text"," "],
|
||||
["variable.refinement","/args"],
|
||||
["text"," "],
|
||||
["variable.refinement","/refinements"],
|
||||
["text"," "],
|
||||
["keyword","/local"],
|
||||
["text","s "],
|
||||
["variable.refinement","/return"],
|
||||
["text"," "],
|
||||
["variable.refinement","/spec"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["variable.refinement","/arg-num"],
|
||||
["text"," "],
|
||||
["variable.refinement","/arg-names"],
|
||||
["text"," "],
|
||||
["variable.refinement","/arg-types"],
|
||||
["text"," "],
|
||||
["variable.refinement","/ref-names"],
|
||||
["text"," "],
|
||||
["variable.refinement","/ref-types"],
|
||||
["text"," "],
|
||||
["variable.refinement","/ref-num"],
|
||||
["text"," "],
|
||||
["variable.refinement","/type"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["keyword","/local"],
|
||||
["text"," "],
|
||||
["variable.word","intr"],
|
||||
["text"," "],
|
||||
["variable.word","ars"],
|
||||
["text"," "],
|
||||
["variable.word","refs"],
|
||||
["text"," "],
|
||||
["variable.word","locs"],
|
||||
["text"," "],
|
||||
["variable.word","ret"],
|
||||
["text"," "],
|
||||
["variable.word","arg"],
|
||||
["text"," "],
|
||||
["variable.word","ref"],
|
||||
["text"," "],
|
||||
["variable.word","typ"]
|
||||
],[
|
||||
"start",
|
||||
["paren.block-end","]"],
|
||||
["paren.block-start","["]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["variable.set-word","intr:"],
|
||||
["text"," "],
|
||||
["keyword.action","copy"],
|
||||
["text"," "],
|
||||
["string","\"\""],
|
||||
["text"," "],
|
||||
["variable.set-word","ars:"],
|
||||
["text"," "],
|
||||
["keyword.action","make"],
|
||||
["text"," "],
|
||||
["constant.datatype!","map!"],
|
||||
["text"," "],
|
||||
["keyword.action","copy"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["paren.block-end","]"],
|
||||
["text"," "],
|
||||
["variable.set-word","refs:"],
|
||||
["text"," "],
|
||||
["keyword.action","make"],
|
||||
["text"," "],
|
||||
["constant.datatype!","map!"],
|
||||
["text"," "],
|
||||
["keyword.action","copy"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["paren.block-end","]"],
|
||||
["text"," "],
|
||||
["variable.set-word","locs:"],
|
||||
["text"," "],
|
||||
["keyword.action","copy"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["paren.block-end","]"],
|
||||
["text"," "],
|
||||
["variable.set-word","ret:"],
|
||||
["text"," "],
|
||||
["keyword.action","copy"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["paren.block-end","]"],
|
||||
["text"," "],
|
||||
["variable.set-word","typ:"],
|
||||
["text"," "],
|
||||
["variable.set-word","ref-arg:"],
|
||||
["text"," "],
|
||||
["variable.set-word","ref-arg-type:"],
|
||||
["text"," "],
|
||||
["constant.language","none"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["keyword.control","if"],
|
||||
["text"," "],
|
||||
["keyword.function","lit-word?"],
|
||||
["text"," "],
|
||||
["variable.word","fn"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["variable.set-word","fn:"],
|
||||
["text"," "],
|
||||
["keyword.function","to-word"],
|
||||
["text"," "],
|
||||
["variable.word","fn"],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["keyword.control","unless"],
|
||||
["text"," "],
|
||||
["keyword.action","find"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["constant.datatype!","op!"],
|
||||
["text"," "],
|
||||
["constant.datatype!","native!"],
|
||||
["text"," "],
|
||||
["constant.datatype!","function!"],
|
||||
["text"," "],
|
||||
["constant.datatype!","action!"],
|
||||
["paren.block-end","]"],
|
||||
["text"," "],
|
||||
["keyword.native","type?"],
|
||||
["variable.refinement","/word"],
|
||||
["text"," "],
|
||||
["keyword.native","get"],
|
||||
["text"," "],
|
||||
["variable.word","fn"],
|
||||
["text"," "],
|
||||
["paren.block-start","["]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["keyword.function","cause-error"],
|
||||
["text"," "],
|
||||
["variable.lit-word","'user"],
|
||||
["text"," "],
|
||||
["variable.lit-word","'message"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["string","\"Only function types accepted!\""],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["variable.set-word","out:"],
|
||||
["text"," "],
|
||||
["keyword.action","make"],
|
||||
["text"," "],
|
||||
["constant.datatype!","map!"],
|
||||
["text"," "],
|
||||
["keyword.action","copy"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["variable.set-word","specs:"],
|
||||
["text"," "],
|
||||
["keyword.function","spec-of"],
|
||||
["text"," "],
|
||||
["keyword.native","get"],
|
||||
["text"," "],
|
||||
["variable.word","fn"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["keyword.native","parse"],
|
||||
["text"," "],
|
||||
["variable.word","specs"],
|
||||
["text"," "],
|
||||
["paren.block-start","["]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["variable.word","opt"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["keyword.native","set"],
|
||||
["text"," "],
|
||||
["variable.word","intr"],
|
||||
["text"," "],
|
||||
["constant.datatype!","string!"],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["keyword.native","any"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["keyword.native","set"],
|
||||
["text"," "],
|
||||
["variable.word","arg"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["constant.datatype!","word!"],
|
||||
["text"," | "],
|
||||
["constant.datatype!","lit-word!"],
|
||||
["paren.block-end","]"],
|
||||
["text"," "],
|
||||
["variable.word","opt"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["keyword.native","set"],
|
||||
["text"," "],
|
||||
["variable.word","typ"],
|
||||
["text"," "],
|
||||
["constant.datatype!","block!"],
|
||||
["paren.block-end","]"],
|
||||
["text"," "],
|
||||
["variable.word","opt"],
|
||||
["text"," "],
|
||||
["constant.datatype!","string!"],
|
||||
["text"," "],
|
||||
["paren.parens-start","("],
|
||||
["keyword.action","put"],
|
||||
["text"," "],
|
||||
["variable.word","ars"],
|
||||
["text"," "],
|
||||
["variable.word","arg"],
|
||||
["text"," "],
|
||||
["keyword.control","either"],
|
||||
["text"," "],
|
||||
["variable.word","typ"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["variable.word","typ"],
|
||||
["paren.block-end","]"],
|
||||
["paren.block-start","[["],
|
||||
["constant.datatype!","any-type!"],
|
||||
["paren.block-end","]]"],
|
||||
["paren.parens-end",")"],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["keyword.native","any"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["keyword.native","set"],
|
||||
["text"," "],
|
||||
["variable.word","ref"],
|
||||
["text"," "],
|
||||
["constant.datatype!","refinement!"],
|
||||
["text"," "],
|
||||
["paren.block-start","["]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["keyword.control","if"],
|
||||
["text"," "],
|
||||
["paren.parens-start","("],
|
||||
["variable.word","ref"],
|
||||
["keyword.operator"," <> "],
|
||||
["keyword","/local"],
|
||||
["paren.parens-end",")"],
|
||||
["text"," "],
|
||||
["paren.parens-start","("],
|
||||
["keyword.action","put"],
|
||||
["text"," "],
|
||||
["variable.word","refs"],
|
||||
["text"," "],
|
||||
["keyword.function","to-lit-word"],
|
||||
["text"," "],
|
||||
["variable.word","ref"],
|
||||
["text"," "],
|
||||
["keyword.action","make"],
|
||||
["text"," "],
|
||||
["constant.datatype!","map!"],
|
||||
["text"," "],
|
||||
["keyword.action","copy"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["paren.block-end","]"],
|
||||
["paren.parens-end",")"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t"],
|
||||
["variable.word","opt"],
|
||||
["text"," "],
|
||||
["constant.datatype!","string!"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t"],
|
||||
["keyword.native","any"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["keyword.native","set"],
|
||||
["text"," "],
|
||||
["variable.word","ref-arg"],
|
||||
["text"," "],
|
||||
["constant.datatype!","word!"],
|
||||
["text"," "],
|
||||
["variable.word","opt"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["keyword.native","set"],
|
||||
["text"," "],
|
||||
["variable.word","ref-arg-type"],
|
||||
["text"," "],
|
||||
["constant.datatype!","block!"],
|
||||
["paren.block-end","]"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t\t"],
|
||||
["paren.parens-start","("],
|
||||
["keyword.action","put"],
|
||||
["text"," "],
|
||||
["variable.word","refs"],
|
||||
["text","/"],
|
||||
["paren.parens-start","("],
|
||||
["keyword.function","to-word"],
|
||||
["text"," "],
|
||||
["variable.word","ref"],
|
||||
["paren.parens-end",")"],
|
||||
["text"," "],
|
||||
["keyword.function","to-lit-word"],
|
||||
["text"," "],
|
||||
["variable.word","ref-arg"],
|
||||
["text"," "],
|
||||
["keyword.control","either"],
|
||||
["text"," "],
|
||||
["variable.word","ref-arg-type"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["variable.word","ref-arg-type"],
|
||||
["paren.block-end","]"],
|
||||
["paren.block-start","[["],
|
||||
["constant.datatype!","any-type!"],
|
||||
["paren.block-end","]]"],
|
||||
["paren.parens-end",")"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t"],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t|\t"],
|
||||
["keyword.native","any"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["keyword.native","set"],
|
||||
["text"," "],
|
||||
["variable.word","loc"],
|
||||
["text"," "],
|
||||
["constant.datatype!","word!"],
|
||||
["text"," "],
|
||||
["paren.parens-start","("],
|
||||
["keyword.action","append"],
|
||||
["text"," "],
|
||||
["variable.word","locs"],
|
||||
["text"," "],
|
||||
["variable.word","loc"],
|
||||
["paren.parens-end",")"],
|
||||
["text"," "],
|
||||
["variable.word","opt"],
|
||||
["text"," "],
|
||||
["constant.datatype!","string!"],
|
||||
["paren.block-end","]"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t"],
|
||||
["variable.word","opt"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["constant.datatype!","set-word!"],
|
||||
["text"," "],
|
||||
["keyword.native","set"],
|
||||
["text"," "],
|
||||
["variable.word","ret"],
|
||||
["text"," "],
|
||||
["constant.datatype!","block!"],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["paren.block-end","]]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["paren.parens-start","("]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["variable.set-word","out:"],
|
||||
["text"," "],
|
||||
["keyword.control","case"],
|
||||
["text"," "],
|
||||
["paren.block-start","["]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["keyword.view.option","name"],
|
||||
["text","\t\t"],
|
||||
["paren.block-start","["],
|
||||
["keyword.function","to-word"],
|
||||
["text"," "],
|
||||
["variable.word","fn"],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["variable.word","intro"],
|
||||
["text"," \t\t"],
|
||||
["paren.block-start","["],
|
||||
["variable.word","intr"],
|
||||
["paren.block-end","]"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["variable.word","args"],
|
||||
["text","\t\t"],
|
||||
["paren.block-start","["],
|
||||
["variable.word","ars"],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["variable.word","arg-num"],
|
||||
["text","\t\t"],
|
||||
["paren.block-start","["],
|
||||
["keyword.action","length?"],
|
||||
["text"," "],
|
||||
["variable.word","ars"],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["variable.word","arg-names"],
|
||||
["text"," \t"],
|
||||
["paren.block-start","["],
|
||||
["keyword.action","copy"],
|
||||
["text"," "],
|
||||
["keyword.function","keys-of"],
|
||||
["text"," "],
|
||||
["variable.word","ars"],
|
||||
["paren.block-end","]"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["variable.word","arg-types"],
|
||||
["text","\t"],
|
||||
["paren.block-start","["],
|
||||
["keyword.action","copy"],
|
||||
["text"," "],
|
||||
["keyword.function","values-of"],
|
||||
["text"," "],
|
||||
["variable.word","ars"],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["variable.word","refinements"],
|
||||
["text"," "],
|
||||
["paren.block-start","["],
|
||||
["variable.word","refs"],
|
||||
["paren.block-end","]"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["variable.word","ref-names"],
|
||||
["text","\t"],
|
||||
["paren.block-start","["],
|
||||
["keyword.action","copy"],
|
||||
["text"," "],
|
||||
["keyword.function","keys-of"],
|
||||
["text"," "],
|
||||
["variable.word","refs"],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["variable.word","ref-types"],
|
||||
["text","\t"],
|
||||
["paren.block-start","["],
|
||||
["keyword.action","copy"],
|
||||
["text"," "],
|
||||
["keyword.function","values-of"],
|
||||
["text"," "],
|
||||
["variable.word","refs"],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["variable.word","ref-num"],
|
||||
["text","\t\t"],
|
||||
["paren.block-start","["],
|
||||
["keyword.action","length?"],
|
||||
["text"," "],
|
||||
["variable.word","refs"],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["variable.word","locals"],
|
||||
["text"," \t\t"],
|
||||
["paren.block-start","["],
|
||||
["variable.word","locs"],
|
||||
["paren.block-end","]"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["keyword.control","return"],
|
||||
["text"," \t\t"],
|
||||
["paren.block-start","["],
|
||||
["variable.word","ret"],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["variable.word","spec"],
|
||||
["text","\t\t"],
|
||||
["paren.block-start","["],
|
||||
["variable.word","specs"],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["constant.language","true"],
|
||||
["text"," \t\t"],
|
||||
["paren.block-start","["]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t"],
|
||||
["keyword.action","make"],
|
||||
["text"," "],
|
||||
["constant.datatype!","object!"],
|
||||
["text"," "],
|
||||
["paren.block-start","["]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t\t"],
|
||||
["keyword.view.option","name"],
|
||||
["text",": \t\t"],
|
||||
["keyword.function","to-word"],
|
||||
["text"," "],
|
||||
["variable.word","fn"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t\t"],
|
||||
["variable.set-word","intro:"],
|
||||
["text"," \t\t"],
|
||||
["variable.word","intr"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t\t"],
|
||||
["variable.set-word","args:"],
|
||||
["text"," \t\t"],
|
||||
["variable.word","ars"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t\t"],
|
||||
["variable.set-word","refinements:"],
|
||||
["text"," "],
|
||||
["variable.word","refs"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t\t"],
|
||||
["variable.set-word","locals:"],
|
||||
["text"," \t"],
|
||||
["variable.word","locs"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t\t"],
|
||||
["keyword.control","return"],
|
||||
["text",": \t"],
|
||||
["variable.word","ret"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t\t"],
|
||||
["variable.set-word","spec:"],
|
||||
["text"," \t\t"],
|
||||
["variable.word","specs"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t\t"],
|
||||
["variable.set-word","type:"],
|
||||
["text"," \t\t"],
|
||||
["keyword.native","type?"],
|
||||
["text"," "],
|
||||
["keyword.native","get"],
|
||||
["text"," "],
|
||||
["variable.word","fn"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t\t"],
|
||||
["variable.set-word","arg-num:"],
|
||||
["text"," \t"],
|
||||
["keyword.action","length?"],
|
||||
["text"," "],
|
||||
["variable.word","args"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t\t"],
|
||||
["variable.set-word","arg-names:"],
|
||||
["text"," \t"],
|
||||
["keyword.action","copy"],
|
||||
["text"," "],
|
||||
["keyword.function","keys-of"],
|
||||
["text"," "],
|
||||
["variable.word","args"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t\t"],
|
||||
["variable.set-word","arg-types:"],
|
||||
["text"," \t"],
|
||||
["keyword.action","copy"],
|
||||
["text"," "],
|
||||
["keyword.function","values-of"],
|
||||
["text"," "],
|
||||
["variable.word","args"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t\t"],
|
||||
["variable.set-word","ref-names:"],
|
||||
["text"," \t"],
|
||||
["keyword.action","copy"],
|
||||
["text"," "],
|
||||
["keyword.function","keys-of"],
|
||||
["text"," "],
|
||||
["variable.word","refinements"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t\t"],
|
||||
["variable.set-word","ref-types:"],
|
||||
["text"," \t"],
|
||||
["keyword.action","copy"],
|
||||
["text"," "],
|
||||
["keyword.function","values-of"],
|
||||
["text"," "],
|
||||
["variable.word","refinements"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t\t"],
|
||||
["variable.set-word","ref-num:"],
|
||||
["text","\t"],
|
||||
["keyword.action","length?"],
|
||||
["text"," "],
|
||||
["variable.word","refinements"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\t"],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["paren.block-end","]"],
|
||||
["paren.parens-end",")"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["variable.word","out"]
|
||||
],[
|
||||
"start",
|
||||
["paren.block-end","]"]
|
||||
],[
|
||||
"start"
|
||||
]]
|
|
@ -1,181 +0,0 @@
|
|||
[[
|
||||
"start",
|
||||
["entity.name.tag.slim","doctype"],
|
||||
["text"," html"]
|
||||
],[
|
||||
"start",
|
||||
["entity.name.tag.slim","html"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag"," "],
|
||||
["entity.name.tag.slim","head"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag"," "],
|
||||
["entity.name.tag.slim","title"],
|
||||
["text"," Slim Examples"]
|
||||
],[
|
||||
"entity.other.attribute-name.event.slim",
|
||||
["meta.tag"," "],
|
||||
["entity.name.tag.slim","meta"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name.event.slim","name"],
|
||||
["text","="],
|
||||
["punctuation.definition.string.begin.html","\""],
|
||||
["string.quoted.double.html","keywords"],
|
||||
["punctuation.definition.string.end.html","\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name.event.slim","content"],
|
||||
["text","="],
|
||||
["punctuation.definition.string.begin.html","\""],
|
||||
["string.quoted.double.html","template language"],
|
||||
["punctuation.definition.string.end.html","\""]
|
||||
],[
|
||||
["entity.other.attribute-name.event.slim","entity.other.attribute-name.event.slim"],
|
||||
["text"," meta "],
|
||||
["entity.other.attribute-name.event.slim","name"],
|
||||
["text","="],
|
||||
["punctuation.definition.string.begin.html","\""],
|
||||
["string.quoted.double.html","author"],
|
||||
["punctuation.definition.string.end.html","\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name.event.slim","content"],
|
||||
["text","="],
|
||||
["text","author"]
|
||||
],[
|
||||
["entity.other.attribute-name.event.slim","entity.other.attribute-name.event.slim","entity.other.attribute-name.event.slim","entity.other.attribute-name.event.slim","entity.other.attribute-name.event.slim","entity.other.attribute-name.event.slim"],
|
||||
["text"," link "],
|
||||
["entity.other.attribute-name.event.slim","rel"],
|
||||
["text","="],
|
||||
["punctuation.definition.string.begin.html","\""],
|
||||
["string.quoted.double.html","icon"],
|
||||
["punctuation.definition.string.end.html","\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name.event.slim","type"],
|
||||
["text","="],
|
||||
["punctuation.definition.string.begin.html","\""],
|
||||
["string.quoted.double.html","image/png"],
|
||||
["punctuation.definition.string.end.html","\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name.event.slim","href"],
|
||||
["text","="],
|
||||
["text","file_path("],
|
||||
["punctuation.definition.string.begin.html","\""],
|
||||
["string.quoted.double.html","favicon.png"],
|
||||
["punctuation.definition.string.end.html","\""],
|
||||
["text",")"]
|
||||
],[
|
||||
["entity.other.attribute-name.event.slim","entity.other.attribute-name.event.slim","entity.other.attribute-name.event.slim","entity.other.attribute-name.event.slim"],
|
||||
["text"," javascript:"]
|
||||
],[
|
||||
["entity.other.attribute-name.event.slim","entity.other.attribute-name.event.slim"],
|
||||
["text"," alert("],
|
||||
["punctuation.definition.string.begin.html","'"],
|
||||
["string.quoted.single.html","Slim supports embedded javascript!"],
|
||||
["punctuation.definition.string.end.html","'"],
|
||||
["text",")"]
|
||||
],[
|
||||
"entity.other.attribute-name.event.slim"
|
||||
],[
|
||||
"start",
|
||||
["text"," body"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag"," "],
|
||||
["entity.name.tag.slim","h1"],
|
||||
["text"," Markup examples"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag"," "],
|
||||
["entity.name.tag.slim","#"],
|
||||
["entity.other.attribute-name.event.slim","content"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag"," "],
|
||||
["entity.name.tag.slim","p"],
|
||||
["text"," This example shows you how a basic Slim file looks."]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.line.ruby.slim","== yield"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.line.ruby.slim","- if items.any?"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag"," "],
|
||||
["entity.name.tag.slim","table"],
|
||||
["punctuation.separator.key-value.html","#"],
|
||||
["entity.other.attribute-name.html","items"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.line.ruby.slim","- for item in items"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag"," "],
|
||||
["entity.name.tag.slim","tr"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag"," "],
|
||||
["entity.name.tag.slim","td"],
|
||||
["punctuation.separator.key-value.html","."],
|
||||
["entity.other.attribute-name.html","name"],
|
||||
["text"," "],
|
||||
["meta.line.ruby.slim","= item.name"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag"," "],
|
||||
["entity.name.tag.slim","td"],
|
||||
["punctuation.separator.key-value.html","."],
|
||||
["entity.other.attribute-name.html","price"],
|
||||
["text"," "],
|
||||
["meta.line.ruby.slim","= item.price"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.line.ruby.slim","- else"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag"," "],
|
||||
["entity.name.tag.slim","p"],
|
||||
["text"," No items found. Please add some inventory."]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag"," "],
|
||||
["entity.name.tag.slim","Thank"],
|
||||
["text"," you!"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag"," "],
|
||||
["entity.name.tag.slim","div"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name.event.slim","id"],
|
||||
["text","="],
|
||||
["punctuation.definition.string.begin.html","\""],
|
||||
["string.quoted.double.html","footer"],
|
||||
["punctuation.definition.string.end.html","\""]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.line.ruby.slim","== render 'footer'"]
|
||||
],[
|
||||
"start",
|
||||
["text"," | Copyright © "],
|
||||
["punctuation.section.embedded.ruby","#{"],
|
||||
["source.ruby.embedded.html","@year"],
|
||||
["punctuation.section.embedded.ruby","}"],
|
||||
["text"," "],
|
||||
["punctuation.section.embedded.ruby","#{"],
|
||||
["source.ruby.embedded.html","@author"],
|
||||
["punctuation.section.embedded.ruby","}"]
|
||||
]]
|
|
@ -0,0 +1,160 @@
|
|||
[[
|
||||
"start",
|
||||
["keyword.html.tags.slim","doctype html"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.html.tags.slim","html"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.html.tags.slim"," head"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.html.tags.slim"," title"],
|
||||
["text"," Slim Examples"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.html.tags.slim"," meta"],
|
||||
["text"," name"],
|
||||
["keyword.operator.equals.slim","="],
|
||||
["string","\"keywords\""],
|
||||
["text"," content"],
|
||||
["keyword.operator.equals.slim","="],
|
||||
["string","\"template language\""]
|
||||
],[
|
||||
"start",
|
||||
["keyword.html.tags.slim"," meta"],
|
||||
["text"," name"],
|
||||
["keyword.operator.equals.slim","="],
|
||||
["string","\"author\""],
|
||||
["text"," content"],
|
||||
["keyword.operator.equals.slim","="],
|
||||
["text","author"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.html.tags.slim"," link"],
|
||||
["text"," rel"],
|
||||
["keyword.operator.equals.slim","="],
|
||||
["string","\"icon\""],
|
||||
["text"," type"],
|
||||
["keyword.operator.equals.slim","="],
|
||||
["string","\"image/png\""],
|
||||
["text"," href"],
|
||||
["keyword.operator.equals.slim","="],
|
||||
["text","file_path"],
|
||||
["paren","("],
|
||||
["string","\"favicon.png\""],
|
||||
["paren",")"]
|
||||
],[
|
||||
["language-embed",[],[" ","javascript"],"start"],
|
||||
["keyword"," javascript:"]
|
||||
],[
|
||||
["language-embed","no_regex",[" ","javascript"],"start"],
|
||||
["text"," "],
|
||||
["text"," "],
|
||||
["support.function","alert"],
|
||||
["paren.lparen","("],
|
||||
["string","'Slim supports embedded javascript!'"],
|
||||
["paren.rparen",")"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["keyword.html.tags.slim"," body"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.html.tags.slim"," h1"],
|
||||
["text"," Markup examples"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["keyword.slim"," #content"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.html.tags.slim"," p"],
|
||||
["text"," This example shows you how a basic Slim file looks."]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["keyword.control.slim"," =="],
|
||||
["text"," "],
|
||||
["list.ruby.operators.slim","yield"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["keyword.control.slim"," -"],
|
||||
["text"," "],
|
||||
["list.ruby.operators.slim","if"],
|
||||
["text"," items.any?"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.html.tags.slim"," table#items"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.control.slim"," -"],
|
||||
["text"," "],
|
||||
["list.ruby.operators.slim","for"],
|
||||
["text"," item "],
|
||||
["list.ruby.operators.slim","in"],
|
||||
["text"," items"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.html.tags.slim"," tr"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.html.tags.slim"," td.name"],
|
||||
["text"," "],
|
||||
["keyword.operator.equals.slim","="],
|
||||
["text"," item.name"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.html.tags.slim"," td.price"],
|
||||
["text"," "],
|
||||
["keyword.operator.equals.slim","="],
|
||||
["text"," item.price"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.control.slim"," -"],
|
||||
["text"," "],
|
||||
["list.ruby.operators.slim","else"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.html.tags.slim"," p"],
|
||||
["text"," No items found. Please add some inventory."]
|
||||
],[
|
||||
"start",
|
||||
["text"," Thank you!"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["keyword.html.tags.slim"," div"],
|
||||
["text"," id"],
|
||||
["keyword.operator.equals.slim","="],
|
||||
["string","\"footer\""]
|
||||
],[
|
||||
"start",
|
||||
["keyword.control.slim"," =="],
|
||||
["text"," render "],
|
||||
["string","'footer'"]
|
||||
],[
|
||||
["mlString",6],
|
||||
["string"," | Copyright © #{@year} #{@author}"]
|
||||
],[
|
||||
["mlString",6],
|
||||
["indent"," "],
|
||||
["string","indenting test"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["keyword.control.slim"," -"],
|
||||
["text"," "],
|
||||
["class.variable.slim","@page_current"],
|
||||
["text"," "],
|
||||
["keyword.operator.ruby.embedded.slim","="],
|
||||
["text"," "],
|
||||
["list.meta.slim","true"]
|
||||
]]
|
|
@ -0,0 +1,55 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
define(function (require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var FSharpHighlightRules = require("./fsharp_highlight_rules").FSharpHighlightRules;
|
||||
|
||||
var Mode = function () {
|
||||
TextMode.call(this);
|
||||
this.HighlightRules = FSharpHighlightRules;
|
||||
};
|
||||
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
|
||||
(function () {
|
||||
this.lineCommentStart = "//";
|
||||
this.blockComment = {start: "(*", end: "*)"};
|
||||
|
||||
|
||||
this.$id = "ace/mode/fsharp";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
|
@ -0,0 +1,168 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
define(function (require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
var FSharpHighlightRules = function () {
|
||||
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"variable": "this",
|
||||
"keyword": 'abstract|assert|base|begin|class|default|delegate|done|downcast|downto|elif\
|
||||
|else|exception|extern|false|finally|function|global|inherit|inline|interface|internal|lazy|match\
|
||||
|member|module|mutable|namespace|open|or|override|private|public|rec|return|return!|select|static\
|
||||
|struct|then|to|true|try|typeof|upcast|use|use!|val|void|when|while|with|yield|yield!|__SOURCE_DIRECTORY__\
|
||||
|as|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue\
|
||||
|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall\
|
||||
|trait|virtual|volatile|and|do|end|for|fun|if|in|let|let!|new|not|null|of|endif',
|
||||
"constant": "true|false"
|
||||
}, "identifier");
|
||||
|
||||
var floatNumber = "(?:(?:(?:(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.))|(?:\\d+))(?:[eE][+-]?\\d+))|(?:(?:(?:\\d+)?(?:\\.\\d+))|(?:(?:\\d+)\\.)))";
|
||||
|
||||
this.$rules = {
|
||||
"start": [
|
||||
{
|
||||
token: "variable.classes",
|
||||
regex: '\\[\\<[.]*\\>\\]'
|
||||
},
|
||||
{
|
||||
token: "comment",
|
||||
regex: '//.*$'
|
||||
},
|
||||
{
|
||||
token: "comment.start",
|
||||
regex: /\(\*/,
|
||||
push: "blockComment"
|
||||
},
|
||||
{
|
||||
token: "string",
|
||||
regex: "'.'"
|
||||
},
|
||||
{
|
||||
token: "string",
|
||||
regex: '"""',
|
||||
next : [{
|
||||
token : "constant.language.escape",
|
||||
regex : /\\./,
|
||||
next : "qqstring"
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '"""',
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}]
|
||||
},
|
||||
{
|
||||
token: "string",
|
||||
regex: '"',
|
||||
next : [{
|
||||
token : "constant.language.escape",
|
||||
regex : /\\./,
|
||||
next : "qqstring"
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '"',
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}]
|
||||
},
|
||||
{
|
||||
token: ["verbatim.string", "string"],
|
||||
regex: '(@?)(")',
|
||||
stateName : "qqstring",
|
||||
next : [{
|
||||
token : "constant.language.escape",
|
||||
regex : '""'
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '"',
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}]
|
||||
},
|
||||
{
|
||||
token: "constant.float",
|
||||
regex: "(?:" + floatNumber + "|\\d+)[jJ]\\b"
|
||||
},
|
||||
{
|
||||
token: "constant.float",
|
||||
regex: floatNumber
|
||||
},
|
||||
{
|
||||
token: "constant.integer",
|
||||
regex: "(?:(?:(?:[1-9]\\d*)|(?:0))|(?:0[oO]?[0-7]+)|(?:0[xX][\\dA-Fa-f]+)|(?:0[bB][01]+))\\b"
|
||||
},
|
||||
{
|
||||
token: ["keyword.type", "variable"],
|
||||
regex: "(type\\s)([a-zA-Z0-9_$\-]*\\b)"
|
||||
},
|
||||
{
|
||||
token: keywordMapper,
|
||||
regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
||||
},
|
||||
{
|
||||
token: "keyword.operator",
|
||||
regex: "\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|="
|
||||
},
|
||||
{
|
||||
token: "paren.lpar",
|
||||
regex: "[[({]"
|
||||
},
|
||||
{
|
||||
token: "paren.rpar",
|
||||
regex: "[\\])}]"
|
||||
}
|
||||
],
|
||||
blockComment: [{
|
||||
regex: /\(\*/,
|
||||
token: "comment.start",
|
||||
push: "blockComment"
|
||||
}, {
|
||||
regex: /\*\)/,
|
||||
token: "comment.end",
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "comment"
|
||||
}]
|
||||
};
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
|
||||
oop.inherits(FSharpHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.FSharpHighlightRules = FSharpHighlightRules;
|
||||
});
|
|
@ -43,9 +43,12 @@ var Mode = function() {
|
|||
this.HighlightRules = MarkdownHighlightRules;
|
||||
|
||||
this.createModeDelegates({
|
||||
"js-": JavaScriptMode,
|
||||
"xml-": XmlMode,
|
||||
"html-": HtmlMode
|
||||
javascript: require("./javascript").Mode,
|
||||
html: require("./html").Mode,
|
||||
bash: require("./sh").Mode,
|
||||
sh: require("./sh").Mode,
|
||||
xml: require("./xml").Mode,
|
||||
css: require("./css").Mode
|
||||
});
|
||||
|
||||
this.foldingRules = new MarkdownFoldMode();
|
||||
|
|
|
@ -31,30 +31,62 @@
|
|||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var modes = require("../config").$modes;
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var lang = require("../lib/lang");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
|
||||
var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
|
||||
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
|
||||
var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
|
||||
|
||||
var escaped = function(ch) {
|
||||
return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*";
|
||||
};
|
||||
|
||||
function github_embed(tag, prefix) {
|
||||
return { // Github style block
|
||||
token : "support.function",
|
||||
regex : "^\\s*```" + tag + "\\s*$",
|
||||
push : prefix + "start"
|
||||
};
|
||||
}
|
||||
|
||||
var MarkdownHighlightRules = function() {
|
||||
HtmlHighlightRules.call(this);
|
||||
// regexp must not have capturing parentheses
|
||||
// regexps are ordered -> the first match is used
|
||||
var codeBlockStartRule = {
|
||||
token : "support.function",
|
||||
regex : /^\s*(```+[^`]*|~~~+[^~]*)$/,
|
||||
onMatch: function(value, state, stack, line) {
|
||||
var m = value.match(/^(\s*)([`~]+)(.*)/);
|
||||
var language = /[\w-]+|$/.exec(m[3])[0];
|
||||
// TODO lazy-load modes
|
||||
if (!modes[language])
|
||||
language = "";
|
||||
stack.unshift("githubblock", [], [m[1], m[2], language], state);
|
||||
return this.token;
|
||||
},
|
||||
next : "githubblock"
|
||||
};
|
||||
var codeBlockRules = [{
|
||||
token : "support.function",
|
||||
regex : ".*",
|
||||
onMatch: function(value, state, stack, line) {
|
||||
var embedState = stack[1];
|
||||
var indent = stack[2][0];
|
||||
var endMarker = stack[2][1];
|
||||
var language = stack[2][2];
|
||||
|
||||
var m = /^(\s*)(`+|~+)\s*$/.exec(value);
|
||||
if (
|
||||
m && m[1].length < indent.length + 3
|
||||
&& m[2].length >= endMarker.length && m[2][0] == endMarker[0]
|
||||
) {
|
||||
stack.splice(0, 3);
|
||||
this.next = stack.shift();
|
||||
return this.token;
|
||||
}
|
||||
this.next = "";
|
||||
if (language && modes[language]) {
|
||||
var data = modes[language].getTokenizer().getLineTokens(value, embedState.slice(0));
|
||||
stack[1] = data.state;
|
||||
return data.tokens;
|
||||
}
|
||||
return this.token;
|
||||
}
|
||||
}];
|
||||
|
||||
this.$rules["start"].unshift({
|
||||
token : "empty_line",
|
||||
|
@ -73,15 +105,8 @@ var MarkdownHighlightRules = function() {
|
|||
regex : /^#{1,6}(?=\s|$)/,
|
||||
next : "header"
|
||||
},
|
||||
github_embed("(?:javascript|js)", "jscode-"),
|
||||
github_embed("xml", "xmlcode-"),
|
||||
github_embed("html", "htmlcode-"),
|
||||
github_embed("css", "csscode-"),
|
||||
{ // Github style block
|
||||
token : "support.function",
|
||||
regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",
|
||||
next : "githubblock"
|
||||
}, { // block quote
|
||||
codeBlockStartRule,
|
||||
{ // block quote
|
||||
token : "string.blockquote",
|
||||
regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
|
||||
next : "blockquote"
|
||||
|
@ -165,11 +190,9 @@ var MarkdownHighlightRules = function() {
|
|||
next : "listblock-start"
|
||||
}, {
|
||||
include : "basic", noEscape: true
|
||||
}, { // Github style block
|
||||
token : "support.function",
|
||||
regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
|
||||
next : "githubblock"
|
||||
}, {
|
||||
},
|
||||
codeBlockStartRule,
|
||||
{
|
||||
defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly
|
||||
} ],
|
||||
|
||||
|
@ -187,39 +210,9 @@ var MarkdownHighlightRules = function() {
|
|||
defaultToken : "string.blockquote"
|
||||
} ],
|
||||
|
||||
"githubblock" : [ {
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken : "support.function"
|
||||
} ]
|
||||
"githubblock" : codeBlockRules
|
||||
});
|
||||
|
||||
this.embedRules(JavaScriptHighlightRules, "jscode-", [{
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.embedRules(HtmlHighlightRules, "htmlcode-", [{
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.embedRules(CssHighlightRules, "csscode-", [{
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.embedRules(XmlHighlightRules, "xmlcode-", [{
|
||||
token : "support.function",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
oop.inherits(MarkdownHighlightRules, TextHighlightRules);
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var PHPLaravelBladeHighlightRules = require("./php_laravel_blade_highlight_rules").PHPLaravelBladeHighlightRules;
|
||||
var PHPMode = require("./php").Mode;
|
||||
var JavaScriptMode = require("./javascript").Mode;
|
||||
var CssMode = require("./css").Mode;
|
||||
var HtmlMode = require("./html").Mode;
|
||||
|
||||
var Mode = function() {
|
||||
PHPMode.call(this);
|
||||
|
||||
this.HighlightRules = PHPLaravelBladeHighlightRules;
|
||||
this.createModeDelegates({
|
||||
"js-": JavaScriptMode,
|
||||
"css-": CssMode,
|
||||
"html-": HtmlMode
|
||||
});
|
||||
};
|
||||
oop.inherits(Mode, PHPMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.$id = "ace/mode/php_laravel_blade";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
200
plugins/node_modules/ace/lib/ace/mode/php_laravel_blade_highlight_rules.js
wygenerowano
vendored
100644
200
plugins/node_modules/ace/lib/ace/mode/php_laravel_blade_highlight_rules.js
wygenerowano
vendored
100644
|
@ -0,0 +1,200 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules;
|
||||
|
||||
var PHPLaravelBladeHighlightRules = function() {
|
||||
PhpHighlightRules.call(this);
|
||||
|
||||
var bladeRules = {
|
||||
start: [{
|
||||
include: "comments"
|
||||
}, {
|
||||
include: "directives"
|
||||
}, {
|
||||
include: "parenthesis"
|
||||
}],
|
||||
comments: [{
|
||||
token: "punctuation.definition.comment.blade",
|
||||
regex: "(\\/\\/(.)*)|(\\#(.)*)",
|
||||
next: "pop"
|
||||
}, {
|
||||
token: "punctuation.definition.comment.begin.php",
|
||||
regex: "(?:\\/\\*)",
|
||||
push: [{
|
||||
token: "punctuation.definition.comment.end.php",
|
||||
regex: "(?:\\*\\/)",
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "comment.block.blade"
|
||||
}]
|
||||
}, {
|
||||
token: "punctuation.definition.comment.begin.blade",
|
||||
regex: "(?:\\{\\{\\-\\-)",
|
||||
push: [{
|
||||
token: "punctuation.definition.comment.end.blade",
|
||||
regex: "(?:\\-\\-\\}\\})",
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "comment.block.blade"
|
||||
}]
|
||||
}],
|
||||
parenthesis: [{
|
||||
token: "parenthesis.begin.blade",
|
||||
regex: "\\(",
|
||||
push: [{
|
||||
token: "parenthesis.end.blade",
|
||||
regex: "\\)",
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "strings"
|
||||
}, {
|
||||
include: "variables"
|
||||
}, {
|
||||
include: "lang"
|
||||
}, {
|
||||
include: "parenthesis"
|
||||
}, {
|
||||
defaultToken: "source.blade"
|
||||
}]
|
||||
}],
|
||||
directives: [{
|
||||
token: ["directive.declaration.blade", "keyword.directives.blade"],
|
||||
regex: "(@)(endunless|endisset|endempty|endauth|endguest|endcomponent|endslot|endalert|endverbatim|endsection|show|php|endphp|endpush|endprepend|endenv|endforelse|isset|empty|component|slot|alert|json|verbatim|section|auth|guest|hasSection|forelse|includeIf|includeWhen|includeFirst|each|push|stack|prepend|inject|env|elseenv|unless|yield|extends|parent|include|acfrepeater|block|can|cannot|choice|debug|elsecan|elsecannot|embed|hipchat|lang|layout|macro|macrodef|minify|partial|render|servers|set|slack|story|task|unset|wpposts|acfend|after|append|breakpoint|endafter|endcan|endcannot|endembed|endmacro|endmarkdown|endminify|endpartial|endsetup|endstory|endtask|endunless|markdown|overwrite|setup|stop|wpempty|wpend|wpquery)"
|
||||
|
||||
}, {
|
||||
token: ["directive.declaration.blade", "keyword.control.blade"],
|
||||
regex: "(@)(if|else|elseif|endif|foreach|endforeach|switch|case|break|default|endswitch|for|endfor|while|endwhile|continue)"
|
||||
}, {
|
||||
token: ["directive.ignore.blade", "injections.begin.blade"],
|
||||
regex: "(@?)(\\{\\{)",
|
||||
push: [{
|
||||
token: "injections.end.blade",
|
||||
regex: "\\}\\}",
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "strings"
|
||||
}, {
|
||||
include: "variables"
|
||||
}, {
|
||||
defaultToken: "source.blade"
|
||||
}]
|
||||
}, {
|
||||
token: "injections.unescaped.begin.blade",
|
||||
regex: "\\{\\!\\!",
|
||||
push: [{
|
||||
token: "injections.unescaped.end.blade",
|
||||
regex: "\\!\\!\\}",
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "strings"
|
||||
}, {
|
||||
include: "variables"
|
||||
}, {
|
||||
defaultToken: "source.blade"
|
||||
}]
|
||||
}
|
||||
|
||||
],
|
||||
|
||||
lang: [{
|
||||
token: "keyword.operator.blade",
|
||||
regex: "(?:!=|!|<=|>=|<|>|===|==|=|\\+\\+|\\;|\\,|%|&&|\\|\\|)|\\b(?:and|or|eq|neq|ne|gte|gt|ge|lte|lt|le|not|mod|as)\\b"
|
||||
}, {
|
||||
token: "constant.language.blade",
|
||||
regex: "\\b(?:TRUE|FALSE|true|false)\\b"
|
||||
}],
|
||||
strings: [{
|
||||
token: "punctuation.definition.string.begin.blade",
|
||||
regex: "\"",
|
||||
push: [{
|
||||
token: "punctuation.definition.string.end.blade",
|
||||
regex: "\"",
|
||||
next: "pop"
|
||||
}, {
|
||||
token: "string.character.escape.blade",
|
||||
regex: "\\\\."
|
||||
}, {
|
||||
defaultToken: "string.quoted.single.blade"
|
||||
}]
|
||||
}, {
|
||||
token: "punctuation.definition.string.begin.blade",
|
||||
regex: "'",
|
||||
push: [{
|
||||
token: "punctuation.definition.string.end.blade",
|
||||
regex: "'",
|
||||
next: "pop"
|
||||
}, {
|
||||
token: "string.character.escape.blade",
|
||||
regex: "\\\\."
|
||||
}, {
|
||||
defaultToken: "string.quoted.double.blade"
|
||||
}]
|
||||
}],
|
||||
variables: [{
|
||||
token: "variable.blade",
|
||||
regex: "\\$([a-zA-Z_][a-zA-Z0-9_]*)\\b"
|
||||
}, {
|
||||
token: ["keyword.operator.blade", "constant.other.property.blade"],
|
||||
regex: "(->)([a-zA-Z_][a-zA-Z0-9_]*)\\b"
|
||||
}, {
|
||||
token: ["keyword.operator.blade",
|
||||
"meta.function-call.object.blade",
|
||||
"punctuation.definition.variable.blade",
|
||||
"variable.blade",
|
||||
"punctuation.definition.variable.blade"
|
||||
],
|
||||
regex: "(->)([a-zA-Z_][a-zA-Z0-9_]*)(\\()(.*?)(\\))"
|
||||
}]
|
||||
};
|
||||
|
||||
var bladeStart = bladeRules.start;
|
||||
|
||||
for (var rule in this.$rules) {
|
||||
this.$rules[rule].unshift.apply(this.$rules[rule], bladeStart);
|
||||
}
|
||||
|
||||
Object.keys(bladeRules).forEach(function(x) {
|
||||
if (!this.$rules[x])
|
||||
this.$rules[x] = bladeRules[x];
|
||||
}, this);
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
|
||||
oop.inherits(PHPLaravelBladeHighlightRules, PhpHighlightRules);
|
||||
|
||||
exports.PHPLaravelBladeHighlightRules = PHPLaravelBladeHighlightRules;
|
||||
});
|
|
@ -0,0 +1,61 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var SlimHighlightRules = require("./slim_highlight_rules").SlimHighlightRules;
|
||||
|
||||
var Mode = function() {
|
||||
TextMode.call(this);
|
||||
this.HighlightRules = SlimHighlightRules;
|
||||
this.createModeDelegates({
|
||||
javascript: require("./javascript").Mode,
|
||||
markdown: require("./markdown").Mode,
|
||||
coffee: require("./coffee").Mode,
|
||||
scss: require("./scss").Mode,
|
||||
sass: require("./sass").Mode,
|
||||
less: require("./less").Mode,
|
||||
ruby: require("./ruby").Mode,
|
||||
css: require("./css").Mode
|
||||
});
|
||||
};
|
||||
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.$id = "ace/mode/slim";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
|
@ -0,0 +1,235 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var modes = require("../config").$modes;
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
var SlimHighlightRules = function() {
|
||||
|
||||
this.$rules = {
|
||||
"start": [
|
||||
{
|
||||
token: "keyword",
|
||||
regex: /^(\s*)(\w+):\s*/,
|
||||
onMatch: function(value, state, stack, line) {
|
||||
var indent = /^\s*/.exec(line)[0];
|
||||
var m = value.match(/^(\s*)(\w+):/);
|
||||
var language = m[2];
|
||||
if (!/^(javascript|ruby|coffee|markdown|css|scss|sass|less)$/.test(language))
|
||||
language = "";
|
||||
stack.unshift("language-embed", [], [indent, language], state);
|
||||
return this.token;
|
||||
},
|
||||
stateName: "language-embed",
|
||||
next: [{
|
||||
token: "string",
|
||||
regex: /^(\s*)/,
|
||||
onMatch: function(value, state, stack, line) {
|
||||
var indent = stack[2][0];
|
||||
if (indent.length >= value.length) {
|
||||
stack.splice(0, 3);
|
||||
this.next = stack.shift();
|
||||
return this.token;
|
||||
}
|
||||
this.next = "";
|
||||
return [{type: "text", value: indent}];
|
||||
},
|
||||
next: ""
|
||||
}, {
|
||||
token: "string",
|
||||
regex: /.+/,
|
||||
onMatch: function(value, state, stack, line) {
|
||||
var indent = stack[2][0];
|
||||
var language = stack[2][1];
|
||||
var embedState = stack[1];
|
||||
|
||||
if (modes[language]) {
|
||||
var data = modes[language].getTokenizer().getLineTokens(line.slice(indent.length), embedState.slice(0));
|
||||
stack[1] = data.state;
|
||||
return data.tokens;
|
||||
}
|
||||
return this.token;
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
token: 'constant.begin.javascript.filter.slim',
|
||||
regex: '^(\\s*)():$'
|
||||
}, {
|
||||
token: 'constant.begin..filter.slim',
|
||||
regex: '^(\\s*)(ruby):$'
|
||||
}, {
|
||||
token: 'constant.begin.coffeescript.filter.slim',
|
||||
regex: '^(\\s*)():$'
|
||||
}, {
|
||||
token: 'constant.begin..filter.slim',
|
||||
regex: '^(\\s*)(markdown):$'
|
||||
}, {
|
||||
token: 'constant.begin.css.filter.slim',
|
||||
regex: '^(\\s*)():$'
|
||||
}, {
|
||||
token: 'constant.begin.scss.filter.slim',
|
||||
regex: '^(\\s*)():$'
|
||||
}, {
|
||||
token: 'constant.begin..filter.slim',
|
||||
regex: '^(\\s*)(sass):$'
|
||||
}, {
|
||||
token: 'constant.begin..filter.slim',
|
||||
regex: '^(\\s*)(less):$'
|
||||
}, {
|
||||
token: 'constant.begin..filter.slim',
|
||||
regex: '^(\\s*)(erb):$'
|
||||
}, {
|
||||
token: 'keyword.html.tags.slim',
|
||||
regex: '^(\\s*)((:?\\*(\\w)+)|doctype html|abbr|acronym|address|applet|area|article|aside|audio|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dialog|dfn|dir|div|dl|dt|embed|fieldset|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|link|li|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|source|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video|xmp|b|u|s|em|a)(?:([.#](\\w|\\.)+)+\\s?)?\\b'
|
||||
|
||||
}, {
|
||||
token: 'keyword.slim',
|
||||
regex: '^(\\s*)(?:([.#](\\w|\\.)+)+\\s?)'
|
||||
}, {
|
||||
token: "string",
|
||||
regex: /^(\s*)('|\||\/|(\/!))\s*/,
|
||||
onMatch: function(val, state, stack, line) {
|
||||
var indent = /^\s*/.exec(line)[0];
|
||||
if (stack.length < 1) {
|
||||
stack.push(this.next);
|
||||
}
|
||||
else {
|
||||
stack[0] = "mlString";
|
||||
}
|
||||
|
||||
if (stack.length < 2) {
|
||||
stack.push(indent.length);
|
||||
}
|
||||
else {
|
||||
stack[1] = indent.length;
|
||||
}
|
||||
return this.token;
|
||||
},
|
||||
next: "mlString"
|
||||
}, {
|
||||
token: 'keyword.control.slim',
|
||||
regex: '^(\\s*)(\\-|==|=)',
|
||||
push: [{
|
||||
token: 'control.end.slim',
|
||||
regex: '$',
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "rubyline"
|
||||
}, {
|
||||
include: "misc"
|
||||
}]
|
||||
|
||||
}, {
|
||||
token: 'paren',
|
||||
regex: '\\(',
|
||||
push: [{
|
||||
token: 'paren',
|
||||
regex: '\\)',
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "misc"
|
||||
}]
|
||||
|
||||
}, {
|
||||
token: 'paren',
|
||||
regex: '\\[',
|
||||
push: [{
|
||||
token: 'paren',
|
||||
regex: '\\]',
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "misc"
|
||||
}]
|
||||
}, {
|
||||
include: "misc"
|
||||
}
|
||||
],
|
||||
"mlString": [{
|
||||
token: "indent",
|
||||
regex: /^\s*/,
|
||||
onMatch: function(val, state, stack) {
|
||||
var curIndent = stack[1];
|
||||
|
||||
if (curIndent >= val.length) {
|
||||
this.next = "start";
|
||||
stack.splice(0);
|
||||
}
|
||||
else {
|
||||
this.next = "mlString";
|
||||
}
|
||||
return this.token;
|
||||
},
|
||||
next: "start"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}],
|
||||
"rubyline": [{
|
||||
token: "keyword.operator.ruby.embedded.slim",
|
||||
regex: "(==|=)(<>|><|<'|'<|<|>)?|-"
|
||||
}, {
|
||||
token: "list.ruby.operators.slim",
|
||||
regex: "(\\b)(for|in|do|if|else|elsif|unless|while|yield|not|and|or)\\b"
|
||||
}, {
|
||||
token: "string",
|
||||
regex: "['](.)*?[']"
|
||||
}, {
|
||||
token: "string",
|
||||
regex: "[\"](.)*?[\"]"
|
||||
}],
|
||||
"misc": [{
|
||||
token: 'class.variable.slim',
|
||||
regex: '\\@([a-zA-Z_][a-zA-Z0-9_]*)\\b'
|
||||
}, {
|
||||
token: "list.meta.slim",
|
||||
regex: "(\\b)(true|false|nil)(\\b)"
|
||||
}, {
|
||||
token: 'keyword.operator.equals.slim',
|
||||
regex: '='
|
||||
}, {
|
||||
token: "string",
|
||||
regex: "['](.)*?[']"
|
||||
}, {
|
||||
token: "string",
|
||||
regex: "[\"](.)*?[\"]"
|
||||
}]
|
||||
};
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
|
||||
oop.inherits(SlimHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.SlimHighlightRules = SlimHighlightRules;
|
||||
});
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
var config = require("../config");
|
||||
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
@ -268,8 +269,15 @@ var Mode = function() {
|
|||
this.$modes = {};
|
||||
for (var i in mapping) {
|
||||
if (mapping[i]) {
|
||||
var Mode = mapping[i];
|
||||
var id = Mode.prototype.$id;
|
||||
var mode = config.$modes[id];
|
||||
if (!mode)
|
||||
config.$modes[id] = mode = new Mode();
|
||||
if (!config.$modes[i])
|
||||
config.$modes[i] = mode;
|
||||
this.$embeds.push(i);
|
||||
this.$modes[i] = new mapping[i]();
|
||||
this.$modes[i] = mode;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -289,8 +297,16 @@ var Mode = function() {
|
|||
|
||||
this.$delegator = function(method, args, defaultHandler) {
|
||||
var state = args[0];
|
||||
if (typeof state != "string")
|
||||
if (typeof state != "string") {
|
||||
if (Array.isArray(state[2])) {
|
||||
var language = state[2][state[2].length - 1];
|
||||
var mode = this.$modes[language];
|
||||
if (mode)
|
||||
return mode[method].apply(mode, [state[1]].concat([].slice.call(args, 1)));
|
||||
}
|
||||
state = state[0];
|
||||
}
|
||||
|
||||
for (var i = 0; i < this.$embeds.length; i++) {
|
||||
if (!this.$modes[this.$embeds[i]]) continue;
|
||||
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
snippet <?
|
||||
<?php
|
||||
|
||||
${1}
|
||||
snippet ec
|
||||
echo ${1};
|
||||
snippet <?e
|
||||
<?php echo ${1} ?>
|
||||
# this one is for php5.4
|
||||
snippet <?=
|
||||
<?=${1}?>
|
||||
snippet ns
|
||||
namespace ${1:Foo\Bar\Baz};
|
||||
${2}
|
||||
|
@ -39,7 +30,7 @@ snippet m
|
|||
${7}
|
||||
}
|
||||
# setter method
|
||||
snippet sm
|
||||
snippet sm
|
||||
/**
|
||||
* Sets the value of ${1:foo}
|
||||
*
|
||||
|
@ -92,7 +83,7 @@ snippet S
|
|||
$_SERVER['${1:variable}']${2}
|
||||
snippet SS
|
||||
$_SESSION['${1:variable}']${2}
|
||||
|
||||
|
||||
# the following are old ones
|
||||
snippet inc
|
||||
include '${1:file}';${2}
|
||||
|
@ -193,7 +184,7 @@ snippet doc_h
|
|||
* @copyright ${4:$2}, `strftime('%d %B, %Y')`
|
||||
* @package ${5:default}
|
||||
*/
|
||||
|
||||
|
||||
# Interface
|
||||
snippet interface
|
||||
/**
|
||||
|
@ -241,10 +232,6 @@ snippet if
|
|||
if (${1:/* condition */}) {
|
||||
${2:// code...}
|
||||
}
|
||||
snippet ifil
|
||||
<?php if (${1:/* condition */}): ?>
|
||||
${2:<!-- code... -->}
|
||||
<?php endif; ?>
|
||||
snippet ife
|
||||
if (${1:/* condition */}) {
|
||||
${2:// code...}
|
||||
|
@ -252,13 +239,6 @@ snippet ife
|
|||
${3:// code...}
|
||||
}
|
||||
${4}
|
||||
snippet ifeil
|
||||
<?php if (${1:/* condition */}): ?>
|
||||
${2:<!-- html... -->}
|
||||
<?php else: ?>
|
||||
${3:<!-- html... -->}
|
||||
<?php endif; ?>
|
||||
${4}
|
||||
snippet else
|
||||
else {
|
||||
${1:// code...}
|
||||
|
@ -289,18 +269,10 @@ snippet foreach
|
|||
foreach ($${1:variable} as $${2:value}) {
|
||||
${3:// code...}
|
||||
}
|
||||
snippet foreachil
|
||||
<?php foreach ($${1:variable} as $${2:value}): ?>
|
||||
${3:<!-- html... -->}
|
||||
<?php endforeach; ?>
|
||||
snippet foreachk
|
||||
foreach ($${1:variable} as $${2:key} => $${3:value}) {
|
||||
${4:// code...}
|
||||
}
|
||||
snippet foreachkil
|
||||
<?php foreach ($${1:variable} as $${2:key} => $${3:value}): ?>
|
||||
${4:<!-- html... -->}
|
||||
<?php endforeach; ?>
|
||||
# $... = array (...)
|
||||
snippet array
|
||||
$${1:arrayName} = array('${2}' => ${3});${4}
|
||||
|
@ -325,8 +297,8 @@ snippet vd
|
|||
snippet vdd
|
||||
var_dump(${1}); die(${2:});
|
||||
snippet http_redirect
|
||||
header ("HTTP/1.1 301 Moved Permanently");
|
||||
header ("Location: ".URL);
|
||||
header ("HTTP/1.1 301 Moved Permanently");
|
||||
header ("Location: ".URL);
|
||||
exit();
|
||||
# Getters & Setters
|
||||
snippet gs
|
||||
|
@ -356,7 +328,7 @@ snippet gs
|
|||
snippet ags
|
||||
/**
|
||||
* ${1:description}
|
||||
*
|
||||
*
|
||||
* @${7}
|
||||
*/
|
||||
${2:protected} $${3:foo};
|
||||
|
@ -375,3 +347,37 @@ snippet rett
|
|||
return true;
|
||||
snippet retf
|
||||
return false;
|
||||
scope html
|
||||
snippet <?
|
||||
<?php
|
||||
|
||||
${1}
|
||||
snippet <?e
|
||||
<?php echo ${1} ?>
|
||||
# this one is for php5.4
|
||||
snippet <?=
|
||||
<?=${1}?>
|
||||
snippet ifil
|
||||
<?php if (${1:/* condition */}): ?>
|
||||
${2:<!-- code... -->}
|
||||
<?php endif; ?>
|
||||
snippet ifeil
|
||||
<?php if (${1:/* condition */}): ?>
|
||||
${2:<!-- html... -->}
|
||||
<?php else: ?>
|
||||
${3:<!-- html... -->}
|
||||
<?php endif; ?>
|
||||
${4}
|
||||
snippet foreachil
|
||||
<?php foreach ($${1:variable} as $${2:value}): ?>
|
||||
${3:<!-- html... -->}
|
||||
<?php endforeach; ?>
|
||||
snippet foreachkil
|
||||
<?php foreach ($${1:variable} as $${2:key} => $${3:value}): ?>
|
||||
${4:<!-- html... -->}
|
||||
<?php endforeach; ?>
|
||||
scope html-tag
|
||||
snippet ifil\n\
|
||||
<?php if (${1:true}): ?>${2:code}<?php endif; ?>
|
||||
snippet ifeil\n\
|
||||
<?php if (${1:true}): ?>${2:code}<?php else: ?>${3:code}<?php endif; ?>${4}
|
||||
|
|
|
@ -176,7 +176,7 @@ var Tokenizer = function(rules) {
|
|||
|
||||
this.removeCapturingGroups = function(src) {
|
||||
var r = src.replace(
|
||||
/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,
|
||||
/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!]|(\()/g,
|
||||
function(x, y) {return y ? "(?:" : x;}
|
||||
);
|
||||
return r;
|
||||
|
|
|
@ -418,6 +418,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
dom.setStyle(this.scrollBarH.element.style, "left", gutterWidth + "px");
|
||||
dom.setStyle(this.scroller.style, "left", gutterWidth + this.margin.left + "px");
|
||||
size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth() - this.margin.h);
|
||||
dom.setStyle(this.$gutter.style, "left", this.margin.left + "px");
|
||||
|
||||
var right = this.scrollBarV.getWidth() + "px";
|
||||
dom.setStyle(this.scrollBarH.element.style, "right", right);
|
||||
|
@ -848,7 +849,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
if (changes & this.CHANGE_H_SCROLL)
|
||||
this.$updateScrollBarH();
|
||||
|
||||
dom.translate(this.$gutter, this.margin.left, -config.offset);
|
||||
// dom.translate(this.$gutter, this.margin.left, -config.offset);
|
||||
dom.translate(this.content, -this.scrollLeft, -config.offset);
|
||||
|
||||
var width = config.width + 2 * this.$padding + "px";
|
||||
|
|
|
@ -2,22 +2,42 @@
|
|||
|
||||
var http = require("http")
|
||||
, path = require("path")
|
||||
, mime = require("mime")
|
||||
, url = require("url")
|
||||
, fs = require("fs")
|
||||
, port = process.env.PORT || 8888
|
||||
, ip = process.env.IP || "0.0.0.0";
|
||||
|
||||
function lookupMime(filename) {
|
||||
var ext = /[^\/\\.]*$/.exec(filename)[0];
|
||||
return {
|
||||
js: "application/javascript",
|
||||
ico: "image/x-icon",
|
||||
css: "text/css",
|
||||
svg: "image/svg+xml",
|
||||
png: "image/png",
|
||||
jpg: "image/jpg",
|
||||
html: "text/html",
|
||||
jpeg: "image/jpeg"
|
||||
}[ext];
|
||||
}
|
||||
|
||||
// compatibility with node 0.6
|
||||
if (!fs.exists)
|
||||
fs.exists = path.exists;
|
||||
|
||||
var allowSave = process.argv.indexOf("--allow-save") != -1;
|
||||
if (allowSave)
|
||||
console.warn("writing files from browser is enabled");
|
||||
|
||||
http.createServer(function(req, res) {
|
||||
var uri = unescape(url.parse(req.url).pathname)
|
||||
, filename = path.join(process.cwd(), uri);
|
||||
var uri = unescape(url.parse(req.url).pathname);
|
||||
var filename = path.join(process.cwd(), uri);
|
||||
|
||||
if (req.method == "OPTIONS") {
|
||||
writeHead(res, 200);
|
||||
return res.end();
|
||||
}
|
||||
|
||||
if (req.method == "PUT") {
|
||||
if (!allowSave)
|
||||
return error(res, 404, "Saving not allowed pass --allow-save to enable");
|
||||
|
@ -28,46 +48,71 @@ http.createServer(function(req, res) {
|
|||
if (!exists)
|
||||
return error(res, 404, "404 Not Found\n" + filename);
|
||||
|
||||
if (fs.statSync(filename).isDirectory()) {
|
||||
var files = fs.readdirSync(filename);
|
||||
res.writeHead(200, {"Content-Type": "text/html"});
|
||||
|
||||
files.push(".", "..");
|
||||
var html = files.map(function(name) {
|
||||
var href = uri + "/" + name;
|
||||
href = href.replace(/[\/\\]+/g, "/").replace(/\/$/g, "");
|
||||
try {
|
||||
var stat = fs.statSync(filename + "/" + name);
|
||||
if (stat.isDirectory())
|
||||
href += "/";
|
||||
return "<a href='" + href + "'>" + name + "</a><br>";
|
||||
} catch(e) {}
|
||||
}).filter(Boolean);
|
||||
|
||||
res._hasBody && res.write(html.join(""));
|
||||
res.end();
|
||||
return;
|
||||
}
|
||||
if (fs.statSync(filename).isDirectory())
|
||||
return serveDirectory(filename, uri, req, res);
|
||||
|
||||
fs.readFile(filename, "binary", function(err, file) {
|
||||
if (err) {
|
||||
res.writeHead(500, { "Content-Type": "text/plain" });
|
||||
writeHead(res, 500, "text/plain");
|
||||
res.write(err + "\n");
|
||||
res.end();
|
||||
return;
|
||||
}
|
||||
|
||||
var contentType = mime.lookup(filename) || "text/plain";
|
||||
res.writeHead(200, { "Content-Type": contentType });
|
||||
var contentType = lookupMime(filename);
|
||||
writeHead(res, 200, contentType);
|
||||
res.write(file, "binary");
|
||||
res.end();
|
||||
});
|
||||
});
|
||||
}).listen(port, ip);
|
||||
|
||||
function writeHead(res, code, contentType) {
|
||||
var headers = {
|
||||
"Access-Control-Allow-Origin": "file://",
|
||||
"Access-Control-Allow-Methods": "PUT, GET, OPTIONS, HEAD"
|
||||
};
|
||||
headers["Content-Type"] = contentType || "text/plain";
|
||||
res.writeHead(code, headers);
|
||||
}
|
||||
|
||||
function serveDirectory(filename, uri, req, res) {
|
||||
var files = fs.readdirSync(filename);
|
||||
writeHead(res, 200, "text/html");
|
||||
|
||||
files.push("..", ".");
|
||||
var html = files.map(function(name) {
|
||||
try {
|
||||
var stat = fs.statSync(filename + "/" + name);
|
||||
} catch(e) {}
|
||||
var index = name == "." ? 2 : name == ".." ? 3 : stat.isDirectory() ? 1 : 0;
|
||||
return { name: name, index: index, size: stat.size };
|
||||
}).filter(Boolean).sort(function(a, b) {
|
||||
if (a.index == b.index)
|
||||
return a.name.localeCompare(b.name);
|
||||
return b.index - a.index;
|
||||
}).map(function(stat) {
|
||||
var name = stat.name;
|
||||
if (stat.index) name += "/";
|
||||
var size = ""
|
||||
if (!stat.size) size = ""
|
||||
else if (stat.size < 1024) size = stat.size + "b";
|
||||
else if (stat.size < 1024 * 1024) size = (stat.size / 1024).toFixed(2) + "kb";
|
||||
else size = (stat.size / 1024 / 1024).toFixed(2) + "mb";
|
||||
return "<tr>"
|
||||
+ "<td> " + size + " </td>"
|
||||
+ "<td><a href='" + name + "'>" + name + "</a></td>"
|
||||
+ "</tr>";
|
||||
}).join("");
|
||||
html = "<table>" + html + "</table>"
|
||||
|
||||
res._hasBody && res.write(html);
|
||||
res.end();
|
||||
}
|
||||
|
||||
function error(res, status, message, error) {
|
||||
console.error(error || message);
|
||||
res.writeHead(status, { "Content-Type": "text/plain" });
|
||||
writeHead(res, status, "text/plain");
|
||||
res.write(message);
|
||||
res.end();
|
||||
}
|
||||
|
@ -87,7 +132,7 @@ function save(req, res, filePath) {
|
|||
catch (e) {
|
||||
return error(res, 404, "Could't save file", e);
|
||||
}
|
||||
res.statusCode = 200;
|
||||
writeHead(res, 200);
|
||||
res.end("OK");
|
||||
console.log("saved ", filePath);
|
||||
});
|
||||
|
|
|
@ -491,7 +491,7 @@ function transformRegExp(str, rule) {
|
|||
|
||||
str = str.replace(/(\\[xu]){([a-fA-F\d]+)}/g, '$1$2');
|
||||
|
||||
str = convertCharacterTypes(str, rule);
|
||||
str = convertCharacterTypes(str);
|
||||
|
||||
checkForNamedCaptures(str);
|
||||
|
||||
|
|
2
version
2
version
|
@ -1 +1 @@
|
|||
1524193061
|
||||
1524452254
|
||||
|
|
Ładowanie…
Reference in New Issue