diff --git a/ChangeLog.txt b/ChangeLog.txt
index 4b48f911..2b1f88bb 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,15 @@
+2014.03.08 Version 1.1.3
+
+* New Features
+ - Allow syntax checkers to be loaded from CDN (Derk-Jan Hartman)
+ - Add ColdFusion behavior (Abram Adams)
+ - add showLineNumbers option
+ - Add html syntax checker (danyaPostfactum)
+
+* new language modes
+ - Gherkin (Patrick Nevels)
+ - Smarty
+
2013.12.02 Version 1.1.2
* New Features
@@ -11,7 +23,6 @@
- add support for autocompletion and snippets (gjtorikyan danyaPostfactum and others)
- add option to merge similar changes in undo history
- add scrollPastEnd option
- - 6a87d97 Merge pull request #1494 from danyaPostfactum/snippetcompleter
- use html5 dragndrop for text dragging (danyaPostfactum)
* API Changes
diff --git a/Makefile.dryice.js b/Makefile.dryice.js
index 49bf0b28..f8e1383c 100755
--- a/Makefile.dryice.js
+++ b/Makefile.dryice.js
@@ -293,27 +293,30 @@ function getWriteFilters(options, projectType, main) {
if (options.noconflict)
filters.push(namespace(options.ns));
-
+
+ if (options.exportModule && projectType == "main" || projectType == "ext") {
+ filters.push(exportAce(options.ns, options.exportModule,
+ options.noconflict ? options.ns : "", projectType == "ext" && main));
+ }
+
if (options.compress)
filters.push(copy.filter.uglifyjs);
- // copy.filter.uglifyjs.options.ascii = true; doesn't work with some uglify.js versions
+ // copy.filter.uglifyjs.options.ascii_only = true; doesn't work with some uglify.js versions
filters.push(function(text) {
- var t1 = text.replace(/[\x80-\uffff]/g, function(c) {
+ var text = text.replace(/[\x00-\x08\x0b\x0c\x0e\x19\x80-\uffff]/g, function(c) {
c = c.charCodeAt(0).toString(16);
+ if (c.length == 1)
+ return "\\x0" + c;
if (c.length == 2)
return "\\x" + c;
if (c.length == 3)
- c = "0" + c;
+ return "\\u0" + c;
return "\\u" + c;
});
return text;
});
- if (options.exportModule && projectType == "main" || projectType == "ext") {
- filters.push(exportAce(options.ns, options.exportModule,
- options.noconflict ? options.ns : "", projectType == "ext" && main));
- }
return filters;
}
@@ -550,15 +553,6 @@ var detectTextModules = function(input, source) {
detectTextModules.onRead = true;
copy.filter.addDefines = detectTextModules;
-function generateThemesModule(themes) {
- var themelist = [
- 'define(function(require, exports, module) {',
- '\n\nmodule.exports.themes = ' + JSON.stringify(themes, null, ' '),
- ';\n\n});'
- ].join('');
- fs.writeFileSync(__dirname + '/lib/ace/ext/themelist_utils/themes.js', themelist, 'utf8');
-}
-
function inlineTextModules(text) {
var deps = [];
return text.replace(/, *['"]ace\/requirejs\/text!(.*?)['"]| require\(['"](?:ace|[.\/]+)\/requirejs\/text!(.*?)['"]\)/g, function(_, dep, call) {
@@ -574,14 +568,38 @@ function inlineTextModules(text) {
});
call = textModules[dep];
- // if (deps.length > 1)
- // console.log(call.length)
if (call)
return " " + call;
}
});
}
+var CommonJsProject = copy.createCommonJsProject({roots:[]}).constructor;
+CommonJsProject.prototype.getCurrentModules = function() {
+ function isDep(child, parent) {
+ if (!modules[parent])
+ return false;
+ var deps = modules[parent].deps;
+ if (deps[child]) return true;
+ return Object.keys(deps).some(function(x) {
+ return isDep(child, x)
+ });
+ }
+ var depMap = {}, modules = this.currentModules;
+ return Object.keys(this.currentModules).map(function(moduleName) {
+ module = modules[moduleName];
+ module.id = moduleName;
+ module.isSpecial = !/define\(\'[^']*',/.test(module.source);
+ return module;
+ }).sort(function(a, b) {
+ if (a.isSpecial) return -1;
+ if (b.isSpecial) return 1;
+ if (isDep(a.id, b.id)) return -1;
+ if (isDep(b.id, a.id)) return 1;
+ return Object.keys(a.deps).length - Object.keys(b.deps).length || a.id.localeCompare(b.id)
+ });
+};
+
// TODO: replace with project.clone once it is fixed in dryice
function cloneProject(project) {
var clone = copy.createCommonJsProject({
@@ -602,16 +620,12 @@ function cloneProject(project) {
}
function copyFileSync(srcFile, destFile) {
- var BUF_LENGTH = 64*1024,
- buf = new Buffer(BUF_LENGTH),
- bytesRead = BUF_LENGTH,
- pos = 0,
- fdr = null,
- fdw = null;
-
-
- fdr = fs.openSync(srcFile, 'r');
- fdw = fs.openSync(destFile, 'w');
+ var BUF_LENGTH = 64*1024;
+ var buf = new Buffer(BUF_LENGTH);
+ var bytesRead = BUF_LENGTH;
+ var pos = 0;
+ var fdr = fs.openSync(srcFile, 'r');
+ var fdw = fs.openSync(destFile, 'w');
while (bytesRead === BUF_LENGTH) {
bytesRead = fs.readSync(fdr, buf, 0, BUF_LENGTH, pos);
@@ -652,13 +666,12 @@ function exportAce(ns, module, requireBase, extModule) {
requireBase = requireBase || "window";
module = module || "ace/ace";
return function(text) {
-
var template = function() {
(function() {
REQUIRE_NS.require(["MODULE"], function(a) {
- a && a.config.init();
+ a && a.config.init(true);
if (!window.NS)
- window.NS = {};
+ window.NS = a;
for (var key in a) if (a.hasOwnProperty(key))
NS[key] = a[key];
});
@@ -674,6 +687,8 @@ function exportAce(ns, module, requireBase, extModule) {
};
}
+ text = text.replace(/function init\(packaged\) {/, "init(true);$&\n");
+
return (text + ";" + template
.toString()
.replace(/MODULE/g, module)
@@ -696,6 +711,15 @@ function updateModes() {
})
}
+function generateThemesModule(themes) {
+ var themelist = [
+ 'define(function(require, exports, module) {',
+ '\n\nmodule.exports.themes = ' + JSON.stringify(themes, null, ' '),
+ ';\n\n});'
+ ].join('');
+ fs.writeFileSync(__dirname + '/lib/ace/ext/themelist_utils/themes.js', themelist, 'utf8');
+}
+
if (!module.parent)
main(process.argv);
else
diff --git a/Readme.md b/Readme.md
index ec41ccdc..d621b2a6 100644
--- a/Readme.md
+++ b/Readme.md
@@ -8,7 +8,7 @@ Ace is a standalone code editor written in JavaScript. Our goal is to create a b
Features
--------
-* Syntax highlighting for over 40 languages (TextMate/Sublime/_.tmlanguage_ files can be imported)
+* Syntax highlighting for over 110 languages (TextMate/Sublime/_.tmlanguage_ files can be imported)
* Over 20 themes (TextMate/Sublime/_.tmtheme_ files can be imported)
* Automatic indent and outdent
* An optional command line
diff --git a/demo/kitchen-sink/demo.js b/demo/kitchen-sink/demo.js
index 9880d33e..cf680b53 100644
--- a/demo/kitchen-sink/demo.js
+++ b/demo/kitchen-sink/demo.js
@@ -251,7 +251,7 @@ commands.addCommand({
}
});
-var keybindings = {
+var keybindings = {
ace: null, // Null = use "default" keymapping
vim: require("ace/keyboard/vim").handler,
emacs: "ace/keyboard/emacs",
@@ -317,7 +317,7 @@ doclist.history.index = 0;
doclist.cycleOpen = function(editor, dir) {
var h = this.history;
h.index += dir;
- if (h.index >= h.length)
+ if (h.index >= h.length)
h.index = 0;
else if (h.index <= 0)
h.index = h.length - 1;
@@ -499,7 +499,7 @@ bindDropdown("split", function(value) {
sp.setSplits(1);
} else {
var newEditor = (sp.getSplits() == 1);
- sp.setOrientation(value == "below" ? sp.BELOW : sp.BESIDE);
+ sp.setOrientation(value == "below" ? sp.BELOW : sp.BESIDE);
sp.setSplits(2);
if (newEditor) {
@@ -592,7 +592,11 @@ env.editSnippets = function() {
require("ace/ext/language_tools");
env.editor.setOptions({
enableBasicAutocompletion: true,
+ enableLiveAutocomplete: true,
enableSnippets: true
});
+var beautify = require("ace/ext/beautify");
+env.editor.commands.addCommands(beautify.commands);
+
});
diff --git a/demo/kitchen-sink/docs/cirru.cirru b/demo/kitchen-sink/docs/cirru.cirru
index 98013998..244833df 100644
--- a/demo/kitchen-sink/docs/cirru.cirru
+++ b/demo/kitchen-sink/docs/cirru.cirru
@@ -33,4 +33,10 @@ brackets ((((()))))
print (add $ (int 1) (int 2))
print $ unwrap $
- map (a $ int 1) (b $ int 2)
\ No newline at end of file
+ map (a $ int 1) (b $ int 2)
+
+print a
+ int 1
+ , b c
+ int 2
+ , d
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/gherkin.feature b/demo/kitchen-sink/docs/gherkin.feature
new file mode 100644
index 00000000..52cd811e
--- /dev/null
+++ b/demo/kitchen-sink/docs/gherkin.feature
@@ -0,0 +1,28 @@
+@these @are @tags
+Feature: Serve coffee
+ Coffee should not be served until paid for
+ Coffee should not be served until the button has been pressed
+ If there is no coffee left then money should be refunded
+
+ Scenario Outline: Eating
+ Given there are cucumbers
+ When I eat cucumbers
+ Then I should have cucumbers
+
+ Examples:
+ | start | eat | left |
+ | 12 | 5 | 7 |
+ | 20 | 5 | 15 |
+
+ Scenario: Buy last coffee
+ Given there are 1 coffees left in the machine
+ And I have deposited 1$
+ When I press the coffee button
+ Then I should be served a "coffee"
+
+ # this a comment
+
+ """
+ this is a
+ pystring
+ """
\ No newline at end of file
diff --git a/demo/kitchen-sink/docs/lsl.lsl b/demo/kitchen-sink/docs/lsl.lsl
index 474e3023..baf06f08 100644
--- a/demo/kitchen-sink/docs/lsl.lsl
+++ b/demo/kitchen-sink/docs/lsl.lsl
@@ -8,7 +8,7 @@ integer someIntNormal = 3672;
integer someIntHex = 0x00000000;
integer someIntMath = PI_BY_TWO;
-integer event = 5673; // unimplemented reserved keyword!
+integer event = 5673; // invalid.illegal
key someKeyTexture = TEXTURE_DEFAULT;
string someStringSpecial = EOF;
@@ -53,12 +53,12 @@ default
someIntHex = 0x00000000;
someIntMath = PI_BY_TWO;
- event = 5673; // unimplemented reserved keyword!
+ event = 5673; // invalid.illegal
someKeyTexture = TEXTURE_DEFAULT;
someStringSpecial = EOF;
- llCloud(ZERO_VECTOR); // invalid deprecated function!
+ llSetInventoryPermMask("some item", MASK_NEXT, PERM_ALL); // reserved.godmode
llWhisper(PUBLIC_CHANNEL, "Leaving \"default\" now...");
state other;
diff --git a/index.html b/index.html
index f116eb72..8d65f8ea 100644
--- a/index.html
+++ b/index.html
@@ -87,7 +87,7 @@ console.log(addResult);
Features
- - Syntax highlighting for over 60 languages (TextMate/Sublime Text.tmlanguage files can be imported)
+ - Syntax highlighting for over 110 languages (TextMate/Sublime Text.tmlanguage files can be imported)
- Over 20 themes (TextMate/Sublime Text .tmtheme files can be imported)
- Automatic indent and outdent
- An optional command line
@@ -793,7 +793,7 @@ if (match) {
Plunker
-
-
+
Zed
-
diff --git a/lib/ace/autocomplete.js b/lib/ace/autocomplete.js
index b243727f..f3800c16 100644
--- a/lib/ace/autocomplete.js
+++ b/lib/ace/autocomplete.js
@@ -40,6 +40,7 @@ var snippetManager = require("./snippets").snippetManager;
var Autocomplete = function() {
this.autoInsert = true;
+ this.autoSelect = true;
this.keyboardHandler = new HashHandler();
this.keyboardHandler.bindKeys(this.commands);
@@ -47,13 +48,15 @@ var Autocomplete = function() {
this.changeListener = this.changeListener.bind(this);
this.mousedownListener = this.mousedownListener.bind(this);
this.mousewheelListener = this.mousewheelListener.bind(this);
-
+
this.changeTimer = lang.delayedCall(function() {
this.updateCompletions(true);
}.bind(this))
};
(function() {
+ this.gatherCompletionsId = 0;
+
this.$init = function() {
this.popup = new AcePopup(document.body || document.documentElement);
this.popup.on("click", function(e) {
@@ -69,15 +72,16 @@ var Autocomplete = function() {
this.popup.setData(this.completions.filtered);
var renderer = editor.renderer;
+ this.popup.setRow(this.autoSelect ? 0 : -1);
if (!keepPopupPosition) {
- this.popup.setRow(0);
+ this.popup.setTheme(editor.getTheme());
this.popup.setFontSize(editor.getFontSize());
var lineHeight = renderer.layerConfig.lineHeight;
-
- var pos = renderer.$cursorLayer.getPixelPosition(this.base, true);
+
+ var pos = renderer.$cursorLayer.getPixelPosition(this.base, true);
pos.left -= this.popup.getTextLeftOffset();
-
+
var rect = editor.container.getBoundingClientRect();
pos.top += rect.top - renderer.layerConfig.offset;
pos.left += rect.left - editor.renderer.scrollLeft;
@@ -94,7 +98,11 @@ var Autocomplete = function() {
this.editor.off("mousedown", this.mousedownListener);
this.editor.off("mousewheel", this.mousewheelListener);
this.changeTimer.cancel();
-
+
+ if (this.popup && this.popup.isOpen) {
+ this.gatherCompletionsId = this.gatherCompletionsId + 1;
+ }
+
if (this.popup)
this.popup.hide();
@@ -145,6 +153,7 @@ var Autocomplete = function() {
data = this.popup.getData(this.popup.getRow());
if (!data)
return false;
+
if (data.completer && data.completer.insertMatch) {
data.completer.insertMatch(this.editor);
} else {
@@ -171,7 +180,11 @@ var Autocomplete = function() {
"Esc": function(editor) { editor.completer.detach(); },
"Space": function(editor) { editor.completer.detach(); editor.insert(" ");},
- "Return": function(editor) { editor.completer.insertMatch(); },
+ "Return": function(editor) {
+ if (editor.completer.popup.getRow() == -1)
+ return false;
+ editor.completer.insertMatch();
+ },
"Shift-Return": function(editor) { editor.completer.insertMatch(true); },
"Tab": function(editor) { editor.completer.insertMatch(); },
@@ -182,33 +195,36 @@ var Autocomplete = function() {
this.gatherCompletions = function(editor, callback) {
var session = editor.getSession();
var pos = editor.getCursorPosition();
-
+
var line = session.getLine(pos.row);
var prefix = util.retrievePrecedingIdentifier(line, pos.column);
-
+
this.base = editor.getCursorPosition();
this.base.column -= prefix.length;
var matches = [];
- util.parForEach(editor.completers, function(completer, next) {
+ var total = editor.completers.length;
+ editor.completers.forEach(function(completer, i) {
completer.getCompletions(editor, session, pos, prefix, function(err, results) {
if (!err)
matches = matches.concat(results);
- next();
- });
- }, function() {
+ // Fetch prefix again, because they may have changed by now
+ var pos = editor.getCursorPosition();
+ var line = session.getLine(pos.row);
callback(null, {
- prefix: prefix,
- matches: matches
+ prefix: util.retrievePrecedingIdentifier(line, pos.column),
+ matches: matches,
+ finished: (--total === 0)
});
});
+ });
return true;
};
this.showPopup = function(editor) {
if (this.editor)
this.detach();
-
+
this.activated = true;
this.editor = editor;
@@ -223,10 +239,10 @@ var Autocomplete = function() {
editor.on("blur", this.blurListener);
editor.on("mousedown", this.mousedownListener);
editor.on("mousewheel", this.mousewheelListener);
-
+
this.updateCompletions();
};
-
+
this.updateCompletions = function(keepPopupPosition) {
if (keepPopupPosition && this.base && this.completions) {
var pos = this.editor.getCursorPosition();
@@ -236,25 +252,62 @@ var Autocomplete = function() {
this.completions.setFilter(prefix);
if (!this.completions.filtered.length)
return this.detach();
+ if (this.completions.filtered.length == 1
+ && this.completions.filtered[0].value == prefix
+ && !this.completions.filtered[0].snippet)
+ return this.detach();
this.openPopup(this.editor, prefix, keepPopupPosition);
return;
}
+
+ // Save current gatherCompletions session, session is close when a match is insert
+ var _id = this.gatherCompletionsId;
this.gatherCompletions(this.editor, function(err, results) {
+ // Only detach if result gathering is finished
+ var doDetach = function() {
+ if (!results.finished) return;
+ return this.detach();
+ }.bind(this);
+
+ // Calcul prefix
+ var session = this.editor.getSession();
+ var pos = this.editor.getCursorPosition();
+ var line = session.getLine(pos.row);
+ var prefix = util.retrievePrecedingIdentifier(line, pos.column);
+
+ // Results matches
var matches = results && results.matches;
if (!matches || !matches.length)
return this.detach();
- // TODO reenable this when we have proper change tracking
+ // TODO reenable this when we have proper change tracking
// if (matches.length == 1)
// return this.insertMatch(matches[0]);
+ // No prefix or no results -> close
+ if (!prefix || !prefix.length || !matches || !matches.length)
+ return doDetach();
+
+ // Wrong prefix or wrong session -> ignore
+ if (prefix.indexOf(results.prefix) != 0 || _id != this.gatherCompletionsId)
+ return;
+
this.completions = new FilteredList(matches);
- this.completions.setFilter(results.prefix);
+ this.completions.setFilter(prefix);
var filtered = this.completions.filtered;
+
+ // No results
if (!filtered.length)
- return this.detach();
+ return doDetach();
+
+ // One result equals to the prefix
+ if (filtered.length == 1 && filtered[0].value == prefix && !filtered[0].snippet)
+ return doDetach();
+
+ // Autoinsert if one result
if (this.autoInsert && filtered.length == 1)
return this.insertMatch(filtered[0]);
- this.openPopup(this.editor, results.prefix, keepPopupPosition);
+
+ this.openPopup(this.editor, prefix, keepPopupPosition);
}.bind(this));
};
@@ -299,16 +352,16 @@ var FilteredList = function(array, filterText, mutateData) {
matches = matches.sort(function(a, b) {
return b.exactMatch - a.exactMatch || b.score - a.score;
});
-
+
// make unique
var prev = null;
matches = matches.filter(function(item){
- var caption = item.value || item.caption || item.snippet;
+ var caption = item.value || item.caption || item.snippet;
if (caption === prev) return false;
prev = caption;
return true;
});
-
+
this.filtered = matches;
};
this.filterCompletions = function(items, needle) {
diff --git a/lib/ace/autocomplete/popup.js b/lib/ace/autocomplete/popup.js
index ca40cad1..a0ab7604 100644
--- a/lib/ace/autocomplete/popup.js
+++ b/lib/ace/autocomplete/popup.js
@@ -43,7 +43,7 @@ var $singleLineEditor = function(el) {
var renderer = new Renderer(el);
renderer.$maxLines = 4;
-
+
var editor = new Editor(renderer);
editor.setHighlightActiveLine(false);
@@ -59,13 +59,13 @@ var $singleLineEditor = function(el) {
var AcePopup = function(parentNode) {
var el = dom.createElement("div");
var popup = new $singleLineEditor(el);
-
+
if (parentNode)
parentNode.appendChild(el);
el.style.display = "none";
popup.renderer.content.style.cursor = "default";
popup.renderer.setStyle("ace_autocomplete");
-
+
popup.setOption("displayIndentGuides", false);
var noop = function(){};
@@ -86,8 +86,7 @@ var AcePopup = function(parentNode) {
popup.on("mousedown", function(e) {
var pos = e.getDocumentPosition();
- popup.moveCursorToPosition(pos);
- popup.selection.clearSelection();
+ popup.selection.moveToPosition(pos);
selectionMarker.start.row = selectionMarker.end.row = pos.row;
e.stop();
});
@@ -155,11 +154,11 @@ var AcePopup = function(parentNode) {
popup.getHoveredRow = function() {
return hoverMarker.start.row;
};
-
+
event.addListener(popup.container, "mouseout", hideHoverMarker);
popup.on("hide", hideHoverMarker);
popup.on("changeSelection", hideHoverMarker);
-
+
popup.session.doc.getLength = function() {
return popup.data.length;
};
@@ -203,7 +202,7 @@ var AcePopup = function(parentNode) {
};
bgTokenizer.$updateOnChange = noop;
bgTokenizer.start = noop;
-
+
popup.session.$computeWidth = function() {
return this.screenWidth = 0;
}
@@ -211,7 +210,7 @@ var AcePopup = function(parentNode) {
// public
popup.isOpen = false;
popup.isTopdown = false;
-
+
popup.data = [];
popup.setData = function(list) {
popup.data = list || [];
@@ -236,7 +235,7 @@ var AcePopup = function(parentNode) {
popup._signal("select");
}
};
-
+
popup.on("changeSelection", function() {
if (popup.isOpen)
popup.setRow(popup.selection.lead.row);
@@ -268,22 +267,22 @@ var AcePopup = function(parentNode) {
el.style.display = "";
this.renderer.$textLayer.checkForSizeChanges();
-
+
var left = pos.left;
if (left + el.offsetWidth > screenWidth)
left = screenWidth - el.offsetWidth;
-
+
el.style.left = left + "px";
-
+
this._signal("show");
lastMouseEvent = null;
popup.isOpen = true;
};
-
+
popup.getTextLeftOffset = function() {
return this.$borderSize + this.renderer.$padding + this.$imageSize;
};
-
+
popup.$imageSize = 0;
popup.$borderSize = 1;
@@ -291,19 +290,24 @@ var AcePopup = function(parentNode) {
};
dom.importCssString("\
-.ace_autocomplete.ace-tm .ace_marker-layer .ace_active-line {\
+.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\
background-color: #CAD6FA;\
z-index: 1;\
}\
-.ace_autocomplete.ace-tm .ace_line-hover {\
+.ace_editor.ace_autocomplete .ace_line-hover {\
border: 1px solid #abbffe;\
margin-top: -1px;\
background: rgba(233,233,253,0.4);\
}\
-.ace_autocomplete .ace_line-hover {\
+.ace_editor.ace_autocomplete .ace_line-hover {\
position: absolute;\
z-index: 2;\
}\
+.ace_editor.ace_autocomplete .ace_scroller {\
+ background: none;\
+ border: none;\
+ box-shadow: none;\
+}\
.ace_rightAlignedText {\
color: gray;\
display: inline-block;\
@@ -312,11 +316,11 @@ dom.importCssString("\
text-align: right;\
z-index: -1;\
}\
-.ace_autocomplete .ace_completion-highlight{\
+.ace_editor.ace_autocomplete .ace_completion-highlight{\
color: #000;\
text-shadow: 0 0 0.01em;\
}\
-.ace_autocomplete {\
+.ace_editor.ace_autocomplete {\
width: 280px;\
z-index: 200000;\
background: #fbfbfb;\
diff --git a/lib/ace/autocomplete/text_completer.js b/lib/ace/autocomplete/text_completer.js
index 87a25fb9..723ff69a 100644
--- a/lib/ace/autocomplete/text_completer.js
+++ b/lib/ace/autocomplete/text_completer.js
@@ -29,7 +29,7 @@
* ***** END LICENSE BLOCK ***** */
define(function(require, exports, module) {
- var Range = require("ace/range").Range;
+ var Range = require("../range").Range;
var splitRegex = /[^a-zA-Z_0-9\$\-]+/;
@@ -75,4 +75,4 @@ define(function(require, exports, module) {
};
}));
};
-});
\ No newline at end of file
+});
diff --git a/lib/ace/commands/incremental_search_commands.js b/lib/ace/commands/incremental_search_commands.js
index ebe979ca..8ef80303 100644
--- a/lib/ace/commands/incremental_search_commands.js
+++ b/lib/ace/commands/incremental_search_commands.js
@@ -94,14 +94,14 @@ exports.iSearchCommands = [{
}, {
name: "extendSearchTerm",
exec: function(iSearch, string) {
- iSearch.addChar(string);
+ iSearch.addString(string);
},
readOnly: true,
isIncrementalSearchCommand: true
}, {
name: "extendSearchTermSpace",
bindKey: "space",
- exec: function(iSearch) { iSearch.addChar(' '); },
+ exec: function(iSearch) { iSearch.addString(' '); },
readOnly: true,
isIncrementalSearchCommand: true
}, {
@@ -134,6 +134,34 @@ exports.iSearchCommands = [{
},
readOnly: true,
isIncrementalSearchCommand: true
+}, {
+ name: "yankNextWord",
+ bindKey: "Ctrl-w",
+ exec: function(iSearch) {
+ var ed = iSearch.$editor,
+ range = ed.selection.getRangeOfMovements(function(sel) { sel.moveCursorWordRight(); }),
+ string = ed.session.getTextRange(range);
+ iSearch.addString(string);
+ },
+ readOnly: true,
+ isIncrementalSearchCommand: true
+}, {
+ name: "yankNextChar",
+ bindKey: "Ctrl-Alt-y",
+ exec: function(iSearch) {
+ var ed = iSearch.$editor,
+ range = ed.selection.getRangeOfMovements(function(sel) { sel.moveCursorRight(); }),
+ string = ed.session.getTextRange(range);
+ iSearch.addString(string);
+ },
+ readOnly: true,
+ isIncrementalSearchCommand: true
+}, {
+ name: 'recenterTopBottom',
+ bindKey: 'Ctrl-l',
+ exec: function(iSearch) { iSearch.$editor.execCommand('recenterTopBottom'); },
+ readOnly: true,
+ isIncrementalSearchCommand: true
}];
function IncrementalSearchKeyboardHandler(iSearch) {
@@ -163,6 +191,8 @@ oop.inherits(IncrementalSearchKeyboardHandler, HashHandler);
var handleKeyboard$super = this.handleKeyboard;
this.handleKeyboard = function(data, hashId, key, keyCode) {
+ if (((hashId === 1/*ctrl*/ || hashId === 8/*command*/) && key === 'v')
+ || (hashId === 1/*ctrl*/ && key === 'y')) return null;
var cmd = handleKeyboard$super.call(this, data, hashId, key, keyCode);
if (cmd.command) { return cmd; }
if (hashId == -1) {
diff --git a/lib/ace/config.js b/lib/ace/config.js
index f8614c1a..1d927e45 100644
--- a/lib/ace/config.js
+++ b/lib/ace/config.js
@@ -144,8 +144,8 @@ exports.loadModule = function(moduleName, onLoad) {
// initialization
-exports.init = function() {
- options.packaged = require.packaged || module.packaged || (global.define && define.packaged);
+function init(packaged) {
+ options.packaged = packaged || require.packaged || module.packaged || (global.define && define.packaged);
if (!global.document)
return "";
@@ -190,6 +190,8 @@ exports.init = function() {
exports.set(key, scriptOptions[key]);
};
+exports.init = init;
+
function deHyphenate(str) {
return str.replace(/-(.)/g, function(m, m1) { return m1.toUpperCase(); });
}
diff --git a/lib/ace/document.js b/lib/ace/document.js
index 99b7bb2d..51f6fe8d 100644
--- a/lib/ace/document.js
+++ b/lib/ace/document.js
@@ -121,6 +121,7 @@ var Document = function(textOrLines) {
this.$detectNewLine = function(text) {
var match = text.match(/^.*?(\r\n|\r|\n)/m);
this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
};
/**
@@ -137,11 +138,11 @@ var Document = function(textOrLines) {
case "unix":
return "\n";
default:
- return this.$autoNewLine;
+ return this.$autoNewLine || "\n";
}
};
- this.$autoNewLine = "\n";
+ this.$autoNewLine = "";
this.$newLineMode = "auto";
/**
* [Sets the new line mode.]{: #Document.setNewLineMode.desc}
@@ -153,6 +154,7 @@ var Document = function(textOrLines) {
return;
this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
};
/**
diff --git a/lib/ace/edit_session.js b/lib/ace/edit_session.js
index c9759fb1..c0649f2a 100644
--- a/lib/ace/edit_session.js
+++ b/lib/ace/edit_session.js
@@ -281,13 +281,13 @@ var EditSession = function(text, mode) {
**/
this.setValue = function(text) {
this.doc.setValue(text);
- this.selection.moveCursorTo(0, 0);
- this.selection.clearSelection();
+ this.selection.moveTo(0, 0);
this.$resetRowCache(0);
this.$deltas = [];
this.$deltasDoc = [];
this.$deltasFold = [];
+ this.setUndoManager(this.$undoManager);
this.getUndoManager().reset();
};
@@ -412,7 +412,7 @@ var EditSession = function(text, mode) {
}
self.mergeUndoDeltas = false;
self.$deltas = [];
- }
+ };
this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager);
}
};
@@ -470,7 +470,7 @@ var EditSession = function(text, mode) {
* @param {Number} tabSize The new tab size
**/
this.setTabSize = function(tabSize) {
- this.setOption("tabSize", tabSize)
+ this.setOption("tabSize", tabSize);
};
/**
* Returns the current tab size.
@@ -486,7 +486,7 @@ var EditSession = function(text, mode) {
*
**/
this.isTabStop = function(position) {
- return this.$useSoftTabs && (position.column % this.$tabSize == 0);
+ return this.$useSoftTabs && (position.column % this.$tabSize === 0);
};
this.$overwrite = false;
@@ -500,7 +500,7 @@ var EditSession = function(text, mode) {
*
**/
this.setOverwrite = function(overwrite) {
- this.setOption("overwrite", overwrite)
+ this.setOption("overwrite", overwrite);
};
/**
@@ -622,14 +622,14 @@ var EditSession = function(text, mode) {
clazz : clazz,
inFront: !!inFront,
id: id
- }
+ };
if (inFront) {
this.$frontMarkers[id] = marker;
- this._signal("changeFrontMarker")
+ this._signal("changeFrontMarker");
} else {
this.$backMarkers[id] = marker;
- this._signal("changeBackMarker")
+ this._signal("changeBackMarker");
}
return id;
@@ -652,10 +652,10 @@ var EditSession = function(text, mode) {
if (inFront) {
this.$frontMarkers[id] = marker;
- this._signal("changeFrontMarker")
+ this._signal("changeFrontMarker");
} else {
this.$backMarkers[id] = marker;
- this._signal("changeBackMarker")
+ this._signal("changeBackMarker");
}
return marker;
@@ -696,7 +696,7 @@ var EditSession = function(text, mode) {
this.$searchHighlight = this.addDynamicMarker(highlight);
}
this.$searchHighlight.setRegexp(re);
- }
+ };
// experimental
this.highlightLines = function(startRow, endRow, clazz, inFront) {
@@ -1043,14 +1043,14 @@ var EditSession = function(text, mode) {
};
this.getLineWidgetMaxWidth = function() {
- if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth
+ if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth;
var width = 0;
this.lineWidgets.forEach(function(w) {
if (w && w.screenWidth > width)
width = w.screenWidth;
});
return this.lineWidgetWidth = width;
- }
+ };
this.$computeWidth = function(force) {
if (this.$modified || force) {
@@ -1278,7 +1278,7 @@ var EditSession = function(text, mode) {
// Check if this range and the last undo range has something in common.
// If true, merge the ranges.
if (lastUndoRange != null) {
- if (Range.comparePoints(lastUndoRange.start, range.start) == 0) {
+ if (Range.comparePoints(lastUndoRange.start, range.start) === 0) {
lastUndoRange.start.column += range.end.column - range.start.column;
lastUndoRange.end.column += range.end.column - range.start.column;
}
@@ -1562,10 +1562,7 @@ var EditSession = function(text, mode) {
// If wrapMode is activaed, the wrapData array has to be initialized.
if (useWrapMode) {
var len = this.getLength();
- this.$wrapData = [];
- for (var i = 0; i < len; i++) {
- this.$wrapData.push([]);
- }
+ this.$wrapData = Array(len);
this.$updateWrapData(0, len - 1);
}
@@ -1714,16 +1711,10 @@ var EditSession = function(text, mode) {
lastRow = firstRow;
} else {
- var args;
- if (useWrapMode) {
- args = [firstRow, 0];
- for (var i = 0; i < len; i++) args.push([]);
- this.$wrapData.splice.apply(this.$wrapData, args);
- } else {
- args = Array(len);
- args.unshift(firstRow, 0);
- this.$rowLengthCache.splice.apply(this.$rowLengthCache, args);
- }
+ var args = Array(len);
+ args.unshift(firstRow, 0);
+ var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache
+ arr.splice.apply(arr, args);
// If some new line is added inside of a foldLine, then split
// the fold line up.
@@ -1828,8 +1819,7 @@ var EditSession = function(text, mode) {
lines[foldLine.end.row].length + 1
);
- wrapData[foldLine.start.row]
- = this.$computeWrapSplits(tokens, wrapLimit, tabSize);
+ wrapData[foldLine.start.row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);
row = foldLine.end.row + 1;
}
}
@@ -2018,9 +2008,6 @@ var EditSession = function(text, mode) {
* The first position indicates the number of columns for `str` on screen.
* The second value contains the position of the document column that this function read until.
*
- *
- *
- *
**/
this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {
if (maxScreenColumn == 0)
@@ -2321,14 +2308,16 @@ var EditSession = function(text, mode) {
// Clamp textLine if in wrapMode.
if (this.$useWrapMode) {
var wrapRow = this.$wrapData[foldStartRow];
- var screenRowOffset = 0;
- while (textLine.length >= wrapRow[screenRowOffset]) {
- screenRow ++;
- screenRowOffset++;
+ if (wrapRow) {
+ var screenRowOffset = 0;
+ while (textLine.length >= wrapRow[screenRowOffset]) {
+ screenRow ++;
+ screenRowOffset++;
+ }
+ textLine = textLine.substring(
+ wrapRow[screenRowOffset - 1] || 0, textLine.length
+ );
}
- textLine = textLine.substring(
- wrapRow[screenRowOffset - 1] || 0, textLine.length
- );
}
return {
@@ -2382,7 +2371,8 @@ var EditSession = function(text, mode) {
var foldStart = fold ? fold.start.row :Infinity;
while (row < lastRow) {
- screenRows += this.$wrapData[row].length + 1;
+ var splits = this.$wrapData[row];
+ screenRows += splits ? splits.length + 1 : 1;
row ++;
if (row > foldStart) {
row = fold.end.row+1;
@@ -2398,14 +2388,17 @@ var EditSession = function(text, mode) {
return screenRows;
};
-
- // For every keystroke this gets called once per char in the whole doc!!
- // Wouldn't hurt to make it a bit faster for c >= 0x1100
-
+
/**
* @private
*
*/
+ this.$setFontMetrics = function(fm) {
+ // todo
+ }
+
+ // For every keystroke this gets called once per char in the whole doc!!
+ // Wouldn't hurt to make it a bit faster for c >= 0x1100
function isFullWidth(c) {
if (c < 0x1100)
return false;
diff --git a/lib/ace/editor.js b/lib/ace/editor.js
index 16d79785..dc00f7db 100644
--- a/lib/ace/editor.js
+++ b/lib/ace/editor.js
@@ -289,14 +289,13 @@ var Editor = function(renderer, session) {
* Sets a new editsession to use. This method also emits the `'changeSession'` event.
* @param {EditSession} session The new session to use
*
- *
**/
this.setSession = function(session) {
if (this.session == session)
return;
- if (this.session) {
- var oldSession = this.session;
+ var oldSession = this.session;
+ if (oldSession) {
this.session.removeEventListener("change", this.$onDocumentChange);
this.session.removeEventListener("changeMode", this.$onChangeMode);
this.session.removeEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
@@ -318,76 +317,80 @@ var Editor = function(renderer, session) {
}
this.session = session;
-
- this.$onDocumentChange = this.onDocumentChange.bind(this);
- session.addEventListener("change", this.$onDocumentChange);
- this.renderer.setSession(session);
-
- this.$onChangeMode = this.onChangeMode.bind(this);
- session.addEventListener("changeMode", this.$onChangeMode);
-
- this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);
- session.addEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
-
- this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);
- session.addEventListener("changeTabSize", this.$onChangeTabSize);
-
- this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);
- session.addEventListener("changeWrapLimit", this.$onChangeWrapLimit);
-
- this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);
- session.addEventListener("changeWrapMode", this.$onChangeWrapMode);
-
- this.$onChangeFold = this.onChangeFold.bind(this);
- session.addEventListener("changeFold", this.$onChangeFold);
-
- this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);
- this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker);
-
- this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);
- this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker);
-
- this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);
- this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint);
-
- this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);
- this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation);
-
- this.$onCursorChange = this.onCursorChange.bind(this);
- this.session.addEventListener("changeOverwrite", this.$onCursorChange);
-
- this.$onScrollTopChange = this.onScrollTopChange.bind(this);
- this.session.addEventListener("changeScrollTop", this.$onScrollTopChange);
-
- this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);
- this.session.addEventListener("changeScrollLeft", this.$onScrollLeftChange);
-
- this.selection = session.getSelection();
- this.selection.addEventListener("changeCursor", this.$onCursorChange);
-
- this.$onSelectionChange = this.onSelectionChange.bind(this);
- this.selection.addEventListener("changeSelection", this.$onSelectionChange);
-
- this.onChangeMode();
-
- this.$blockScrolling += 1;
- this.onCursorChange();
- this.$blockScrolling -= 1;
-
- this.onScrollTopChange();
- this.onScrollLeftChange();
- this.onSelectionChange();
- this.onChangeFrontMarker();
- this.onChangeBackMarker();
- this.onChangeBreakpoint();
- this.onChangeAnnotation();
- this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();
- this.renderer.updateFull();
+ if (session) {
+ this.$onDocumentChange = this.onDocumentChange.bind(this);
+ session.addEventListener("change", this.$onDocumentChange);
+ this.renderer.setSession(session);
+
+ this.$onChangeMode = this.onChangeMode.bind(this);
+ session.addEventListener("changeMode", this.$onChangeMode);
+
+ this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);
+ session.addEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
+
+ this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);
+ session.addEventListener("changeTabSize", this.$onChangeTabSize);
+
+ this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);
+ session.addEventListener("changeWrapLimit", this.$onChangeWrapLimit);
+
+ this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);
+ session.addEventListener("changeWrapMode", this.$onChangeWrapMode);
+
+ this.$onChangeFold = this.onChangeFold.bind(this);
+ session.addEventListener("changeFold", this.$onChangeFold);
+
+ this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);
+ this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker);
+
+ this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);
+ this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker);
+
+ this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);
+ this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint);
+
+ this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);
+ this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation);
+
+ this.$onCursorChange = this.onCursorChange.bind(this);
+ this.session.addEventListener("changeOverwrite", this.$onCursorChange);
+
+ this.$onScrollTopChange = this.onScrollTopChange.bind(this);
+ this.session.addEventListener("changeScrollTop", this.$onScrollTopChange);
+
+ this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);
+ this.session.addEventListener("changeScrollLeft", this.$onScrollLeftChange);
+
+ this.selection = session.getSelection();
+ this.selection.addEventListener("changeCursor", this.$onCursorChange);
+
+ this.$onSelectionChange = this.onSelectionChange.bind(this);
+ this.selection.addEventListener("changeSelection", this.$onSelectionChange);
+
+ this.onChangeMode();
+
+ this.$blockScrolling += 1;
+ this.onCursorChange();
+ this.$blockScrolling -= 1;
+
+ this.onScrollTopChange();
+ this.onScrollLeftChange();
+ this.onSelectionChange();
+ this.onChangeFrontMarker();
+ this.onChangeBackMarker();
+ this.onChangeBreakpoint();
+ this.onChangeAnnotation();
+ this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();
+ this.renderer.updateFull();
+ }
this._signal("changeSession", {
session: session,
oldSession: oldSession
});
+
+ oldSession && oldSession._signal("changeEditor", {oldEditor: this});
+ session && session._signal("changeEditor", {editor: this});
};
/**
@@ -452,11 +455,10 @@ var Editor = function(renderer, session) {
/**
* {:VirtualRenderer.setTheme}
* @param {String} theme The path to a theme
- *
- *
+ * @param {Function} cb optional callback called when theme is loaded
**/
- this.setTheme = function(theme) {
- this.renderer.setTheme(theme);
+ this.setTheme = function(theme, cb) {
+ this.renderer.setTheme(theme, cb);
};
/**
@@ -654,7 +656,7 @@ var Editor = function(renderer, session) {
if (this.$highlightActiveLine) {
if ((this.$selectionStyle != "line" || !this.selection.isMultiLine()))
highlight = this.getCursorPosition();
- if (this.renderer.$maxLines && this.session.getLength() === 1)
+ if (this.renderer.$maxLines && this.session.getLength() === 1 && !(this.renderer.$minLines > 1))
highlight = false;
}
@@ -840,14 +842,13 @@ var Editor = function(renderer, session) {
* Inserts `text` into wherever the cursor is pointing.
* @param {String} text The new text to add
*
- *
**/
- this.insert = function(text) {
+ this.insert = function(text, pasted) {
var session = this.session;
var mode = session.getMode();
var cursor = this.getCursorPosition();
- if (this.getBehavioursEnabled()) {
+ if (this.getBehavioursEnabled() && !pasted) {
// Get a transform if the current mode wants one.
var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text);
if (transform) {
@@ -1928,8 +1929,7 @@ var Editor = function(renderer, session) {
else
this.selection.selectTo(pos.row, pos.column);
} else {
- this.clearSelection();
- this.moveCursorTo(pos.row, pos.column);
+ this.selection.moveTo(pos.row, pos.column);
}
}
};
@@ -1964,8 +1964,7 @@ var Editor = function(renderer, session) {
* @related Editor.moveCursorTo
**/
this.navigateTo = function(row, column) {
- this.clearSelection();
- this.moveCursorTo(row, column);
+ this.selection.moveTo(row, column);
};
/**
@@ -1980,8 +1979,7 @@ var Editor = function(renderer, session) {
return this.moveCursorToPosition(selectionStart);
}
this.selection.clearSelection();
- times = times || 1;
- this.selection.moveCursorBy(-times, 0);
+ this.selection.moveCursorBy(-times || -1, 0);
};
/**
@@ -1996,8 +1994,7 @@ var Editor = function(renderer, session) {
return this.moveCursorToPosition(selectionEnd);
}
this.selection.clearSelection();
- times = times || 1;
- this.selection.moveCursorBy(times, 0);
+ this.selection.moveCursorBy(times || 1, 0);
};
/**
@@ -2141,8 +2138,7 @@ var Editor = function(renderer, session) {
this.$blockScrolling += 1;
var selection = this.getSelectionRange();
- this.clearSelection();
- this.selection.moveCursorTo(0, 0);
+ this.selection.moveTo(0, 0);
for (var i = ranges.length - 1; i >= 0; --i) {
if(this.$tryReplace(ranges[i], replacement)) {
diff --git a/lib/ace/ext/beautify.js b/lib/ace/ext/beautify.js
new file mode 100644
index 00000000..d0fa1799
--- /dev/null
+++ b/lib/ace/ext/beautify.js
@@ -0,0 +1,57 @@
+/* ***** 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 ***** */
+
+// [WIP]
+
+define(function(require, exports, module) {
+"use strict";
+var TokenIterator = require("ace/token_iterator").TokenIterator;
+
+var phpTransform = require("./beautify/php_rules").transform;
+
+exports.beautify = function(session) {
+ var iterator = new TokenIterator(session, 0, 0);
+ var token = iterator.getCurrentToken();
+
+ var context = session.$modeId.split("/").pop();
+
+ var code = phpTransform(iterator, context);
+ session.doc.setValue(code);
+};
+
+exports.commands = [{
+ name: "beautify",
+ exec: function(editor) {
+ exports.beautify(editor.session);
+ },
+ bindKey: "Ctrl-Shift-B"
+}]
+
+});
\ No newline at end of file
diff --git a/lib/ace/ext/beautify/php_rules.js b/lib/ace/ext/beautify/php_rules.js
new file mode 100644
index 00000000..9a5bed36
--- /dev/null
+++ b/lib/ace/ext/beautify/php_rules.js
@@ -0,0 +1,366 @@
+/* ***** 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 TokenIterator = require("ace/token_iterator").TokenIterator;
+exports.newLines = [{
+ type: 'support.php_tag',
+ value: ''
+}, {
+ type: 'paren.lparen',
+ value: '{',
+ indent: true
+}, {
+ type: 'paren.rparen',
+ breakBefore: true,
+ value: '}',
+ indent: false
+}, {
+ type: 'paren.rparen',
+ breakBefore: true,
+ value: '})',
+ indent: false,
+ dontBreak: true
+}, {
+ type: 'comment'
+}, {
+ type: 'text',
+ value: ';'
+}, {
+ type: 'text',
+ value: ':',
+ context: 'php'
+}, {
+ type: 'keyword',
+ value: 'case',
+ indent: true,
+ dontBreak: true
+}, {
+ type: 'keyword',
+ value: 'default',
+ indent: true,
+ dontBreak: true
+}, {
+ type: 'keyword',
+ value: 'break',
+ indent: false,
+ dontBreak: true
+}, {
+ type: 'punctuation.doctype.end',
+ value: '>'
+}, {
+ type: 'meta.tag.punctuation.end',
+ value: '>'
+}, {
+ type: 'meta.tag.punctuation.begin',
+ value: '<',
+ blockTag: true,
+ indent: true,
+ dontBreak: true
+}, {
+ type: 'meta.tag.punctuation.begin',
+ value: '',
+ indent: false,
+ breakBefore: true,
+ dontBreak: true
+}, {
+ type: 'punctuation.operator',
+ value: ';'
+}];
+
+exports.spaces = [{
+ type: 'xml-pe',
+ prepend: true
+},{
+ type: 'entity.other.attribute-name',
+ prepend: true
+}, {
+ type: 'storage.type',
+ value: 'var',
+ append: true
+}, {
+ type: 'storage.type',
+ value: 'function',
+ append: true
+}, {
+ type: 'keyword.operator',
+ value: '='
+}, {
+ type: 'keyword',
+ value: 'as',
+ prepend: true,
+ append: true
+}, {
+ type: 'keyword',
+ value: 'function',
+ append: true
+}, {
+ type: 'support.function',
+ next: /[^\(]/,
+ append: true
+}, {
+ type: 'keyword',
+ value: 'or',
+ append: true,
+ prepend: true
+}, {
+ type: 'keyword',
+ value: 'and',
+ append: true,
+ prepend: true
+}, {
+ type: 'keyword',
+ value: 'case',
+ append: true
+}, {
+ type: 'keyword.operator',
+ value: '||',
+ append: true,
+ prepend: true
+}, {
+ type: 'keyword.operator',
+ value: '&&',
+ append: true,
+ prepend: true
+}];
+exports.singleTags = ['!doctype','area','base','br','hr','input','img','link','meta'];
+
+exports.transform = function(iterator, maxPos, context) {
+ var token = iterator.getCurrentToken();
+
+ var newLines = exports.newLines;
+ var spaces = exports.spaces;
+ var singleTags = exports.singleTags;
+
+ var code = '';
+
+ var indentation = 0;
+ var dontBreak = false;
+ var tag;
+ var lastTag;
+ var lastToken = {};
+ var nextTag;
+ var nextToken = {};
+ var breakAdded = false;
+ var value = '';
+
+ while (token!==null) {
+ console.log(token);
+
+ if( !token ){
+ token = iterator.stepForward();
+ continue;
+ }
+
+ //change syntax
+ //php
+ if( token.type == 'support.php_tag' && token.value != '?>' ){
+ context = 'php';
+ }
+ else if( token.type == 'support.php_tag' && token.value == '?>' ){
+ context = 'html';
+ }
+ //css
+ else if( token.type == 'meta.tag.name.style' && context != 'css' ){
+ context = 'css';
+ }
+ else if( token.type == 'meta.tag.name.style' && context == 'css' ){
+ context = 'html';
+ }
+ //js
+ else if( token.type == 'meta.tag.name.script' && context != 'js' ){
+ context = 'js';
+ }
+ else if( token.type == 'meta.tag.name.script' && context == 'js' ){
+ context = 'html';
+ }
+
+ nextToken = iterator.stepForward();
+
+ //tag name
+ if (nextToken && nextToken.type.indexOf('meta.tag.name') == 0) {
+ nextTag = nextToken.value;
+ }
+
+ //don't linebreak
+ if ( lastToken.type == 'support.php_tag' && lastToken.value == '=') {
+ dontBreak = true;
+ }
+
+ //lowercase
+ if (token.type == 'meta.tag.name') {
+ token.value = token.value.toLowerCase();
+ }
+
+ //trim spaces
+ if (token.type == 'text') {
+ token.value = token.value.trim();
+ }
+
+ //skip empty tokens
+ if (!token.value) {
+ token = nextToken;
+ continue;
+ }
+
+ //put spaces back in
+ value = token.value;
+ for (var i in spaces) {
+ if (
+ token.type == spaces[i].type &&
+ (!spaces[i].value || token.value == spaces[i].value) &&
+ (
+ nextToken &&
+ (!spaces[i].next || spaces[i].next.test(nextToken.value))
+ )
+ ) {
+ if (spaces[i].prepend) {
+ value = ' ' + token.value;
+ }
+
+ if (spaces[i].append) {
+ value += ' ';
+ }
+ }
+ }
+
+ //tag name
+ if (token.type.indexOf('meta.tag.name') == 0) {
+ tag = token.value;
+ //console.log(tag);
+ }
+
+ //new line before
+ breakAdded = false;
+
+ //outdent
+ for (i in newLines) {
+ if (
+ token.type == newLines[i].type &&
+ (
+ !newLines[i].value ||
+ token.value == newLines[i].value
+ ) &&
+ (
+ !newLines[i].blockTag ||
+ singleTags.indexOf(nextTag) === -1
+ ) &&
+ (
+ !newLines[i].context ||
+ newLines[i].context === context
+ )
+ ) {
+ if (newLines[i].indent === false) {
+ indentation--;
+ }
+
+ if (
+ newLines[i].breakBefore &&
+ ( !newLines[i].prev || newLines[i].prev.test(lastToken.value) )
+ ) {
+ code += "\n";
+ breakAdded = true;
+
+ //indent
+ for (i = 0; i < indentation; i++) {
+ code += "\t";
+ }
+ }
+
+ break;
+ }
+ }
+
+ if (dontBreak===false) {
+ for (i in newLines) {
+ if (
+ lastToken.type == newLines[i].type &&
+ (
+ !newLines[i].value || lastToken.value == newLines[i].value
+ ) &&
+ (
+ !newLines[i].blockTag ||
+ singleTags.indexOf(tag) === -1
+ ) &&
+ (
+ !newLines[i].context ||
+ newLines[i].context === context
+ )
+ ) {
+ if (newLines[i].indent === true) {
+ indentation++;
+ }
+
+ if (!newLines[i].dontBreak && !breakAdded) {
+ code += "\n";
+
+ //indent
+ for (i = 0; i < indentation; i++) {
+ code += "\t";
+ }
+ }
+
+ break;
+ }
+ }
+ }
+
+ code += value;
+
+ //linebreaks back on after end short php tag
+ if ( lastToken.type == 'support.php_tag' && lastToken.value == '?>' ) {
+ dontBreak = false;
+ }
+
+ //next token
+ lastTag = tag;
+
+ lastToken = token;
+
+ token = nextToken;
+
+ if (token===null) {
+ break;
+ }
+ }
+
+ return code;
+};
+
+
+
+});
\ No newline at end of file
diff --git a/lib/ace/ext/emmet.js b/lib/ace/ext/emmet.js
index 6647da40..896a66d8 100644
--- a/lib/ace/ext/emmet.js
+++ b/lib/ace/ext/emmet.js
@@ -130,8 +130,7 @@ AceEmmetEditor.prototype = {
*/
setCaretPos: function(index){
var pos = this.ace.indexToPosition(index);
- this.ace.clearSelection();
- this.ace.selection.moveCursorToPosition(pos);
+ this.ace.selection.moveToPosition(pos);
},
/**
diff --git a/lib/ace/ext/error_marker.js b/lib/ace/ext/error_marker.js
index 5e87529e..2f5466b0 100644
--- a/lib/ace/ext/error_marker.js
+++ b/lib/ace/ext/error_marker.js
@@ -122,8 +122,7 @@ exports.showErrorMarker = function(editor, dir) {
};
}
editor.session.unfold(pos.row);
- editor.selection.moveCursorToPosition(pos);
- editor.selection.clearSelection();
+ editor.selection.moveToPosition(pos);
var w = {
row: pos.row,
@@ -143,12 +142,12 @@ exports.showErrorMarker = function(editor, dir) {
el.className = "error_widget " + gutterAnno.className;
el.innerHTML = gutterAnno.text.join("
");
- var kb = {
- handleKeyboard:function(_,hashId, keyString) {
- if (hashId === 0 && keyString === "esc") {
- w.destroy();
- return true;
- }
+ el.appendChild(dom.createElement("div"));
+
+ var kb = function(_, hashId, keyString) {
+ if (hashId === 0 && (keyString === "esc" || keyString === "return")) {
+ w.destroy();
+ return {command: "null"};
}
};
diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js
index e0ed0ec7..0f9be6b9 100644
--- a/lib/ace/ext/language_tools.js
+++ b/lib/ace/ext/language_tools.js
@@ -34,6 +34,7 @@ define(function(require, exports, module) {
var snippetManager = require("../snippets").snippetManager;
var Autocomplete = require("../autocomplete").Autocomplete;
var config = require("../config");
+var util = require("../autocomplete/util");
var textCompleter = require("../autocomplete/text_completer");
var keyWordCompleter = {
@@ -114,6 +115,58 @@ var loadSnippetFile = function(id) {
});
};
+var doLiveAutocomplete = function(e) {
+ var editor = e.editor;
+ var session = editor.getSession();
+ var pos = editor.getCursorPosition();
+ var line = session.getLine(pos.row);
+ var hasCompleter = (editor.completer && editor.completer.activated);
+
+ var text = e.args || "";
+
+ // Is the user entering text
+ // we only want to automatically show the autocomplete dialog
+ // whenever the user is typing in text not pasting, deleting, ...
+ var typing = (e.command.name === "insertstring" && text.length === 1);
+
+ // We don't want to autocomplete with no prefix
+ if(
+ e.command.name === 'backspace' &&
+ util.retrievePrecedingIdentifier(line, pos.column) === ''
+ ) {
+ if(hasCompleter) editor.completer.detach();
+ return;
+ }
+
+ // we don't want to autocomplete on paste events
+ if(!typing) {
+ return;
+ }
+
+ // The prefix to autocomplete for
+ var prefix = util.retrievePrecedingIdentifier(line, pos.column);
+
+ // Only autocomplete if there's a prefix that can be matched
+ if(prefix !== '' && !(hasCompleter)) {
+ if (!editor.completer) {
+ // Create new autocompleter
+ editor.completer = new Autocomplete();
+
+ // Disable autoInsert
+ editor.completer.autoInsert = false;
+ }
+
+ editor.completer.showPopup(editor);
+ // needed for firefox on mac
+ editor.completer.cancelContextMenu();
+
+ } else if(prefix === '' && hasCompleter) {
+ // When the prefix is empty
+ // close the autocomplete dialog
+ editor.completer.detach();
+ }
+};
+
var Editor = require("../editor").Editor;
require("../config").defineOptions(Editor.prototype, "editor", {
enableBasicAutocompletion: {
@@ -127,6 +180,17 @@ require("../config").defineOptions(Editor.prototype, "editor", {
},
value: false
},
+ enableLiveAutocomplete: {
+ set: function(val) {
+ if (val) {
+ // On each change automatically trigger the autocomplete
+ this.commands.on('afterExec', doLiveAutocomplete);
+ } else {
+ this.commands.removeListener('afterExec', doLiveAutocomplete);
+ }
+ },
+ value: false
+ },
enableSnippets: {
set: function(val) {
if (val) {
diff --git a/lib/ace/ext/modelist.js b/lib/ace/ext/modelist.js
index 8a2c7bd6..2f67bee6 100644
--- a/lib/ace/ext/modelist.js
+++ b/lib/ace/ext/modelist.js
@@ -68,6 +68,7 @@ var supportedModes = {
EJS: ["ejs"],
Forth: ["frt|fs|ldr"],
FTL: ["ftl"],
+ Gherkin: ["feature"],
Glsl: ["glsl|frag|vert"],
golang: ["go"],
Groovy: ["groovy"],
diff --git a/lib/ace/incremental_search.js b/lib/ace/incremental_search.js
index e6fa8928..88615006 100644
--- a/lib/ace/incremental_search.js
+++ b/lib/ace/incremental_search.js
@@ -72,6 +72,8 @@ oop.inherits(IncrementalSearch, Search);
this.$options.needle = '';
this.$options.backwards = backwards;
ed.keyBinding.addKeyboardHandler(this.$keyboardHandler);
+ // we need to completely intercept paste, just registering an event handler does not work
+ this.$originalEditorOnPaste = ed.onPaste; ed.onPaste = this.onPaste.bind(this);
this.$mousedownHandler = ed.addEventListener('mousedown', this.onMouseDown.bind(this));
this.selectionFix(ed);
this.statusMessage(true);
@@ -79,11 +81,13 @@ oop.inherits(IncrementalSearch, Search);
this.deactivate = function(reset) {
this.cancelSearch(reset);
- this.$editor.keyBinding.removeKeyboardHandler(this.$keyboardHandler);
+ var ed = this.$editor;
+ ed.keyBinding.removeKeyboardHandler(this.$keyboardHandler);
if (this.$mousedownHandler) {
- this.$editor.removeEventListener('mousedown', this.$mousedownHandler);
+ ed.removeEventListener('mousedown', this.$mousedownHandler);
delete this.$mousedownHandler;
}
+ ed.onPaste = this.$originalEditorOnPaste;
this.message('');
}
@@ -150,9 +154,9 @@ oop.inherits(IncrementalSearch, Search);
return found;
}
- this.addChar = function(c) {
+ this.addString = function(s) {
return this.highlightAndFindWithNeedle(false, function(needle) {
- return needle + c;
+ return needle + s;
});
}
@@ -181,6 +185,10 @@ oop.inherits(IncrementalSearch, Search);
return true;
}
+ this.onPaste = function(text) {
+ this.addString(text);
+ }
+
this.statusMessage = function(found) {
var options = this.$options, msg = '';
msg += options.backwards ? 'reverse-' : '';
diff --git a/lib/ace/incremental_search_test.js b/lib/ace/incremental_search_test.js
index c351d8e2..262e09a7 100644
--- a/lib/ace/incremental_search_test.js
+++ b/lib/ace/incremental_search_test.js
@@ -95,17 +95,17 @@ module.exports = {
"test: find simple text incrementally" : function() {
iSearch.activate(editor);
- var range = iSearch.addChar('1'), // "1"
+ var range = iSearch.addString('1'), // "1"
highlightRanges = callHighlighterUpdate(editor.session);
testRanges("Range: [0/3] -> [0/4]", [range], "range");
testRanges("Range: [0/3] -> [0/4],Range: [1/3] -> [1/4]", highlightRanges, "highlight");
- range = iSearch.addChar('2'); // "12"
+ range = iSearch.addString('2'); // "12"
highlightRanges = callHighlighterUpdate(editor.session);
testRanges("Range: [0/3] -> [0/5]", [range], "range");
testRanges("Range: [0/3] -> [0/5],Range: [1/3] -> [1/5]", highlightRanges, "highlight");
- range = iSearch.addChar('3'); // "123"
+ range = iSearch.addString('3'); // "123"
highlightRanges = callHighlighterUpdate(editor.session);
testRanges("Range: [0/3] -> [0/6]", [range], "range");
testRanges("Range: [0/3] -> [0/6]", highlightRanges, "highlight");
@@ -118,7 +118,7 @@ module.exports = {
"test: forward / backward" : function() {
iSearch.activate(editor);
- iSearch.addChar('1'); iSearch.addChar('2');
+ iSearch.addString('1'); iSearch.addString('2');
var range = iSearch.next();
testRanges("Range: [1/3] -> [1/5]", [range], "range");
@@ -131,18 +131,18 @@ module.exports = {
"test: cancelSearch" : function() {
iSearch.activate(editor);
- iSearch.addChar('1'); iSearch.addChar('2');
+ iSearch.addString('1'); iSearch.addString('2');
var range = iSearch.cancelSearch(true);
testRanges("Range: [0/0] -> [0/0]", [range], "range");
- iSearch.addChar('1'); range = iSearch.addChar('2');
+ iSearch.addString('1'); range = iSearch.addString('2');
testRanges("Range: [0/3] -> [0/5]", [range], "range");
},
"test: failing search keeps pos" : function() {
iSearch.activate(editor);
- iSearch.addChar('1'); iSearch.addChar('2');
- var range = iSearch.addChar('x');
+ iSearch.addString('1'); iSearch.addString('2');
+ var range = iSearch.addString('x');
testRanges("", [range], "range");
assert.position(editor.getCursorPosition(), 0, 5);
},
@@ -150,14 +150,14 @@ module.exports = {
"test: backwards search" : function() {
editor.moveCursorTo(1,0);
iSearch.activate(editor, true);
- iSearch.addChar('1'); var range = iSearch.addChar('2');;
+ iSearch.addString('1'); var range = iSearch.addString('2');;
testRanges("Range: [0/5] -> [0/3]", [range], "range");
assert.position(editor.getCursorPosition(), 0, 3);
},
"test: forwards then backwards, same result, reoriented range" : function() {
iSearch.activate(editor);
- iSearch.addChar('1'); var range = iSearch.addChar('2');;
+ iSearch.addString('1'); var range = iSearch.addString('2');;
testRanges("Range: [0/3] -> [0/5]", [range], "range");
assert.position(editor.getCursorPosition(), 0, 5);
@@ -168,7 +168,7 @@ module.exports = {
"test: reuse prev search via option" : function() {
iSearch.activate(editor);
- iSearch.addChar('1'); iSearch.addChar('2');;
+ iSearch.addString('1'); iSearch.addString('2');;
assert.position(editor.getCursorPosition(), 0, 5);
iSearch.deactivate();
@@ -179,14 +179,14 @@ module.exports = {
"test: don't extend selection range if selection is empty" : function() {
iSearch.activate(editor);
- iSearch.addChar('1'); iSearch.addChar('2');;
+ iSearch.addString('1'); iSearch.addString('2');;
testRanges("Range: [0/5] -> [0/5]", [editor.getSelectionRange()], "sel range");
},
"test: extend selection range if selection exists" : function() {
iSearch.activate(editor);
editor.selection.selectTo(0, 1);
- iSearch.addChar('1'); iSearch.addChar('2');;
+ iSearch.addString('1'); iSearch.addString('2');;
testRanges("Range: [0/0] -> [0/5]", [editor.getSelectionRange()], "sel range");
},
@@ -195,7 +195,7 @@ module.exports = {
editor.keyBinding.addKeyboardHandler(emacs.handler);
emacs.handler.commands.setMark.exec(editor);
iSearch.activate(editor);
- iSearch.addChar('1'); iSearch.addChar('2');;
+ iSearch.addString('1'); iSearch.addString('2');;
testRanges("Range: [0/0] -> [0/5]", [editor.getSelectionRange()], "sel range");
}
diff --git a/lib/ace/keyboard/emacs.js b/lib/ace/keyboard/emacs.js
index 7e855959..f1adb9ef 100644
--- a/lib/ace/keyboard/emacs.js
+++ b/lib/ace/keyboard/emacs.js
@@ -219,6 +219,10 @@ exports.handler.bindKey = function(key, command) {
};
exports.handler.handleKeyboard = function(data, hashId, key, keyCode) {
+ // if keyCode == -1 a non-printable key was pressed, such as just
+ // control. Handling those is currently not supported in this handler
+ if (keyCode === -1) return undefined;
+
var editor = data.editor;
// insertstring data.count times
if (hashId == -1) {
diff --git a/lib/ace/keyboard/vim.js b/lib/ace/keyboard/vim.js
index fdd88117..3ae4842f 100644
--- a/lib/ace/keyboard/vim.js
+++ b/lib/ace/keyboard/vim.js
@@ -145,8 +145,8 @@ exports.handler = {
if (hashId == -1 || hashId == 1 || hashId === 0 && key.length > 1) {
if (cmds.inputBuffer.idle && startCommands[key])
return startCommands[key];
- cmds.inputBuffer.push(editor, key);
- return {command: "null", passEvent: false};
+ var isHandled = cmds.inputBuffer.push(editor, key);
+ return {command: "null", passEvent: !isHandled};
} // if no modifier || shift: wait for input.
else if (key.length == 1 && (hashId === 0 || hashId == 4)) {
return {command: "null", passEvent: true};
diff --git a/lib/ace/keyboard/vim/commands.js b/lib/ace/keyboard/vim/commands.js
index dd3357d6..e48446f4 100644
--- a/lib/ace/keyboard/vim/commands.js
+++ b/lib/ace/keyboard/vim/commands.js
@@ -201,8 +201,7 @@ var actions = exports.actions = {
//editor.selection.selectLine();
//editor.selection.selectLeft();
var row = editor.getCursorPosition().row;
- editor.selection.clearSelection();
- editor.selection.moveCursorTo(row, 0);
+ editor.selection.moveTo(row, 0);
editor.selection.selectLineEnd();
editor.selection.visualLineStart = row;
@@ -582,13 +581,11 @@ var handleCursorMove = exports.onCursorMove = function(editor, e) {
var cursorRow = editor.getCursorPosition().row;
if(originRow <= cursorRow) {
var endLine = editor.session.getLine(cursorRow);
- editor.selection.clearSelection();
- editor.selection.moveCursorTo(originRow, 0);
+ editor.selection.moveTo(originRow, 0);
editor.selection.selectTo(cursorRow, endLine.length);
} else {
var endLine = editor.session.getLine(originRow);
- editor.selection.clearSelection();
- editor.selection.moveCursorTo(originRow, endLine.length);
+ editor.selection.moveTo(originRow, endLine.length);
editor.selection.selectTo(cursorRow, 0);
}
}
diff --git a/lib/ace/keyboard/vim/maps/motions.js b/lib/ace/keyboard/vim/maps/motions.js
index ae457d54..630ba66a 100644
--- a/lib/ace/keyboard/vim/maps/motions.js
+++ b/lib/ace/keyboard/vim/maps/motions.js
@@ -53,8 +53,7 @@ function Motion(m) {
var a = getPos(editor, range, count, param, false);
if (!a)
return;
- editor.clearSelection();
- editor.moveCursorTo(a.row, a.column);
+ editor.selection.moveTo(a.row, a.column);
};
m.sel = function(editor, range, count, param) {
var a = getPos(editor, range, count, param, true);
diff --git a/lib/ace/keyboard/vim/maps/util.js b/lib/ace/keyboard/vim/maps/util.js
index af0e07c7..a216c2cc 100644
--- a/lib/ace/keyboard/vim/maps/util.js
+++ b/lib/ace/keyboard/vim/maps/util.js
@@ -122,13 +122,11 @@ module.exports = {
},
copyLine: function(editor) {
var pos = editor.getCursorPosition();
- editor.selection.clearSelection();
- editor.moveCursorTo(pos.row, pos.column);
+ editor.selection.moveTo(pos.row, pos.column);
editor.selection.selectLine();
registers._default.isLine = true;
registers._default.text = editor.getCopyText().replace(/\n$/, "");
- editor.selection.clearSelection();
- editor.moveCursorTo(pos.row, pos.column);
+ editor.selection.moveTo(pos.row, pos.column);
}
};
});
diff --git a/lib/ace/layer/cursor.js b/lib/ace/layer/cursor.js
index aaf3ffec..4578482a 100644
--- a/lib/ace/layer/cursor.js
+++ b/lib/ace/layer/cursor.js
@@ -190,7 +190,7 @@ var Cursor = function(parentEl) {
for (var i = 0, n = selections.length; i < n; i++) {
var pixelPos = this.getPixelPosition(selections[i].cursor, true);
if ((pixelPos.top > config.height + config.offset ||
- pixelPos.top < -config.offset) && i > 1) {
+ pixelPos.top < 0) && i > 1) {
continue;
}
diff --git a/lib/ace/layer/font_metrics.js b/lib/ace/layer/font_metrics.js
new file mode 100644
index 00000000..45fa44cb
--- /dev/null
+++ b/lib/ace/layer/font_metrics.js
@@ -0,0 +1,158 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * 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
+ * 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) {
+
+var oop = require("../lib/oop");
+var dom = require("../lib/dom");
+var lang = require("../lib/lang");
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+
+var CHAR_COUNT = 0;
+
+var FontMetrics = exports.FontMetrics = function(parentEl, interval) {
+ this.el = dom.createElement("div");
+ this.$setMeasureNodeStyles(this.el.style, true);
+
+ this.$main = dom.createElement("div");
+ this.$setMeasureNodeStyles(this.$main.style);
+
+ this.$measureNode = dom.createElement("div");
+ this.$setMeasureNodeStyles(this.$measureNode.style);
+
+
+ this.el.appendChild(this.$main);
+ this.el.appendChild(this.$measureNode);
+ parentEl.appendChild(this.el);
+
+ if (!CHAR_COUNT)
+ this.$testFractionalRect();
+ this.$measureNode.textContent = lang.stringRepeat("X", CHAR_COUNT);
+
+ this.$characterSize = {width: 0, height: 0};
+ this.checkForSizeChanges();
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.$characterSize = {width: 0, height: 0};
+
+ this.$testFractionalRect = function() {
+ var el = dom.createElement("div");
+ this.$setMeasureNodeStyles(el.style);
+ el.style.width = "0.2px";
+ document.documentElement.appendChild(el);
+ var w = el.getBoundingClientRect().width;
+ if (w > 0 && w < 1)
+ CHAR_COUNT = 1;
+ else
+ CHAR_COUNT = 100;
+ el.parentNode.removeChild(el);
+ };
+
+ this.$setMeasureNodeStyles = function(style, isRoot) {
+ style.width = style.height = "auto";
+ style.left = style.top = "-100px";
+ style.visibility = "hidden";
+ style.position = "fixed";
+ style.whiteSpace = "pre";
+ style.font = "inherit";
+ style.overflow = isRoot ? "hidden" : "visible";
+ };
+
+ this.checkForSizeChanges = function() {
+ var size = this.$measureSizes();
+ if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) {
+ this.$measureNode.style.fontWeight = "bold";
+ var boldSize = this.$measureSizes();
+ this.$measureNode.style.fontWeight = "";
+ this.$characterSize = size;
+ this.charSizes = Object.create(null);
+ this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height;
+ this._emit("changeCharacterSize", {data: size});
+ }
+ };
+
+ this.$pollSizeChanges = function() {
+ if (this.$pollSizeChangesTimer)
+ return this.$pollSizeChangesTimer;
+ var self = this;
+ return this.$pollSizeChangesTimer = setInterval(function() {
+ self.checkForSizeChanges();
+ }, 500);
+ };
+
+ this.setPolling = function(val) {
+ if (val) {
+ this.$pollSizeChanges();
+ } else {
+ if (this.$pollSizeChangesTimer)
+ this.$pollSizeChangesTimer;
+ }
+ };
+
+ this.$measureSizes = function() {
+ var rect = this.$measureNode.getBoundingClientRect();
+ var size = {
+ height: rect.height,
+ width: rect.width / CHAR_COUNT
+ };
+ // Size and width can be null if the editor is not visible or
+ // detached from the document
+ if (size.width === 0 || size.height === 0)
+ return null;
+ return size;
+ };
+
+ this.$measureCharWidth = function(ch) {
+ this.$main.textContent = lang.stringRepeat(ch, CHAR_COUNT);
+ var rect = this.$main.getBoundingClientRect();
+ return rect.width / CHAR_COUNT;
+ };
+
+ this.getCharacterWidth = function(ch) {
+ var w = this.charSizes[ch];
+ if (w === undefined) {
+ this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width;
+ }
+ return w;
+ };
+
+ this.destroy = function() {
+ clearInterval(this.$pollSizeChangesTimer);
+ if (this.el && this.el.parentNode)
+ this.el.parentNode.removeChild(this.el);
+ };
+
+}).call(FontMetrics.prototype);
+
+});
diff --git a/lib/ace/layer/gutter.js b/lib/ace/layer/gutter.js
index 59aa35fd..5b1d3b98 100644
--- a/lib/ace/layer/gutter.js
+++ b/lib/ace/layer/gutter.js
@@ -119,7 +119,8 @@ var Gutter = function(parentEl) {
this.update = function(config) {
var session = this.session;
var firstRow = config.firstRow;
- var lastRow = Math.min(config.lastRow + 1, session.getLength() - 1); // needed to compensate
+ var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar
+ session.getLength() - 1);
var fold = session.getNextFoldLine(firstRow);
var foldStart = fold ? fold.start.row : Infinity;
var foldWidgets = this.$showFoldWidgets && session.foldWidgets;
diff --git a/lib/ace/layer/text.js b/lib/ace/layer/text.js
index 4290233d..140700aa 100644
--- a/lib/ace/layer/text.js
+++ b/lib/ace/layer/text.js
@@ -41,154 +41,58 @@ var Text = function(parentEl) {
this.element = dom.createElement("div");
this.element.className = "ace_layer ace_text-layer";
parentEl.appendChild(this.element);
-
- this.$characterSize = {width: 0, height: 0};
- this.checkForSizeChanges();
- this.$pollSizeChanges();
+ this.$updateEolChar = this.$updateEolChar.bind(this);
};
(function() {
oop.implement(this, EventEmitter);
- this.EOF_CHAR = "\xB6"; //"¶";
- this.EOL_CHAR = "\xAC"; //"¬";
- this.TAB_CHAR = "\u2192"; //"→" "\u21E5";
- this.SPACE_CHAR = "\xB7"; //"·";
+ this.EOF_CHAR = "\xB6";
+ this.EOL_CHAR_LF = "\xAC";
+ this.EOL_CHAR_CRLF = "\xa4";
+ this.EOL_CHAR = this.EOL_CHAR_LF;
+ this.TAB_CHAR = "\u2192"; //"\u21E5";
+ this.SPACE_CHAR = "\xB7";
this.$padding = 0;
+ this.$updateEolChar = function() {
+ var EOL_CHAR = this.session.doc.getNewLineCharacter() == "\n"
+ ? this.EOL_CHAR_LF
+ : this.EOL_CHAR_CRLF;
+ if (this.EOL_CHAR != EOL_CHAR) {
+ this.EOL_CHAR = EOL_CHAR;
+ return true;
+ }
+ }
+
this.setPadding = function(padding) {
this.$padding = padding;
this.element.style.padding = "0 " + padding + "px";
};
this.getLineHeight = function() {
- return this.$characterSize.height || 0;
+ return this.$fontMetrics.$characterSize.height || 0;
};
this.getCharacterWidth = function() {
- return this.$characterSize.width || 0;
+ return this.$fontMetrics.$characterSize.width || 0;
};
+
+ this.$setFontMetrics = function(measure) {
+ this.$fontMetrics = measure;
+ this.$fontMetrics.on("changeCharacterSize", function(e) {
+ this._signal("changeCharacterSize", e);
+ }.bind(this));
+ this.$pollSizeChanges();
+ }
this.checkForSizeChanges = function() {
- var size = this.$measureSizes();
- if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) {
- this.$measureNode.style.fontWeight = "bold";
- var boldSize = this.$measureSizes();
- this.$measureNode.style.fontWeight = "";
- this.$characterSize = size;
- this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height;
- this._emit("changeCharacterSize", {data: size});
- }
+ this.$fontMetrics.checkForSizeChanges();
};
-
this.$pollSizeChanges = function() {
- var self = this;
- this.$pollSizeChangesTimer = setInterval(function() {
- self.checkForSizeChanges();
- }, 500);
+ return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges();
};
-
- this.$fontStyles = {
- fontFamily : 1,
- fontSize : 1,
- fontWeight : 1,
- fontStyle : 1,
- lineHeight : 1
- };
-
- this.$measureSizes = useragent.isIE || useragent.isOldGecko ? function() {
- var n = 1000;
- if (!this.$measureNode) {
- var measureNode = this.$measureNode = dom.createElement("div");
- var style = measureNode.style;
-
- style.width = style.height = "auto";
- style.left = style.top = (-n * 40) + "px";
-
- style.visibility = "hidden";
- style.position = "fixed";
- style.overflow = "visible";
- style.whiteSpace = "nowrap";
-
- // in FF 3.6 monospace fonts can have a fixed sub pixel width.
- // that's why we have to measure many characters
- // Note: characterWidth can be a float!
- measureNode.innerHTML = lang.stringRepeat("Xy", n);
-
- if (this.element.ownerDocument.body) {
- this.element.ownerDocument.body.appendChild(measureNode);
- } else {
- var container = this.element.parentNode;
- while (!dom.hasCssClass(container, "ace_editor"))
- container = container.parentNode;
- container.appendChild(measureNode);
- }
- }
-
- // Size and width can be null if the editor is not visible or
- // detached from the document
- if (!this.element.offsetWidth)
- return null;
-
- var style = this.$measureNode.style;
- var computedStyle = dom.computedStyle(this.element);
- for (var prop in this.$fontStyles)
- style[prop] = computedStyle[prop];
-
- var size = {
- height: this.$measureNode.offsetHeight,
- width: this.$measureNode.offsetWidth / (n * 2)
- };
-
- // Size and width can be null if the editor is not visible or
- // detached from the document
- if (size.width == 0 || size.height == 0)
- return null;
-
- return size;
- }
- : function() {
- if (!this.$measureNode) {
- var measureNode = this.$measureNode = dom.createElement("div");
- var style = measureNode.style;
-
- style.width = style.height = "auto";
- style.left = style.top = -100 + "px";
-
- style.visibility = "hidden";
- style.position = "fixed";
- style.overflow = "visible";
- style.whiteSpace = "nowrap";
-
- // fixes fractional fixed-width fonts; see http://git.io/CavZNw
- measureNode.innerHTML = lang.stringRepeat("X", 100);
-
- var container = this.element.parentNode;
- while (container && !dom.hasCssClass(container, "ace_editor"))
- container = container.parentNode;
-
- if (!container)
- return this.$measureNode = null;
-
- container.appendChild(measureNode);
- }
-
- var rect = this.$measureNode.getBoundingClientRect();
-
- var size = {
- height: rect.height,
- width: rect.width / 100
- };
-
- // Size and width can be null if the editor is not visible or
- // detached from the document
- if (size.width == 0 || size.height == 0)
- return null;
-
- return size;
- };
-
this.setSession = function(session) {
this.session = session;
this.$computeTabString();
@@ -222,7 +126,7 @@ var Text = function(parentEl) {
var tabStr = this.$tabStrings = [0];
for (var i = 1; i < tabSize + 1; i++) {
if (this.showInvisibles) {
- tabStr.push(""
+ tabStr.push(""
+ this.TAB_CHAR
+ lang.stringRepeat("\xa0", i - 1)
+ "");
@@ -233,8 +137,12 @@ var Text = function(parentEl) {
if (this.displayIndentGuides) {
this.$indentGuideRe = /\s\S| \t|\t |\s$/;
var className = "ace_indent-guide";
+ var spaceClass = "";
+ var tabClass = "";
if (this.showInvisibles) {
className += " ace_invisible";
+ spaceClass = " ace_invisible_space";
+ tabClass = " ace_invisible_tab";
var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize);
var tabContent = this.TAB_CHAR + lang.stringRepeat("\xa0", this.tabSize - 1);
} else{
@@ -242,8 +150,8 @@ var Text = function(parentEl) {
var tabContent = spaceContent;
}
- this.$tabStrings[" "] = "" + spaceContent + "";
- this.$tabStrings["\t"] = "" + tabContent + "";
+ this.$tabStrings[" "] = "" + spaceContent + "";
+ this.$tabStrings["\t"] = "" + tabContent + "";
}
};
@@ -417,7 +325,7 @@ var Text = function(parentEl) {
var replaceFunc = function(c, a, b, tabIdx, idx4) {
if (a) {
return self.showInvisibles ?
- "" + lang.stringRepeat(self.SPACE_CHAR, c.length) + "" :
+ "" + lang.stringRepeat(self.SPACE_CHAR, c.length) + "" :
lang.stringRepeat("\xa0", c.length);
} else if (c == "&") {
return "&";
@@ -429,14 +337,14 @@ var Text = function(parentEl) {
return self.$tabStrings[tabSize];
} else if (c == "\u3000") {
// U+3000 is both invisible AND full-width, so must be handled uniquely
- var classToUse = self.showInvisibles ? "ace_cjk ace_invisible" : "ace_cjk";
+ var classToUse = self.showInvisibles ? "ace_cjk ace_invisible ace_invisible_space" : "ace_cjk";
var space = self.showInvisibles ? self.SPACE_CHAR : "";
screenColumn += 1;
return "" + space + "";
} else if (b) {
- return "" + self.SPACE_CHAR + "";
+ return "" + self.SPACE_CHAR + "";
} else {
screenColumn += 1;
return "",
+ "",
row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR,
""
);
diff --git a/lib/ace/layer/text_test.js b/lib/ace/layer/text_test.js
index a14a37e6..57601207 100644
--- a/lib/ace/layer/text_test.js
+++ b/lib/ace/layer/text_test.js
@@ -81,14 +81,14 @@ module.exports = {
this.textLayer.$renderLine(stringBuilder, 0, true);
assert.equal(
stringBuilder.join(""),
- "" + this.textLayer.SPACE_CHAR + ""
- + "\xB6"
+ "" + this.textLayer.SPACE_CHAR + ""
+ + "\xB6"
);
},
-
- "test rendering of indent guides" : function() {
+
+ "test rendering of indent guides" : function() {
var textLayer = this.textLayer
- var EOL = "" + textLayer.EOL_CHAR + "";
+ var EOL = "" + textLayer.EOL_CHAR + "";
var SPACE = function(i) {return Array(i+1).join("\xa0")}
var DOT = function(i) {return Array(i+1).join(textLayer.SPACE_CHAR)}
var TAB = function(i) {return textLayer.TAB_CHAR + SPACE(i-1)}
@@ -108,13 +108,13 @@ module.exports = {
]);
this.textLayer.setShowInvisibles(true);
testRender([
- "" + DOT(4) + "" + DOT(2) + "" + EOL,
- "" + TAB(4) + "" + TAB(4) + "f" + EOL,
+ "" + DOT(4) + "" + DOT(2) + "" + EOL,
+ "" + TAB(4) + "" + TAB(4) + "f" + EOL,
]);
this.textLayer.setDisplayIndentGuides(false);
testRender([
- "" + DOT(6) + "" + EOL,
- "" + TAB(4) + "" + TAB(4) + "f" + EOL
+ "" + DOT(6) + "" + EOL,
+ "" + TAB(4) + "" + TAB(4) + "f" + EOL
]);
}
};
diff --git a/lib/ace/lib/event.js b/lib/ace/lib/event.js
index 6721b19c..9ad0c3ac 100644
--- a/lib/ace/lib/event.js
+++ b/lib/ace/lib/event.js
@@ -33,7 +33,6 @@ define(function(require, exports, module) {
var keys = require("./keys");
var useragent = require("./useragent");
-var dom = require("./dom");
exports.addListener = function(elem, type, callback) {
if (elem.addEventListener) {
@@ -170,7 +169,7 @@ exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbac
};
exports.addListener(el, "mousedown", function(e) {
- if (exports.getButton(e) != 0) {
+ if (exports.getButton(e) !== 0) {
clicks = 0;
} else if (e.detail > 1) {
clicks++;
@@ -210,22 +209,27 @@ exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbac
}
};
-function normalizeCommandKeys(callback, e, keyCode) {
- var hashId = 0;
- if ((useragent.isOpera && !("KeyboardEvent" in window)) && useragent.isMac) {
- hashId = 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0)
- | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0);
- } else {
- hashId = 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0)
- | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);
+var getModifierHash = useragent.isMac && useragent.isOpera && !("KeyboardEvent" in window)
+ ? function(e) {
+ return 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0);
}
+ : function(e) {
+ return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);
+ };
+
+exports.getModifierString = function(e) {
+ return keys.KEY_MODS[getModifierHash(e)];
+};
+
+function normalizeCommandKeys(callback, e, keyCode) {
+ var hashId = getModifierHash(e);
if (!useragent.isMac && pressedKeys) {
if (pressedKeys[91] || pressedKeys[92])
hashId |= 8;
if (pressedKeys.altGr) {
if ((3 & hashId) != 3)
- pressedKeys.altGr = 0
+ pressedKeys.altGr = 0;
else
return;
}
@@ -267,12 +271,11 @@ function normalizeCommandKeys(callback, e, keyCode) {
if (!hashId && keyCode === 13) {
if (e.location || e.keyLocation === 3) {
- callback(e, hashId, -keyCode)
+ callback(e, hashId, -keyCode);
if (e.defaultPrevented)
return;
}
}
-
// If there is no hashId and the keyCode is not a function key, then
// we don't call the callback as we don't handle a command key here
@@ -281,8 +284,6 @@ function normalizeCommandKeys(callback, e, keyCode) {
return false;
}
-
-
return callback(e, hashId, keyCode);
}
diff --git a/lib/ace/lib/keys.js b/lib/ace/lib/keys.js
index 916d9f00..70e4ccb2 100644
--- a/lib/ace/lib/keys.js
+++ b/lib/ace/lib/keys.js
@@ -102,8 +102,8 @@ var Keys = (function() {
73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o',
80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v',
87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.',
- 188: ',', 190: '.', 191: '/', 192: '`', 219: '[', 220: '\\',
- 221: ']', 222: '\''
+ 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`', 219: '[',
+ 220: '\\',221: ']', 222: '\'',
}
};
@@ -130,16 +130,25 @@ var Keys = (function() {
ret.enter = ret["return"];
ret.escape = ret.esc;
ret.del = ret["delete"];
-
+
// workaround for firefox bug
ret[173] = '-';
+ (function() {
+ var mods = ["cmd", "ctrl", "alt", "shift"];
+ for (var i = Math.pow(2, mods.length); i--;) {
+ ret.KEY_MODS[i] = mods.filter(function(x) {
+ return i & ret.KEY_MODS[x];
+ }).join("-") + "-";
+ }
+ })();
+
return ret;
})();
oop.mixin(exports, Keys);
exports.keyCodeToString = function(keyCode) {
return (Keys[keyCode] || String.fromCharCode(keyCode)).toLowerCase();
-}
+};
});
diff --git a/lib/ace/lib/net.js b/lib/ace/lib/net.js
index 3869da45..bba76df8 100644
--- a/lib/ace/lib/net.js
+++ b/lib/ace/lib/net.js
@@ -38,4 +38,14 @@ exports.loadScript = function(path, callback) {
};
};
+/*
+ * Convert a url into a fully qualified absolute URL
+ * This function does not work in IE6
+ */
+exports.qualifyURL = function(url) {
+ var a = document.createElement('a');
+ a.href = url;
+ return a.href;
+}
+
});
diff --git a/lib/ace/lib/useragent.js b/lib/ace/lib/useragent.js
index b6989a8c..908a2a4c 100644
--- a/lib/ace/lib/useragent.js
+++ b/lib/ace/lib/useragent.js
@@ -76,7 +76,7 @@ exports.isLinux = (os == "linux");
// Windows Store JavaScript apps (aka Metro apps written in HTML5 and JavaScript) do not use the "Microsoft Internet Explorer" string in their user agent, but "MSAppHost" instead.
exports.isIE =
(navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0)
- && parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]);
+ && parseFloat(navigator.userAgent.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:|MSIE )([0-9]+[\.0-9]+)/)[1]);
exports.isOldIE = exports.isIE && exports.isIE < 9;
diff --git a/lib/ace/mode/_test/highlight_rules_test.js b/lib/ace/mode/_test/highlight_rules_test.js
index c9d2aa15..57273292 100644
--- a/lib/ace/mode/_test/highlight_rules_test.js
+++ b/lib/ace/mode/_test/highlight_rules_test.js
@@ -46,7 +46,7 @@ function generateTestData() {
var tokenizer = new Mode().getTokenizer();
var state = "start";
- var data = text.split(/\n|\r|\r\n/).map(function(line) {
+ var data = text.split(/\r\n|\r|\n/).map(function(line) {
var data = tokenizer.getLineTokens(line, state);
var tmp = [];
tmp.push(JSON.stringify(data.state));
diff --git a/lib/ace/mode/_test/tokens_coldfusion.json b/lib/ace/mode/_test/tokens_coldfusion.json
index 02f2c3f7..804e647d 100644
--- a/lib/ace/mode/_test/tokens_coldfusion.json
+++ b/lib/ace/mode/_test/tokens_coldfusion.json
@@ -1,26 +1,26 @@
[[
"start",
- ["comment",""]
+ ["comment.xml",""]
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","cfset"],
- ["text"," "],
- ["entity.other.attribute-name","welcome"],
- ["keyword.operator.separator","="],
- ["string","\"Hello World!\""],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","cfset"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","welcome"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"Hello World!\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","cfoutput"],
- ["meta.tag.punctuation.end",">"],
- ["text","#welcome#"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","cfoutput"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","cfoutput"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","#welcome#"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","cfoutput"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
]]
\ No newline at end of file
diff --git a/lib/ace/mode/_test/tokens_curly.json b/lib/ace/mode/_test/tokens_curly.json
index 110574b6..d87a627a 100644
--- a/lib/ace/mode/_test/tokens_curly.json
+++ b/lib/ace/mode/_test/tokens_curly.json
@@ -1,56 +1,56 @@
[[
"start",
- ["text","tokenize Curly template"],
+ ["text.xml","tokenize Curly template"],
["variable","{{"],
["text","test"],
["variable","}}"]
],[
"start",
- ["text","tokenize embedded script"]
+ ["text.xml","tokenize embedded script"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.script","script"],
- ["text"," "],
- ["entity.other.attribute-name","a"],
- ["keyword.operator.separator","="],
- ["string","'a'"],
- ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.script.tag-name.xml","script"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","a"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","'a'"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["storage.type","var"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.script","script"],
- ["meta.tag.punctuation.end",">"],
- ["text","'123'"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.script.tag-name.xml","script"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","'123'"]
],[
"start",
- ["text","tokenize multiline attribute value with double quotes"]
+ ["text.xml","tokenize multiline attribute value with double quotes"]
],[
- ["qqstring_inner","start_tag_stuff"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.anchor","a"],
- ["text"," "],
- ["entity.other.attribute-name","href"],
- ["keyword.operator.separator","="],
- ["string","\"abc{{xyz}}"]
+ ["string.attribute-value.xml0","tag_stuff"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.anchor.tag-name.xml","a"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","href"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"abc{{xyz}}"]
],[
"start",
- ["string","def\""],
- ["meta.tag.punctuation.end",">"]
+ ["string.attribute-value.xml","def\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text","tokenize multiline attribute value with single quotes"]
+ ["text.xml","tokenize multiline attribute value with single quotes"]
],[
- ["qstring_inner","start_tag_stuff"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.anchor","a"],
- ["text"," "],
- ["entity.other.attribute-name","href"],
- ["keyword.operator.separator","="],
- ["string","'abc"]
+ ["string.attribute-value.xml","tag_stuff"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.anchor.tag-name.xml","a"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","href"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","'abc"]
],[
"start",
- ["string","def\\\"'"],
- ["meta.tag.punctuation.end",">"]
+ ["string.attribute-value.xml","def\\\"'"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
]]
\ No newline at end of file
diff --git a/lib/ace/mode/_test/tokens_ejs.json b/lib/ace/mode/_test/tokens_ejs.json
index ee0be491..7e54af91 100644
--- a/lib/ace/mode/_test/tokens_ejs.json
+++ b/lib/ace/mode/_test/tokens_ejs.json
@@ -1,90 +1,90 @@
[[
"start",
- ["punctuation.doctype.begin",""]
+ ["xml-pe.doctype.xml",""]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","html"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","html"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","head"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","head"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","title"],
- ["meta.tag.punctuation.end",">"],
- ["text","Cloud9 Rocks!"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","title"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","title"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Cloud9 Rocks!"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","title"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","head"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","head"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","body"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","body"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","table"],
- ["text"," "],
- ["entity.other.attribute-name","class"],
- ["keyword.operator.separator","="],
- ["string","\"table\""],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","table"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","class"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"table\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","tr"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","tr"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","th"],
- ["meta.tag.punctuation.end",">"],
- ["text","Name"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","th"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","th"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Name"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","th"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","th"],
- ["meta.tag.punctuation.end",">"],
- ["text","Size"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","th"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","th"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Size"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","th"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","tr"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","tr"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["markup.list.meta.tag","<%"],
["text"," "],
["keyword","if"],
@@ -99,51 +99,51 @@
["markup.list.meta.tag","%>"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","tr"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","tr"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.anchor","a"],
- ["text"," "],
- ["entity.other.attribute-name","href"],
- ["keyword.operator.separator","="],
- ["string","\"..\""],
- ["meta.tag.punctuation.end",">"],
- ["text",".."],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.anchor","a"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.anchor.tag-name.xml","a"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","href"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"..\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml",".."],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.anchor.tag-name.xml","a"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","tr"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","tr"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["markup.list.meta.tag","<%"],
["text"," "],
["paren.rparen","}"],
@@ -151,7 +151,7 @@
["markup.list.meta.tag","%>"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["markup.list.meta.tag","<%"],
["text"," "],
["identifier","entries"],
@@ -168,25 +168,25 @@
["markup.list.meta.tag","%>"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","tr"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","tr"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","span"],
- ["text"," "],
- ["entity.other.attribute-name","class"],
- ["keyword.operator.separator","="],
- ["string","\"glyphicon "],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","span"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","class"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"glyphicon "],
["markup.list.meta.tag","<%="],
["text"," "],
["identifier","entry"],
@@ -204,20 +204,20 @@
["text"," "],
["string","'file'"],
["markup.list.meta.tag","%>"],
- ["string","\""],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","span"],
- ["meta.tag.punctuation.end",">"]
+ ["string.attribute-value.xml","\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","span"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.anchor","a"],
- ["text"," "],
- ["entity.other.attribute-name","href"],
- ["keyword.operator.separator","="],
- ["string","\""],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.anchor.tag-name.xml","a"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","href"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\""],
["markup.list.meta.tag","<%="],
["text"," "],
["identifier","entry"],
@@ -225,8 +225,8 @@
["identifier","name"],
["text"," "],
["markup.list.meta.tag","%>"],
- ["string","\""],
- ["meta.tag.punctuation.end",">"],
+ ["string.attribute-value.xml","\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["markup.list.meta.tag","<%="],
["text"," "],
["identifier","entry"],
@@ -234,21 +234,21 @@
["identifier","name"],
["text"," "],
["markup.list.meta.tag","%>"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.anchor","a"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.anchor.tag-name.xml","a"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["markup.list.meta.tag","<%="],
["text"," "],
["identifier","entry"],
@@ -256,18 +256,18 @@
["identifier","size"],
["text"," "],
["markup.list.meta.tag","%>"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","tr"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","tr"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["markup.list.meta.tag","<%"],
["text"," "],
["paren.rparen","})"],
@@ -275,22 +275,22 @@
["markup.list.meta.tag","%>"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","table"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","table"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "]
+ ["text.xml"," "]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","body"],
- ["meta.tag.punctuation.end",">"]
+ ["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.begin",""],
- ["meta.tag.name","html"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","html"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
]]
\ No newline at end of file
diff --git a/lib/ace/mode/_test/tokens_ftl.json b/lib/ace/mode/_test/tokens_ftl.json
index eb81f1fb..75e7a6f1 100644
--- a/lib/ace/mode/_test/tokens_ftl.json
+++ b/lib/ace/mode/_test/tokens_ftl.json
@@ -43,110 +43,110 @@
"start"
],[
"start",
- ["punctuation.doctype.begin",""]
+ ["xml-pe.doctype.xml",""]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","html"],
- ["text"," "],
- ["entity.other.attribute-name","lang"],
- ["keyword.operator.separator","="],
- ["string","\"en-us\""],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","html"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","lang"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"en-us\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","head"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","head"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","meta"],
- ["text"," "],
- ["entity.other.attribute-name","charset"],
- ["keyword.operator.separator","="],
- ["string","\"utf-8\""],
- ["text"," "],
- ["meta.tag.punctuation.end","/>"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","meta"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","charset"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"utf-8\""],
+ ["text.tag-whitespace.xml"," "],
+ ["meta.tag.punctuation.tag-close.xml","/>"]
],[
"start",
- ["text"," "]
+ ["text.xml"," "]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","title"],
- ["meta.tag.punctuation.end",">"],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","title"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["string.interpolated","${"],
["variable","title"],
["keyword.operator","!"],
["string","\"FreeMarker\""],
["string.interpolated","}"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","title"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","title"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","head"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","head"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "]
+ ["text.xml"," "]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","body"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","body"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "]
+ ["text.xml"," "]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","h1"],
- ["meta.tag.punctuation.end",">"],
- ["text","Hello "],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","h1"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Hello "],
["string.interpolated","${"],
["variable","name"],
["keyword.operator","!"],
["string","\"\""],
["string.interpolated","}"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","h1"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","h1"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "]
+ ["text.xml"," "]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"],
- ["text","Today is: "],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Today is: "],
["string.interpolated","${"],
["language.variable",".now"],
["support.function","?date"],
["string.interpolated","}"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "]
+ ["text.xml"," "]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["keyword.function","<#assign"],
["text"," "],
["variable","x"],
@@ -157,7 +157,7 @@
["keyword",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["keyword.function","<#if"],
["text"," "],
["variable","x"],
@@ -174,7 +174,7 @@
["text"," "],
["constant.numeric","14"],
["keyword",">"],
- ["text","x equals 13: "],
+ ["text.xml","x equals 13: "],
["string.interpolated","${"],
["variable","x"],
["string.interpolated","}"],
@@ -182,16 +182,16 @@
["keyword",">"]
],[
"start",
- ["text"," "]
+ ["text.xml"," "]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","ul"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","ul"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["keyword.function","<#list"],
["text"," "],
["variable","items"],
@@ -202,14 +202,14 @@
["keyword",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","li"],
- ["meta.tag.punctuation.end",">"],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","li"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["string.interpolated","${"],
["variable","item_index"],
["string.interpolated","}"],
- ["text",": "],
+ ["text.xml",": "],
["string.interpolated","${"],
["variable","item.name"],
["keyword.operator","!"],
@@ -223,26 +223,26 @@
["constant.numeric","0"],
["paren.rparen","]"],
["string.interpolated","}"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","li"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","li"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["keyword.function","#list"],
["keyword",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","ul"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","ul"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "]
+ ["text.xml"," "]
],[
"start",
- ["text"," User directive: "],
+ ["text.xml"," User directive: "],
["keyword.other","<@lib.function"],
["text"," "],
["variable","attr1"],
@@ -257,21 +257,21 @@
["keyword.operator","="],
["constant.numeric","-42.12"],
["keyword",">"],
- ["text","Test"],
+ ["text.xml","Test"],
["keyword.other","@lib.function"],
["keyword",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["keyword.other","<@anotherOne"],
["text"," "],
["keyword","/>"]
],[
"start",
- ["text"," "]
+ ["text.xml"," "]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["keyword.function","<#if"],
["text"," "],
["variable","variable"],
@@ -279,10 +279,10 @@
["keyword",">"]
],[
"start",
- ["text"," Deprecated"]
+ ["text.xml"," Deprecated"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["keyword.function","<#elseif"],
["text"," "],
["variable","variable"],
@@ -290,52 +290,52 @@
["keyword",">"]
],[
"start",
- ["text"," Better"]
+ ["text.xml"," Better"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["keyword.function","<#else"],
["keyword",">"]
],[
"start",
- ["text"," Default"]
+ ["text.xml"," Default"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["keyword.function","#if"],
["keyword",">"]
],[
"start",
- ["text"," "]
+ ["text.xml"," "]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.image","img"],
- ["text"," "],
- ["entity.other.attribute-name","src"],
- ["keyword.operator.separator","="],
- ["string","\"images/"],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.image.tag-name.xml","img"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","src"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"images/"],
["string.interpolated","${"],
["variable","user.id"],
["string.interpolated","}"],
- ["string",".png\""],
- ["text"," "],
- ["meta.tag.punctuation.end","/>"]
+ ["string.attribute-value.xml",".png\""],
+ ["text.tag-whitespace.xml"," "],
+ ["meta.tag.punctuation.tag-close.xml","/>"]
],[
"start",
- ["text"," "]
+ ["text.xml"," "]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","body"],
- ["meta.tag.punctuation.end",">"]
+ ["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.begin",""],
- ["meta.tag.name","html"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","html"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
]]
\ No newline at end of file
diff --git a/lib/ace/mode/_test/tokens_handlebars.json b/lib/ace/mode/_test/tokens_handlebars.json
index babcd88b..ef8cb82a 100644
--- a/lib/ace/mode/_test/tokens_handlebars.json
+++ b/lib/ace/mode/_test/tokens_handlebars.json
@@ -7,16 +7,16 @@
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","div"],
- ["text"," "],
- ["entity.other.attribute-name","id"],
- ["keyword.operator.separator","="],
- ["string","\"comments\""],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","div"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","id"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"comments\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["storage.type.start","{{#"],
["variable.parameter","each"],
["text"," "],
@@ -24,58 +24,58 @@
["storage.type.end","}}"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.anchor","a"],
- ["text"," "],
- ["entity.other.attribute-name","href"],
- ["keyword.operator.separator","="],
- ["string","\"/posts/"],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.anchor.tag-name.xml","a"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","href"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"/posts/"],
["storage.type.start","{{"],
["text","../"],
["variable.parameter","permalink"],
["storage.type.end","}}"],
- ["string","#"],
+ ["string.attribute-value.xml","#"],
["storage.type.start","{{"],
["variable.parameter","id"],
["storage.type.end","}}"],
- ["string","\""],
- ["meta.tag.punctuation.end",">"],
+ ["string.attribute-value.xml","\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["storage.type.start","{{"],
["variable.parameter","title"],
["storage.type.end","}}"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.anchor","a"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.anchor.tag-name.xml","a"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","div"],
- ["meta.tag.punctuation.end",">"],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","div"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["storage.type.start","{{"],
["variable.parameter","body"],
["storage.type.end","}}"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","div"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","div"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["storage.type.start","{{/"],
["variable.parameter","each"],
["storage.type.end","}}"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","div"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","div"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
]]
\ No newline at end of file
diff --git a/lib/ace/mode/_test/tokens_html.json b/lib/ace/mode/_test/tokens_html.json
index 794ba26d..d45ae52b 100644
--- a/lib/ace/mode/_test/tokens_html.json
+++ b/lib/ace/mode/_test/tokens_html.json
@@ -1,51 +1,51 @@
[[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","html"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","html"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.script","script"],
- ["text"," "],
- ["entity.other.attribute-name","a"],
- ["keyword.operator.separator","="],
- ["string","'a'"],
- ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.script.tag-name.xml","script"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","a"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","'a'"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["storage.type","var"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.script","script"],
- ["meta.tag.punctuation.end",">"],
- ["text","'123'"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.script.tag-name.xml","script"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","'123'"]
],[
- ["qqstring_inner","start_tag_stuff"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.anchor","a"],
- ["text"," "],
- ["entity.other.attribute-name","href"],
- ["keyword.operator.separator","="],
- ["string","\"abc"]
+ ["string.attribute-value.xml0","tag_stuff"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.anchor.tag-name.xml","a"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","href"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"abc"]
],[
"start",
- ["string"," def\""],
- ["meta.tag.punctuation.end",">"]
+ ["string.attribute-value.xml"," def\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
- ["qstring_inner","start_tag_stuff"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.anchor","a"],
- ["text"," "],
- ["entity.other.attribute-name","href"],
- ["keyword.operator.separator","="],
- ["string","'abc"]
+ ["string.attribute-value.xml","tag_stuff"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.anchor.tag-name.xml","a"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","href"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","'abc"]
],[
"start",
- ["string","def\\'"],
- ["meta.tag.punctuation.end",">"]
+ ["string.attribute-value.xml","def\\'"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","html"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","html"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
]]
\ No newline at end of file
diff --git a/lib/ace/mode/_test/tokens_html_ruby.json b/lib/ace/mode/_test/tokens_html_ruby.json
index 619fb5dc..2c74ba56 100644
--- a/lib/ace/mode/_test/tokens_html_ruby.json
+++ b/lib/ace/mode/_test/tokens_html_ruby.json
@@ -1,82 +1,82 @@
[[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","h1"],
- ["meta.tag.punctuation.end",">"],
- ["text","Listing Books"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","h1"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","h1"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Listing Books"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","h1"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "]
+ ["text.xml"," "]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","table"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","table"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","tr"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","tr"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","th"],
- ["meta.tag.punctuation.end",">"],
- ["text","Title"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","th"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","th"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Title"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","th"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","th"],
- ["meta.tag.punctuation.end",">"],
- ["text","Summary"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","th"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","th"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Summary"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","th"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","th"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","th"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","th"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","th"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","th"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","th"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","th"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","th"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","th"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","th"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","th"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","th"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","tr"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","tr"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "]
+ ["text.xml"," "]
],[
"start",
["support.ruby_tag","<%"],
@@ -92,22 +92,22 @@
["support.ruby_tag","%>"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","tr"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","tr"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["comment.start.erb","<%#"],
["comment"," comment "],
["comment.end.erb","%>"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["support.ruby_tag","<%="],
["text"," "],
["identifier","book"],
@@ -115,15 +115,15 @@
["identifier","title"],
["text"," "],
["support.ruby_tag","%>"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["support.ruby_tag","<%="],
["text"," "],
["identifier","book"],
@@ -131,15 +131,15 @@
["identifier","content"],
["text"," "],
["support.ruby_tag","%>"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["support.ruby_tag","<%="],
["text"," "],
["support.function","link_to"],
@@ -149,15 +149,15 @@
["identifier","book"],
["text"," "],
["support.ruby_tag","%>"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["support.ruby_tag","<%="],
["text"," "],
["support.function","link_to"],
@@ -170,15 +170,15 @@
["paren.rparen",")"],
["text"," "],
["support.ruby_tag","%>"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["support.ruby_tag","<%="],
["text"," "],
["support.function","link_to"],
@@ -200,15 +200,15 @@
["constant.other.symbol.ruby",":delete"],
["text"," "],
["support.ruby_tag","%>"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","tr"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","tr"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
["support.ruby_tag","<%"],
@@ -218,21 +218,21 @@
["support.ruby_tag","%>"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","table"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","table"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "]
+ ["text.xml"," "]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","br"],
- ["text"," "],
- ["meta.tag.punctuation.end","/>"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","br"],
+ ["text.tag-whitespace.xml"," "],
+ ["meta.tag.punctuation.tag-close.xml","/>"]
],[
"start",
- ["text"," "]
+ ["text.xml"," "]
],[
"start",
["support.ruby_tag","<%="],
diff --git a/lib/ace/mode/_test/tokens_jsp.json b/lib/ace/mode/_test/tokens_jsp.json
index cd556e46..25d3af4d 100644
--- a/lib/ace/mode/_test/tokens_jsp.json
+++ b/lib/ace/mode/_test/tokens_jsp.json
@@ -1,19 +1,19 @@
[[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","html"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","html"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","body"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","body"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"js-start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.script","script"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.script.tag-name.xml","script"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"js-start",
["text"," "],
@@ -40,15 +40,15 @@
],[
"start",
["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.script","script"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.script.tag-name.xml","script"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"css-start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.style","style"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.style.tag-name.xml","style"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
["css-ruleset","css-start"],
["text"," "],
@@ -69,20 +69,20 @@
],[
"start",
["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.style","style"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.style.tag-name.xml","style"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," Today's date: "],
+ ["text.xml"," Today's date: "],
["meta.tag","<%"],
["keyword.operator","="],
["text"," "],
@@ -103,13 +103,13 @@
["meta.tag","%>"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["meta.tag","<%"],
["keyword.operator","!"],
["text"," "],
@@ -124,7 +124,7 @@
["meta.tag","%>"]
],[
"jsp-start",
- ["text"," "],
+ ["text.xml"," "],
["meta.tag",""]
],[
"jsp-start",
@@ -145,11 +145,11 @@
"start"
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["comment","<%-- This is JSP comment --%>"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["meta.tag","<%@"],
["text"," "],
["identifier","directive"],
@@ -163,161 +163,161 @@
"start"
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"],
- ["text","Select Languages:"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Select Languages:"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.form","form"],
- ["text"," "],
- ["entity.other.attribute-name","ACTION"],
- ["keyword.operator.separator","="],
- ["string","\"jspCheckBox.jsp\""],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.form.tag-name.xml","form"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","ACTION"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"jspCheckBox.jsp\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.form","input"],
- ["text"," "],
- ["entity.other.attribute-name","type"],
- ["keyword.operator.separator","="],
- ["string","\"checkbox\""],
- ["text"," "],
- ["entity.other.attribute-name","name"],
- ["keyword.operator.separator","="],
- ["string","\"id\""],
- ["text"," "],
- ["entity.other.attribute-name","value"],
- ["keyword.operator.separator","="],
- ["string","\"Java\""],
- ["meta.tag.punctuation.end",">"],
- ["text"," Java"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","BR"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.form.tag-name.xml","input"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","type"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"checkbox\""],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","name"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"id\""],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","value"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"Java\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml"," Java"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","BR"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.form","input"],
- ["text"," "],
- ["entity.other.attribute-name","type"],
- ["keyword.operator.separator","="],
- ["string","\"checkbox\""],
- ["text"," "],
- ["entity.other.attribute-name","name"],
- ["keyword.operator.separator","="],
- ["string","\"id\""],
- ["text"," "],
- ["entity.other.attribute-name","value"],
- ["keyword.operator.separator","="],
- ["string","\".NET\""],
- ["meta.tag.punctuation.end",">"],
- ["text"," .NET"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","BR"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.form.tag-name.xml","input"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","type"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"checkbox\""],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","name"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"id\""],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","value"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\".NET\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml"," .NET"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","BR"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.form","input"],
- ["text"," "],
- ["entity.other.attribute-name","type"],
- ["keyword.operator.separator","="],
- ["string","\"checkbox\""],
- ["text"," "],
- ["entity.other.attribute-name","name"],
- ["keyword.operator.separator","="],
- ["string","\"id\""],
- ["text"," "],
- ["entity.other.attribute-name","value"],
- ["keyword.operator.separator","="],
- ["string","\"PHP\""],
- ["meta.tag.punctuation.end",">"],
- ["text"," PHP"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","BR"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.form.tag-name.xml","input"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","type"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"checkbox\""],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","name"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"id\""],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","value"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"PHP\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml"," PHP"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","BR"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.form","input"],
- ["text"," "],
- ["entity.other.attribute-name","type"],
- ["keyword.operator.separator","="],
- ["string","\"checkbox\""],
- ["text"," "],
- ["entity.other.attribute-name","name"],
- ["keyword.operator.separator","="],
- ["string","\"id\""],
- ["text"," "],
- ["entity.other.attribute-name","value"],
- ["keyword.operator.separator","="],
- ["string","\"C/C++\""],
- ["meta.tag.punctuation.end",">"],
- ["text"," C/C++"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","BR"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.form.tag-name.xml","input"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","type"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"checkbox\""],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","name"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"id\""],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","value"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"C/C++\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml"," C/C++"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","BR"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.form","input"],
- ["text"," "],
- ["entity.other.attribute-name","type"],
- ["keyword.operator.separator","="],
- ["string","\"checkbox\""],
- ["text"," "],
- ["entity.other.attribute-name","name"],
- ["keyword.operator.separator","="],
- ["string","\"id\""],
- ["text"," "],
- ["entity.other.attribute-name","value"],
- ["keyword.operator.separator","="],
- ["string","\"PERL\""],
- ["meta.tag.punctuation.end",">"],
- ["text"," PERL "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","BR"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.form.tag-name.xml","input"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","type"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"checkbox\""],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","name"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"id\""],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","value"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"PERL\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml"," PERL "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","BR"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.form","input"],
- ["text"," "],
- ["entity.other.attribute-name","type"],
- ["keyword.operator.separator","="],
- ["string","\"submit\""],
- ["text"," "],
- ["entity.other.attribute-name","value"],
- ["keyword.operator.separator","="],
- ["string","\"Submit\""],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.form.tag-name.xml","input"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","type"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"submit\""],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","value"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"Submit\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.form","form"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.form.tag-name.xml","form"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"jsp-start",
- ["text"," "],
+ ["text.xml"," "],
["meta.tag","<%"]
],[
"jsp-start",
@@ -424,12 +424,12 @@
["meta.tag","%>"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","body"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","body"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","html"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","html"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
]]
\ No newline at end of file
diff --git a/lib/ace/mode/_test/tokens_liquid.json b/lib/ace/mode/_test/tokens_liquid.json
index a87c051d..30d003cb 100644
--- a/lib/ace/mode/_test/tokens_liquid.json
+++ b/lib/ace/mode/_test/tokens_liquid.json
@@ -1,56 +1,56 @@
[[
"start",
- ["text","The following examples can be found in full at http://liquidmarkup.org/"]
+ ["text.xml","The following examples can be found in full at http://liquidmarkup.org/"]
],[
"start"
],[
"start",
- ["text","Liquid is an extraction from the e-commerce system Shopify."]
+ ["text.xml","Liquid is an extraction from the e-commerce system Shopify."]
],[
"start",
- ["text","Shopify powers many thousands of e-commerce stores which all call for unique designs."]
+ ["text.xml","Shopify powers many thousands of e-commerce stores which all call for unique designs."]
],[
"start",
- ["text","For this we developed Liquid which allows our customers complete design freedom while"]
+ ["text.xml","For this we developed Liquid which allows our customers complete design freedom while"]
],[
"start",
- ["text","maintaining the integrity of our servers."]
+ ["text.xml","maintaining the integrity of our servers."]
],[
"start"
],[
"start",
- ["text","Liquid has been in production use since June 2006 and is now used by many other"]
+ ["text.xml","Liquid has been in production use since June 2006 and is now used by many other"]
],[
"start",
- ["text","hosted web applications."]
+ ["text.xml","hosted web applications."]
],[
"start"
],[
"start",
- ["text","It was developed for usage in Ruby on Rails web applications and integrates seamlessly"]
+ ["text.xml","It was developed for usage in Ruby on Rails web applications and integrates seamlessly"]
],[
"start",
- ["text","as a plugin but it also works excellently as a stand alone library."]
+ ["text.xml","as a plugin but it also works excellently as a stand alone library."]
],[
"start"
],[
"start",
- ["text","Here's what it looks like:"]
+ ["text.xml","Here's what it looks like:"]
],[
"start"
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","ul"],
- ["text"," "],
- ["entity.other.attribute-name","id"],
- ["keyword.operator.separator","="],
- ["string","\"products\""],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","ul"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","id"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"products\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{%"],
["text"," "],
["keyword","for"],
@@ -64,16 +64,16 @@
["variable","%}"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","li"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","li"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["variable","{{"],
["text"," "],
["identifier","product"],
@@ -81,12 +81,12 @@
["identifier","title"],
["text"," "],
["variable","}}"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," Only "],
+ ["text.xml"," Only "],
["variable","{{"],
["text"," "],
["identifier","product"],
@@ -100,10 +100,10 @@
"start"
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["variable","{{"],
["text"," "],
["identifier","product"],
@@ -117,20 +117,20 @@
["constant.numeric","200"],
["text"," "],
["variable","}}"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","li"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","li"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{%"],
["text"," "],
["keyword","endfor"],
@@ -138,34 +138,34 @@
["variable","%}"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","ul"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","ul"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start"
],[
"start",
- ["text","Some more features include:"]
+ ["text.xml","Some more features include:"]
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"],
- ["text","Filters"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Filters"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"],
- ["text"," The word \"tobi\" in uppercase: "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml"," The word \"tobi\" in uppercase: "],
["variable","{{"],
["text"," "],
["string","'tobi'"],
@@ -173,16 +173,16 @@
["support.function","upcase"],
["text"," "],
["variable","}}"],
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"],
- ["text","The word \"tobi\" has "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","The word \"tobi\" has "],
["variable","{{"],
["text"," "],
["string","'tobi'"],
@@ -190,16 +190,16 @@
["support.function","size"],
["text"," "],
["variable","}}"],
- ["text"," letters! "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," letters! "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"],
- ["text","Change \"Hello world\" to \"Hi world\": "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Change \"Hello world\" to \"Hi world\": "],
["variable","{{"],
["text"," "],
["string","'Hello world'"],
@@ -211,16 +211,16 @@
["string","'Hi'"],
["text"," "],
["variable","}}"],
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"],
- ["text","The date today is "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","The date today is "],
["variable","{{"],
["text"," "],
["string","'now'"],
@@ -230,31 +230,31 @@
["string","\"%Y %b %d\""],
["text"," "],
["variable","}}"],
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"],
- ["text","If"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","If"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{%"],
["text"," "],
["keyword","if"],
@@ -278,13 +278,13 @@
["string","'marc'"],
["text"," "],
["variable","%}"],
- ["text"," "]
+ ["text.xml"," "]
],[
"start",
- ["text"," hi marc or tobi"]
+ ["text.xml"," hi marc or tobi"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{%"],
["text"," "],
["keyword","endif"],
@@ -292,30 +292,30 @@
["variable","%}"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"],
- ["text","Case"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Case"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{%"],
["text"," "],
["keyword","case"],
@@ -325,7 +325,7 @@
["variable","%}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{%"],
["text"," "],
["keyword","when"],
@@ -335,10 +335,10 @@
["variable","%}"]
],[
"start",
- ["text"," Welcome"]
+ ["text.xml"," Welcome"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{%"],
["text"," "],
["keyword","when"],
@@ -348,7 +348,7 @@
["variable","%}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{{"],
["text"," "],
["identifier","product"],
@@ -358,7 +358,7 @@
["identifier","link_to_vendor"],
["text"," "],
["variable","}}"],
- ["text"," / "],
+ ["text.xml"," / "],
["variable","{{"],
["text"," "],
["identifier","product"],
@@ -368,7 +368,7 @@
["variable","}}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{%"],
["text"," "],
["keyword","else"],
@@ -376,7 +376,7 @@
["variable","%}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{{"],
["text"," "],
["identifier","page_title"],
@@ -384,7 +384,7 @@
["variable","}}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{%"],
["text"," "],
["keyword","endcase"],
@@ -392,30 +392,30 @@
["variable","%}"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"],
- ["text","For Loops"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","For Loops"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{%"],
["text"," "],
["keyword","for"],
@@ -427,10 +427,10 @@
["identifier","array"],
["text"," "],
["variable","%}"],
- ["text"," "]
+ ["text.xml"," "]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{{"],
["text"," "],
["identifier","item"],
@@ -438,7 +438,7 @@
["variable","}}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{%"],
["text"," "],
["keyword","endfor"],
@@ -446,30 +446,30 @@
["variable","%}"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"],
- ["text","Tables"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Tables"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{%"],
["text"," "],
["keyword","tablerow"],
@@ -487,7 +487,7 @@
["variable","%}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{%"],
["text"," "],
["keyword","if"],
@@ -499,7 +499,7 @@
["variable","%}"]
],[
"start",
- ["text"," First column: "],
+ ["text.xml"," First column: "],
["variable","{{"],
["text"," "],
["identifier","item"],
@@ -509,7 +509,7 @@
["variable","}}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{%"],
["text"," "],
["keyword","else"],
@@ -517,7 +517,7 @@
["variable","%}"]
],[
"start",
- ["text"," Different column: "],
+ ["text.xml"," Different column: "],
["variable","{{"],
["text"," "],
["identifier","item"],
@@ -527,7 +527,7 @@
["variable","}}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{%"],
["text"," "],
["keyword","endif"],
@@ -535,7 +535,7 @@
["variable","%}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable","{%"],
["text"," "],
["keyword","endtablerow"],
@@ -543,9 +543,9 @@
["variable","%}"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
]]
\ No newline at end of file
diff --git a/lib/ace/mode/_test/tokens_lsl.json b/lib/ace/mode/_test/tokens_lsl.json
index 83b7352b..93575a2c 100644
--- a/lib/ace/mode/_test/tokens_lsl.json
+++ b/lib/ace/mode/_test/tokens_lsl.json
@@ -1,6 +1,6 @@
[[
"comment",
- ["comment.block.lsl","/*"]
+ ["comment.block.begin.lsl","/*"]
],[
"comment",
["comment.block.lsl"," Testing syntax highlighting"]
@@ -12,7 +12,7 @@
["comment.block.lsl"," for the Linden Scripting Language"]
],[
"start",
- ["comment.block.lsl","*/"]
+ ["comment.block.end.lsl","*/"]
],[
"start"
],[
@@ -51,14 +51,14 @@
"start",
["storage.type.lsl","integer"],
["text.lsl"," "],
- ["invalid.unimplemented.lsl","event"],
+ ["invalid.illegal.lsl","event"],
["text.lsl"," "],
["keyword.operator.lsl","="],
["text.lsl"," "],
["constant.numeric.lsl","5673"],
["punctuation.operator.lsl",";"],
["text.lsl"," "],
- ["comment.line.double-slash.lsl","// unimplemented reserved keyword!"]
+ ["comment.line.double-slash.lsl","// invalid.illegal"]
],[
"start"
],[
@@ -368,14 +368,14 @@
],[
"start",
["text.lsl"," "],
- ["invalid.unimplemented.lsl","event"],
+ ["invalid.illegal.lsl","event"],
["text.lsl"," "],
["keyword.operator.lsl","="],
["text.lsl"," "],
["constant.numeric.lsl","5673"],
["punctuation.operator.lsl",";"],
["text.lsl"," "],
- ["comment.line.double-slash.lsl","// unimplemented reserved keyword!"]
+ ["comment.line.double-slash.lsl","// invalid.illegal"]
],[
"start"
],[
@@ -401,13 +401,21 @@
],[
"start",
["text.lsl"," "],
- ["invalid.deprecated.lsl","llCloud"],
+ ["reserved.godmode.lsl","llSetInventoryPermMask"],
["paren.lparen.lsl","("],
- ["constant.language.vector.lsl","ZERO_VECTOR"],
+ ["string.quoted.double.lsl.start","\""],
+ ["string.quoted.double.lsl","some item"],
+ ["string.quoted.double.lsl.end","\""],
+ ["punctuation.operator.lsl",","],
+ ["text.lsl"," "],
+ ["constant.language.integer.lsl","MASK_NEXT"],
+ ["punctuation.operator.lsl",","],
+ ["text.lsl"," "],
+ ["constant.language.integer.lsl","PERM_ALL"],
["paren.rparen.lsl",")"],
["punctuation.operator.lsl",";"],
- ["text.lsl"," "],
- ["comment.line.double-slash.lsl","// invalid deprecated function!"]
+ ["text.lsl"," "],
+ ["comment.line.double-slash.lsl","// reserved.godmode"]
],[
"start"
],[
@@ -420,9 +428,9 @@
["text.lsl"," "],
["string.quoted.double.lsl.start","\""],
["string.quoted.double.lsl","Leaving "],
- ["constant.language.escape.lsl","\\\""],
+ ["constant.character.escape.lsl","\\\""],
["string.quoted.double.lsl","default"],
- ["constant.language.escape.lsl","\\\""],
+ ["constant.character.escape.lsl","\\\""],
["string.quoted.double.lsl"," now..."],
["string.quoted.double.lsl.end","\""],
["paren.rparen.lsl",")"],
@@ -467,13 +475,13 @@
["text.lsl"," "],
["string.quoted.double.lsl.start","\""],
["string.quoted.double.lsl","Entered "],
- ["constant.language.escape.lsl","\\\""],
+ ["constant.character.escape.lsl","\\\""],
["string.quoted.double.lsl","state other"],
- ["constant.language.escape.lsl","\\\""],
+ ["constant.character.escape.lsl","\\\""],
["string.quoted.double.lsl",", returning to "],
- ["constant.language.escape.lsl","\\\""],
+ ["constant.character.escape.lsl","\\\""],
["string.quoted.double.lsl","default"],
- ["constant.language.escape.lsl","\\\""],
+ ["constant.character.escape.lsl","\\\""],
["string.quoted.double.lsl"," again..."],
["string.quoted.double.lsl.end","\""],
["paren.rparen.lsl",")"],
@@ -492,4 +500,4 @@
["paren.rparen.lsl","}"]
],[
"start"
-]]
\ No newline at end of file
+]]
diff --git a/lib/ace/mode/_test/tokens_luapage.json b/lib/ace/mode/_test/tokens_luapage.json
index 3cee0815..1fa765dd 100644
--- a/lib/ace/mode/_test/tokens_luapage.json
+++ b/lib/ace/mode/_test/tokens_luapage.json
@@ -1,24 +1,24 @@
[[
"doctype",
- ["text",""],
- ["punctuation.doctype.begin",""]
+ ["text.whitespace.xml"," "],
+ ["string.xml","\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\""],
+ ["xml-pe.doctype.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","html"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","html"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
["lua-bracketedComment",2,"lua-start"],
["keyword","<%"],
@@ -37,32 +37,32 @@
["keyword","%>"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","head"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","head"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","title"],
- ["meta.tag.punctuation.end",">"],
- ["text","Reference"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","title"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","title"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Reference"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","title"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","link"],
- ["text"," "],
- ["entity.other.attribute-name","rel"],
- ["keyword.operator.separator","="],
- ["string","\"stylesheet\""],
- ["text"," "],
- ["entity.other.attribute-name","href"],
- ["keyword.operator.separator","="],
- ["string","\""],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","link"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","rel"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"stylesheet\""],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","href"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\""],
["keyword","<%="],
["identifier","luadoc"],
["text","."],
@@ -75,129 +75,129 @@
["string","\"luadoc.css\""],
["paren.rparen",")"],
["keyword","%>"],
- ["string","\""],
- ["text"," "],
- ["entity.other.attribute-name","type"],
- ["keyword.operator.separator","="],
- ["string","\"text/css\""],
- ["text"," "],
- ["meta.tag.punctuation.end","/>"]
+ ["string.attribute-value.xml","\""],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","type"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"text/css\""],
+ ["text.tag-whitespace.xml"," "],
+ ["meta.tag.punctuation.tag-close.xml","/>"]
],[
"start",
- ["text","\t"],
- ["comment",""]
+ ["text.xml","\t"],
+ ["comment.xml",""]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","head"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","head"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","body"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","body"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","div"],
- ["text"," "],
- ["entity.other.attribute-name","id"],
- ["keyword.operator.separator","="],
- ["string","\"container\""],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","div"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","id"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"container\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","div"],
- ["text"," "],
- ["entity.other.attribute-name","id"],
- ["keyword.operator.separator","="],
- ["string","\"product\""],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","div"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","id"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"product\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text","\t"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","div"],
- ["text"," "],
- ["entity.other.attribute-name","id"],
- ["keyword.operator.separator","="],
- ["string","\"product_logo\""],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","div"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml","\t"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","div"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","id"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"product_logo\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","div"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text","\t"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","div"],
- ["text"," "],
- ["entity.other.attribute-name","id"],
- ["keyword.operator.separator","="],
- ["string","\"product_name\""],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","big"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","b"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","b"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","big"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","div"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml","\t"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","div"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","id"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"product_name\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","big"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","b"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","b"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","big"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","div"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text","\t"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","div"],
- ["text"," "],
- ["entity.other.attribute-name","id"],
- ["keyword.operator.separator","="],
- ["string","\"product_description\""],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","div"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml","\t"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","div"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","id"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"product_description\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","div"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","div"],
- ["meta.tag.punctuation.end",">"],
- ["text"," "],
- ["comment",""]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","div"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml"," "],
+ ["comment.xml",""]
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","div"],
- ["text"," "],
- ["entity.other.attribute-name","id"],
- ["keyword.operator.separator","="],
- ["string","\"main\""],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","div"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","id"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"main\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","div"],
- ["text"," "],
- ["entity.other.attribute-name","id"],
- ["keyword.operator.separator","="],
- ["string","\"navigation\""],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","div"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","id"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"navigation\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
["keyword","<%="],
@@ -223,22 +223,22 @@
"start"
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","div"],
- ["meta.tag.punctuation.end",">"],
- ["text"," "],
- ["comment",""]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","div"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml"," "],
+ ["comment.xml",""]
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","div"],
- ["text"," "],
- ["entity.other.attribute-name","id"],
- ["keyword.operator.separator","="],
- ["string","\"content\""],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","div"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","id"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"content\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
@@ -267,25 +267,25 @@
["keyword","then%>"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"],
- ["text","Modules"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Modules"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","table"],
- ["text"," "],
- ["entity.other.attribute-name","class"],
- ["keyword.operator.separator","="],
- ["string","\"module_list\""],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","table"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","class"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"module_list\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["comment",""]
+ ["comment.xml",""]
],[
"start",
["keyword","<%for"],
@@ -306,26 +306,26 @@
["keyword","do%>"]
],[
"start",
- ["text","\t"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","tr"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml","\t"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","tr"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text","\t\t"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","td"],
- ["text"," "],
- ["entity.other.attribute-name","class"],
- ["keyword.operator.separator","="],
- ["string","\"name\""],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.anchor","a"],
- ["text"," "],
- ["entity.other.attribute-name","href"],
- ["keyword.operator.separator","="],
- ["string","\""],
+ ["text.xml","\t\t"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","class"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"name\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.anchor.tag-name.xml","a"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","href"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\""],
["keyword","<%="],
["identifier","luadoc"],
["text","."],
@@ -340,27 +340,27 @@
["identifier","doc"],
["paren.rparen",")"],
["keyword","%>"],
- ["string","\""],
- ["meta.tag.punctuation.end",">"],
+ ["string.attribute-value.xml","\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["keyword","<%="],
["identifier","modulename"],
["keyword","%>"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.anchor","a"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.anchor.tag-name.xml","a"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text","\t\t"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","td"],
- ["text"," "],
- ["entity.other.attribute-name","class"],
- ["keyword.operator.separator","="],
- ["string","\"summary\""],
- ["meta.tag.punctuation.end",">"],
+ ["text.xml","\t\t"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","class"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"summary\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["keyword","<%="],
["identifier","doc"],
["text","."],
@@ -371,23 +371,23 @@
["text","."],
["identifier","summary"],
["keyword","%>"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text","\t"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","tr"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml","\t"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","tr"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
["keyword","<%end%>"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","table"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","table"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
["keyword","<%end%>"]
@@ -421,25 +421,25 @@
["keyword","then%>"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"],
- ["text","Files"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","h2"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Files"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","h2"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","table"],
- ["text"," "],
- ["entity.other.attribute-name","class"],
- ["keyword.operator.separator","="],
- ["string","\"file_list\""],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","table"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","class"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"file_list\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["comment",""]
+ ["comment.xml",""]
],[
"start",
["keyword","<%for"],
@@ -460,26 +460,26 @@
["keyword","do%>"]
],[
"start",
- ["text","\t"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","tr"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml","\t"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","tr"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text","\t\t"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","td"],
- ["text"," "],
- ["entity.other.attribute-name","class"],
- ["keyword.operator.separator","="],
- ["string","\"name\""],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.anchor","a"],
- ["text"," "],
- ["entity.other.attribute-name","href"],
- ["keyword.operator.separator","="],
- ["string","\""],
+ ["text.xml","\t\t"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","class"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"name\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.anchor.tag-name.xml","a"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","href"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\""],
["keyword","<%="],
["identifier","luadoc"],
["text","."],
@@ -492,44 +492,44 @@
["identifier","filepath"],
["paren.rparen",")"],
["keyword","%>"],
- ["string","\""],
- ["meta.tag.punctuation.end",">"],
+ ["string.attribute-value.xml","\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["keyword","<%="],
["identifier","filepath"],
["keyword","%>"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.anchor","a"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.anchor.tag-name.xml","a"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text","\t\t"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.table","td"],
- ["text"," "],
- ["entity.other.attribute-name","class"],
- ["keyword.operator.separator","="],
- ["string","\"summary\""],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","td"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml","\t\t"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","class"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"summary\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","td"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text","\t"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","tr"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml","\t"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","tr"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
["keyword","<%end%>"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.table","table"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.table.tag-name.xml","table"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
["keyword","<%end%>"]
@@ -537,97 +537,97 @@
"start"
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","div"],
- ["meta.tag.punctuation.end",">"],
- ["text"," "],
- ["comment",""]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","div"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml"," "],
+ ["comment.xml",""]
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","div"],
- ["meta.tag.punctuation.end",">"],
- ["text"," "],
- ["comment",""]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","div"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml"," "],
+ ["comment.xml",""]
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","div"],
- ["text"," "],
- ["entity.other.attribute-name","id"],
- ["keyword.operator.separator","="],
- ["string","\"about\""],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","div"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","id"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"about\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text","\t"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.anchor","a"],
- ["text"," "],
- ["entity.other.attribute-name","href"],
- ["keyword.operator.separator","="],
- ["string","\"http://validator.w3.org/check?uri=referer\""],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.image","img"],
- ["text"," "],
- ["entity.other.attribute-name","src"],
- ["keyword.operator.separator","="],
- ["string","\"http://www.w3.org/Icons/valid-xhtml10\""],
- ["text"," "],
- ["entity.other.attribute-name","alt"],
- ["keyword.operator.separator","="],
- ["string","\"Valid XHTML 1.0!\""],
- ["text"," "],
- ["entity.other.attribute-name","height"],
- ["keyword.operator.separator","="],
- ["string","\"31\""],
- ["text"," "],
- ["entity.other.attribute-name","width"],
- ["keyword.operator.separator","="],
- ["string","\"88\""],
- ["text"," "],
- ["meta.tag.punctuation.end","/>"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.anchor","a"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml","\t"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.anchor.tag-name.xml","a"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","href"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"http://validator.w3.org/check?uri=referer\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.image.tag-name.xml","img"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","src"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"http://www.w3.org/Icons/valid-xhtml10\""],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","alt"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"Valid XHTML 1.0!\""],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","height"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"31\""],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","width"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"88\""],
+ ["text.tag-whitespace.xml"," "],
+ ["meta.tag.punctuation.tag-close.xml","/>"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.anchor.tag-name.xml","a"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","div"],
- ["meta.tag.punctuation.end",">"],
- ["text"," "],
- ["comment",""]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","div"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml"," "],
+ ["comment.xml",""]
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","div"],
- ["meta.tag.punctuation.end",">"],
- ["text"," "],
- ["comment",""],
- ["text","\t"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","div"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml"," "],
+ ["comment.xml",""],
+ ["text.xml","\t"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","body"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","body"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","html"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","html"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
]]
\ No newline at end of file
diff --git a/lib/ace/mode/_test/tokens_markdown.json b/lib/ace/mode/_test/tokens_markdown.json
index 05804dca..29e878b2 100644
--- a/lib/ace/mode/_test/tokens_markdown.json
+++ b/lib/ace/mode/_test/tokens_markdown.json
@@ -1,49 +1,49 @@
[[
"start",
- ["text","test: header 1 "]
+ ["text.xml","test: header 1 "]
],[
"start",
["markup.heading.1","#"],
["heading","f"]
],[
"start",
- ["text","test: header 2"]
+ ["text.xml","test: header 2"]
],[
"start",
["markup.heading.2","##"],
["heading"," foo"]
],[
"start",
- ["text","test: header ends with ' #'"]
+ ["text.xml","test: header ends with ' #'"]
],[
"start",
["markup.heading.1","#"],
["heading"," # # "]
],[
"start",
- ["text","test: header ends with '#'"]
+ ["text.xml","test: header ends with '#'"]
],[
"start",
["markup.heading.1","#"],
["heading","foo# "]
],[
"start",
- ["text","test: 6+ #s is not a valid header"]
+ ["text.xml","test: 6+ #s is not a valid header"]
],[
"start",
- ["text","####### foo"]
+ ["text.xml","####### foo"]
],[
"start",
- ["text","test: # followed be only space is not a valid header"]
+ ["text.xml","test: # followed be only space is not a valid header"]
],[
"start",
- ["text","# "]
+ ["text.xml","# "]
],[
"start",
- ["text","test: only space between #s is not a valid header"]
+ ["text.xml","test: only space between #s is not a valid header"]
],[
"start",
- ["text","# #"]
+ ["text.xml","# #"]
],[
"allowBlock"
],[
@@ -99,14 +99,14 @@
"start"
],[
"start",
- ["text","in plain text "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","b"],
- ["meta.tag.punctuation.end",">"],
- ["text","http://ace.ajaxorg.com"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","b"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml","in plain text "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","b"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","http://ace.ajaxorg.com"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","b"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"allowBlock"
],[
diff --git a/lib/ace/mode/_test/tokens_rhtml.json b/lib/ace/mode/_test/tokens_rhtml.json
index 6dca1c51..a536f851 100644
--- a/lib/ace/mode/_test/tokens_rhtml.json
+++ b/lib/ace/mode/_test/tokens_rhtml.json
@@ -1,55 +1,55 @@
[[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","html"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","html"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","head"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","head"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","title"],
- ["meta.tag.punctuation.end",">"],
- ["text","Title"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","title"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","title"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Title"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","title"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","head"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","head"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","body"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","body"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"],
- ["text","This is an R HTML document. When you click the "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","b"],
- ["meta.tag.punctuation.end",">"],
- ["text","Knit HTML"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","b"],
- ["meta.tag.punctuation.end",">"],
- ["text"," button a web page will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","This is an R HTML document. When you click the "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","b"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Knit HTML"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","b"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml"," button a web page will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
@@ -68,13 +68,13 @@
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"],
- ["text","You can also embed plots, for example:"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","p"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","You can also embed plots, for example:"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","p"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
@@ -93,14 +93,14 @@
"start"
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","body"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","body"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","html"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","html"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
]]
\ No newline at end of file
diff --git a/lib/ace/mode/_test/tokens_soy_template.json b/lib/ace/mode/_test/tokens_soy_template.json
index f100dd6b..46ea77fa 100644
--- a/lib/ace/mode/_test/tokens_soy_template.json
+++ b/lib/ace/mode/_test/tokens_soy_template.json
@@ -32,7 +32,7 @@
["punctuation.definition.tag.end.soy","}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["punctuation.definition.tag.begin.soy","{"],
["entity.name.tag.soy","if"],
["meta.tag.if.soy"," "],
@@ -42,31 +42,31 @@
["punctuation.definition.tag.end.soy","}"]
],[
"start",
- ["text"," Hello "],
+ ["text.xml"," Hello "],
["punctuation.definition.tag.begin.soy","{"],
["variable.other.soy","$name"],
["punctuation.definition.tag.end.soy","}"],
- ["text","!"]
+ ["text.xml","!"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["punctuation.definition.tag.begin.soy","{"],
["text","else"],
["punctuation.definition.tag.end.soy","}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["punctuation.definition.tag.begin.soy","{"],
["variable.other.soy","$greetingWord"],
["punctuation.definition.tag.end.soy","}"],
- ["text"," "],
+ ["text.xml"," "],
["punctuation.definition.tag.begin.soy","{"],
["variable.other.soy","$name"],
["punctuation.definition.tag.end.soy","}"],
- ["text","!"]
+ ["text.xml","!"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["punctuation.definition.tag.begin.soy","{/"],
["entity.name.tag.soy","if"],
["punctuation.definition.tag.end.soy","}"]
@@ -115,7 +115,7 @@
["comment.line.double-slash.soy"," Greet the person."]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["punctuation.definition.tag.begin.soy","{"],
["entity.name.tag.soy","call"],
["variable.parameter.soy"," .helloName"],
@@ -125,9 +125,9 @@
["string.quoted.double","\"all\""],
["meta.tag.call.soy"," /"],
["punctuation.definition.tag.end.soy","}"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","br"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","br"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
["comment.line.double-slash.soy"," "],
@@ -135,7 +135,7 @@
["comment.line.double-slash.soy"," Greet the additional people."]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["punctuation.definition.tag.begin.soy","{"],
["entity.name.tag.soy","foreach"],
["meta.tag.foreach.soy"," "],
@@ -147,14 +147,14 @@
["punctuation.definition.tag.end.soy","}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["punctuation.definition.tag.begin.soy","{"],
["entity.name.tag.soy","call"],
["variable.parameter.soy"," .helloName"],
["punctuation.definition.tag.end.soy","}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["punctuation.definition.tag.begin.soy","{"],
["entity.name.tag.soy","param"],
["text"," "],
@@ -167,13 +167,13 @@
["punctuation.definition.tag.end.soy","}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["punctuation.definition.tag.begin.soy","{/"],
["meta.tag.call.soy","call"],
["punctuation.definition.tag.end.soy","}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["punctuation.definition.tag.begin.soy","{"],
["entity.name.tag.soy","if"],
["meta.tag.if.soy"," "],
@@ -186,31 +186,31 @@
["punctuation.definition.tag.end.soy","}"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","br"],
- ["meta.tag.punctuation.end",">"],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","br"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["comment.line.double-slash.soy"," "],
["punctuation.definition.comment.soy","//"],
["comment.line.double-slash.soy"," break after every line except the last"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["punctuation.definition.tag.begin.soy","{/"],
["entity.name.tag.soy","if"],
["punctuation.definition.tag.end.soy","}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["punctuation.definition.tag.begin.soy","{"],
["text","ifempty"],
["punctuation.definition.tag.end.soy","}"]
],[
"start",
- ["text"," No additional people to greet."]
+ ["text.xml"," No additional people to greet."]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["punctuation.definition.tag.begin.soy","{/"],
["entity.name.tag.soy","foreach"],
["punctuation.definition.tag.end.soy","}"]
@@ -275,7 +275,7 @@
["punctuation.definition.tag.end.soy","}"]
],[
"start",
- ["text"," foo is "],
+ ["text.xml"," foo is "],
["punctuation.definition.tag.begin.soy","{"],
["variable.other.soy","$ij.foo"],
["punctuation.definition.tag.end.soy","}"]
diff --git a/lib/ace/mode/_test/tokens_svg.json b/lib/ace/mode/_test/tokens_svg.json
index f92fbbb6..66ebae75 100644
--- a/lib/ace/mode/_test/tokens_svg.json
+++ b/lib/ace/mode/_test/tokens_svg.json
@@ -1,65 +1,65 @@
[[
- "meta.tag.punctuation.begin0",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","svg"]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","svg"]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","width"],
- ["keyword.operator.separator","="],
- ["string","\"800\""],
- ["text"," "],
- ["entity.other.attribute-name","height"],
- ["keyword.operator.separator","="],
- ["string","\"600\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","width"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"800\""],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","height"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"600\""]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","xmlns"],
- ["keyword.operator.separator","="],
- ["string","\"http://www.w3.org/2000/svg\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","xmlns"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"http://www.w3.org/2000/svg\""]
],[
"start",
- ["text"," "],
- ["entity.other.attribute-name","onload"],
- ["keyword.operator.separator","="],
- ["string","\"StartAnimation(evt)\""],
- ["meta.tag.punctuation.end",">"]
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","onload"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"StartAnimation(evt)\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","title"],
- ["meta.tag.punctuation.end",">"],
- ["text","Test Tube Progress Bar"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","title"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","title"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Test Tube Progress Bar"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","title"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","desc"],
- ["meta.tag.punctuation.end",">"],
- ["text","Created for the Web Directions SVG competition"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","desc"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","desc"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","Created for the Web Directions SVG competition"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","desc"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"js-no_regex",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.script","script"],
- ["text"," "],
- ["entity.other.attribute-name","type"],
- ["keyword.operator.separator","="],
- ["string","\"text/ecmascript\""],
- ["meta.tag.punctuation.end",">"],
- ["string.begin",""],
+ ["string.cdata.xml",""],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.script","script"],
- ["meta.tag.punctuation.end",">"]
+ ["string.cdata.xml","]]>"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.script.tag-name.xml","script"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","rect"]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","rect"]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","fill"],
- ["keyword.operator.separator","="],
- ["string","\"#2e3436\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","fill"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"#2e3436\""]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","fill-rule"],
- ["keyword.operator.separator","="],
- ["string","\"nonzero\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","fill-rule"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"nonzero\""]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","stroke-width"],
- ["keyword.operator.separator","="],
- ["string","\"3\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","stroke-width"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"3\""]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","y"],
- ["keyword.operator.separator","="],
- ["string","\"0\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","y"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"0\""]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","x"],
- ["keyword.operator.separator","="],
- ["string","\"0\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","x"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"0\""]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","height"],
- ["keyword.operator.separator","="],
- ["string","\"600\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","height"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"600\""]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","width"],
- ["keyword.operator.separator","="],
- ["string","\"800\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","width"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"800\""]
],[
"start",
- ["text"," "],
- ["entity.other.attribute-name","id"],
- ["keyword.operator.separator","="],
- ["string","\"rect3590\""],
- ["meta.tag.punctuation.end","/>"]
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","id"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"rect3590\""],
+ ["meta.tag.punctuation.tag-close.xml","/>"]
],[
"start"
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","text"]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","text"]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","style"],
- ["keyword.operator.separator","="],
- ["string","\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","style"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\""]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","x"],
- ["keyword.operator.separator","="],
- ["string","\"50\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","x"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"50\""]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","y"],
- ["keyword.operator.separator","="],
- ["string","\"350\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","y"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"350\""]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","id"],
- ["keyword.operator.separator","="],
- ["string","\"hickory\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","id"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"hickory\""]
],[
"start",
- ["text"," "],
- ["entity.other.attribute-name","display"],
- ["keyword.operator.separator","="],
- ["string","\"none\""],
- ["meta.tag.punctuation.end",">"]
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","display"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"none\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," Hickory,"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","text"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," Hickory,"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","text"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","text"]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","text"]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","style"],
- ["keyword.operator.separator","="],
- ["string","\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","style"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\""]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","x"],
- ["keyword.operator.separator","="],
- ["string","\"50\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","x"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"50\""]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","y"],
- ["keyword.operator.separator","="],
- ["string","\"350\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","y"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"350\""]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","id"],
- ["keyword.operator.separator","="],
- ["string","\"dickory\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","id"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"dickory\""]
],[
"start",
- ["text"," "],
- ["entity.other.attribute-name","display"],
- ["keyword.operator.separator","="],
- ["string","\"none\""],
- ["meta.tag.punctuation.end",">"]
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","display"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"none\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," dickory,"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","text"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," dickory,"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","text"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","text"]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","text"]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","style"],
- ["keyword.operator.separator","="],
- ["string","\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","style"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\""]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","x"],
- ["keyword.operator.separator","="],
- ["string","\"50\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","x"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"50\""]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","y"],
- ["keyword.operator.separator","="],
- ["string","\"350\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","y"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"350\""]
],[
- "meta.tag.punctuation.begin0",
- ["text"," "],
- ["entity.other.attribute-name","id"],
- ["keyword.operator.separator","="],
- ["string","\"dock\""]
+ "meta.tag.punctuation.tag-open.xml1",
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","id"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"dock\""]
],[
"start",
- ["text"," "],
- ["entity.other.attribute-name","display"],
- ["keyword.operator.separator","="],
- ["string","\"none\""],
- ["meta.tag.punctuation.end",">"]
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","display"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"none\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," dock!"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","text"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," dock!"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","text"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","svg"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","svg"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
]]
\ No newline at end of file
diff --git a/lib/ace/mode/_test/tokens_twig.json b/lib/ace/mode/_test/tokens_twig.json
index c4101ded..ada8b4a7 100644
--- a/lib/ace/mode/_test/tokens_twig.json
+++ b/lib/ace/mode/_test/tokens_twig.json
@@ -1,56 +1,56 @@
[[
"start",
- ["punctuation.doctype.begin",""]
+ ["xml-pe.doctype.xml",""]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","html"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","html"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","head"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","head"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","title"],
- ["meta.tag.punctuation.end",">"],
- ["text","My Webpage"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","title"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","title"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","My Webpage"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","title"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","head"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","head"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","body"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","body"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","ul"],
- ["text"," "],
- ["entity.other.attribute-name","id"],
- ["keyword.operator.separator","="],
- ["string","\"navigation\""],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","ul"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","id"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"navigation\""],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["meta.tag.twig","{%"],
["text"," "],
["keyword.control.twig","for"],
@@ -64,16 +64,16 @@
["meta.tag.twig","%}"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","li"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.anchor","a"],
- ["text"," "],
- ["entity.other.attribute-name","href"],
- ["keyword.operator.separator","="],
- ["string","\""],
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","li"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.anchor.tag-name.xml","a"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","href"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\""],
["variable.other.readwrite.local.twig","{{"],
["text"," "],
["identifier","item"],
@@ -83,8 +83,8 @@
["support.function.twig","escape"],
["text"," "],
["variable.other.readwrite.local.twig","}}"],
- ["string","\""],
- ["meta.tag.punctuation.end",">"],
+ ["string.attribute-value.xml","\""],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["variable.other.readwrite.local.twig","{{"],
["text"," "],
["identifier","item"],
@@ -92,15 +92,15 @@
["identifier","caption"],
["text"," "],
["variable.other.readwrite.local.twig","}}"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.anchor","a"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","li"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.anchor.tag-name.xml","a"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","li"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["meta.tag.twig","{%"],
["text"," "],
["keyword.control.twig","endfor"],
@@ -108,15 +108,15 @@
["meta.tag.twig","%}"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","ul"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","ul"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["meta.tag.twig","{%"],
["text"," "],
["keyword.control.twig","if"],
@@ -142,11 +142,11 @@
"start"
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["comment.block.twig","{# is equivalent to #}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["meta.tag.twig","{%"],
["text"," "],
["keyword.control.twig","if"],
@@ -173,7 +173,7 @@
"start"
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["meta.tag.twig","{%"],
["text"," "],
["keyword.control.twig","autoescape"],
@@ -183,7 +183,7 @@
["meta.tag.twig","%}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable.other.readwrite.local.twig","{{"],
["text"," "],
["identifier","var"],
@@ -191,7 +191,7 @@
["variable.other.readwrite.local.twig","}}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable.other.readwrite.local.twig","{{"],
["text"," "],
["identifier","var"],
@@ -199,11 +199,11 @@
["support.function.twig","raw"],
["text"," "],
["variable.other.readwrite.local.twig","}}"],
- ["text"," "],
+ ["text.xml"," "],
["comment.block.twig","{# var won't be escaped #}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable.other.readwrite.local.twig","{{"],
["text"," "],
["identifier","var"],
@@ -211,11 +211,11 @@
["support.function.twig","escape"],
["text"," "],
["variable.other.readwrite.local.twig","}}"],
- ["text"," "],
+ ["text.xml"," "],
["comment.block.twig","{# var won't be doubled-escaped #}"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["meta.tag.twig","{%"],
["text"," "],
["keyword.control.twig","endautoescape"],
@@ -225,7 +225,7 @@
"start"
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable.other.readwrite.local.twig","{{"],
["text"," "],
["keyword.control.twig","include"],
@@ -245,7 +245,7 @@
"start"
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable.other.readwrite.local.twig","{{"],
["string","\"string "],
["constant.language.escape","#{with}"],
@@ -258,17 +258,17 @@
["variable.other.readwrite.local.twig","}}"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","h1"],
- ["meta.tag.punctuation.end",">"],
- ["text","My Webpage"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","h1"],
- ["meta.tag.punctuation.end",">"]
+ ["text.xml"," "],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","h1"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","My Webpage"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","h1"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text"," "],
+ ["text.xml"," "],
["variable.other.readwrite.local.twig","{{"],
["text"," "],
["identifier","a_variable"],
@@ -276,13 +276,13 @@
["variable.other.readwrite.local.twig","}}"]
],[
"start",
- ["text"," "],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","body"],
- ["meta.tag.punctuation.end",">"]
+ ["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.begin",""],
- ["meta.tag.name","html"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","html"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
]]
\ No newline at end of file
diff --git a/lib/ace/mode/_test/tokens_velocity.json b/lib/ace/mode/_test/tokens_velocity.json
index 3eb7a9ab..ee40761c 100644
--- a/lib/ace/mode/_test/tokens_velocity.json
+++ b/lib/ace/mode/_test/tokens_velocity.json
@@ -26,15 +26,15 @@
],[
"start",
["text"," "],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","li"],
- ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","li"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
["variable","${"],
["identifier","item"],
["variable","}"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","li"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","li"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
["keyword","#end"]
@@ -55,11 +55,14 @@
["text"," "],
["lparen","["],
["constant.numeric","1"],
- ["text",", "],
+ ["text.xml",","],
+ ["text"," "],
["constant.numeric","2"],
- ["text",", "],
+ ["text.xml",","],
+ ["text"," "],
["constant.numeric","3"],
- ["text",", "],
+ ["text.xml",","],
+ ["text"," "],
["constant.numeric","4"],
["rparen","]"],
["text"," "],
@@ -68,9 +71,9 @@
"start"
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","ul"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","ul"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
["text"," "],
@@ -97,11 +100,12 @@
["lparen","("],
["text"," "],
["support.function","$_MathTool"],
- ["text","."],
+ ["text.xml","."],
["identifier","mod"],
["lparen","("],
["variable","$item"],
- ["text",", "],
+ ["text.xml",","],
+ ["text"," "],
["constant.numeric","2"],
["rparen",")"],
["text"," "],
@@ -128,16 +132,16 @@
["keyword","#end"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","ul"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","ul"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"js-start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.script","script"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.script.tag-name.xml","script"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"js-comment_regex_allowed",
["text"," "],
@@ -216,16 +220,16 @@
["paren.rparen","}"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.script","script"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.script.tag-name.xml","script"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start"
],[
"css-start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name.style","style"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.style.tag-name.xml","style"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
["css-comment","css-start"],
["text"," "],
@@ -275,7 +279,7 @@
["paren.rparen","}"]
],[
"start",
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name.style","style"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.style.tag-name.xml","style"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
]]
\ No newline at end of file
diff --git a/lib/ace/mode/_test/tokens_xml.json b/lib/ace/mode/_test/tokens_xml.json
index 70f73093..728be4db 100644
--- a/lib/ace/mode/_test/tokens_xml.json
+++ b/lib/ace/mode/_test/tokens_xml.json
@@ -1,43 +1,43 @@
[[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","Juhu"],
- ["meta.tag.punctuation.end",">"],
- ["text","//Juhu Kinners"],
- ["meta.tag.punctuation.begin",""],
- ["meta.tag.name","Kinners"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","Juhu"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["text.xml","//Juhu Kinners"],
+ ["meta.tag.punctuation.end-tag-open.xml",""],
+ ["meta.tag.tag-name.xml","Kinners"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text","test: two tags in the same lines should be in separate tokens\""]
+ ["text.xml","test: two tags in the same lines should be in separate tokens\""]
],[
"start",
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","Juhu"],
- ["meta.tag.punctuation.end",">"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","Kinners"],
- ["meta.tag.punctuation.end",">"]
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","Juhu"],
+ ["meta.tag.punctuation.tag-close.xml",">"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","Kinners"],
+ ["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
- ["text","test: multiline attributes\""]
+ ["text.xml","test: multiline attributes\""]
],[
- ["qqstring_inner","meta.tag.punctuation.begin"],
- ["meta.tag.punctuation.begin","<"],
- ["meta.tag.name","copy"],
- ["text"," "],
- ["entity.other.attribute-name","set"],
- ["keyword.operator.separator","="],
- ["string","\"{"]
+ ["string.attribute-value.xml0","meta.tag.punctuation.tag-open.xml"],
+ ["meta.tag.punctuation.tag-open.xml","<"],
+ ["meta.tag.tag-name.xml","copy"],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","set"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"{"]
],[
- ["qqstring_inner","meta.tag.punctuation.begin"],
- ["string","}\""],
- ["text"," "],
- ["entity.other.attribute-name","undo"],
- ["keyword.operator.separator","="],
- ["string","\"{"]
+ ["string.attribute-value.xml0","meta.tag.punctuation.tag-open.xml"],
+ ["string.attribute-value.xml","}\""],
+ ["text.tag-whitespace.xml"," "],
+ ["entity.other.attribute-name.xml","undo"],
+ ["keyword.operator.attribute-equals.xml","="],
+ ["string.attribute-value.xml","\"{"]
],[
"start",
- ["string","}\""],
- ["meta.tag.punctuation.end","/>"]
+ ["string.attribute-value.xml","}\""],
+ ["meta.tag.punctuation.tag-close.xml","/>"]
]]
\ No newline at end of file
diff --git a/lib/ace/mode/behaviour/coldfusion.js b/lib/ace/mode/behaviour/coldfusion.js
deleted file mode 100644
index d692e20e..00000000
--- a/lib/ace/mode/behaviour/coldfusion.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * 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
- * 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 XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
-
-function hasType(token, type) {
- var hasType = true;
- var typeList = token.type.split('.');
- var needleList = type.split('.');
- needleList.forEach(function(needle){
- if (typeList.indexOf(needle) == -1) {
- hasType = false;
- return false;
- }
- });
- return hasType;
-}
-
-var CfmlBehaviour = function () {
-
- this.inherit(XmlBehaviour); // Get xml behaviour
-
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
- if (text == '>') {
- var position = editor.getCursorPosition();
- var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
-
- if (token && hasType(token, 'meta.tag.name') && /^cf+(abort|application|argument|associate|break|cache|collection|cookie|dbinfo|directory|dump|else|elseif|error|exchangecalendar|exchangeconnection|exchangecontact|exchangefilter|exchangetask|exit|feed|file|flush|ftp|header|htmlhead|httpparam|image|import|include|index|insert|invokeargument|location|log|mailparam|NTauthenticate|object|objectcache|param|pdfformparam|print|procparam|procresult|property|queryparam|registry|reportparam|rethrow|return|schedule|search|set|setting|throw|zipparam)$/gi.test(token.value))
- return;
- if (hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
- return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
- return
- }
- var element = token.value;
- if (atCursor){
- var element = element.substring(0, position.column - token.start);
- }
- if (voidElements.indexOf(element) !== -1){
- return;
- }
- return {
- text: '>' + '' + element + '>',
- selection: [1, 1]
- }
- }
- });
-}
-oop.inherits(CfmlBehaviour, XmlBehaviour);
-
-exports.CfmlBehaviour = CfmlBehaviour;
-});
diff --git a/lib/ace/mode/behaviour/cstyle.js b/lib/ace/mode/behaviour/cstyle.js
index 5bdd997c..2709168e 100644
--- a/lib/ace/mode/behaviour/cstyle.js
+++ b/lib/ace/mode/behaviour/cstyle.js
@@ -41,89 +41,34 @@ var SAFE_INSERT_IN_TOKENS =
var SAFE_INSERT_BEFORE_TOKENS =
["text", "paren.rparen", "punctuation.operator", "comment"];
+var context;
+var contextCache = {}
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.id;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
+ };
+};
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
- var cursor = editor.getCursorPosition();
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
-
- // Don't insert in the middle of a keyword/identifier/lexical
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
- // Look ahead in case we're at the end of a token
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
- return false;
- }
-
- // Only insert in front of whitespace/comments
- iterator.stepForward();
- return iterator.getCurrentTokenRow() !== cursor.row ||
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
- };
-
- CstyleBehaviour.$matchTokenType = function(token, types) {
- return types.indexOf(token.type || token) > -1;
- };
-
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- // Reset previous state if text or context changed too much
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
- autoInsertedBrackets = 0;
- autoInsertedRow = cursor.row;
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
- autoInsertedBrackets++;
- };
-
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
- var cursor = editor.getCursorPosition();
- var line = session.doc.getLine(cursor.row);
- if (!this.isMaybeInsertedClosing(cursor, line))
- maybeInsertedBrackets = 0;
- maybeInsertedRow = cursor.row;
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
- maybeInsertedLineEnd = line.substr(cursor.column);
- maybeInsertedBrackets++;
- };
-
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
- return autoInsertedBrackets > 0 &&
- cursor.row === autoInsertedRow &&
- bracket === autoInsertedLineEnd[0] &&
- line.substr(cursor.column) === autoInsertedLineEnd;
- };
-
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
- return maybeInsertedBrackets > 0 &&
- cursor.row === maybeInsertedRow &&
- line.substr(cursor.column) === maybeInsertedLineEnd &&
- line.substr(0, cursor.column) == maybeInsertedLineStart;
- };
-
- CstyleBehaviour.popAutoInsertedClosing = function() {
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
- autoInsertedBrackets--;
- };
-
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
- maybeInsertedBrackets = 0;
- maybeInsertedRow = -1;
- };
-
- this.add("braces", "insertion", function (state, action, editor, session, text) {
+var CstyleBehaviour = function() {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
if (text == '{') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
@@ -147,6 +92,7 @@ var CstyleBehaviour = function () {
}
}
} else if (text == '}') {
+ initContext(editor);
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}') {
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -159,9 +105,10 @@ var CstyleBehaviour = function () {
}
}
} else if (text == "\n" || text == "\r\n") {
+ initContext(editor);
var closing = "";
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
CstyleBehaviour.clearMaybeInsertedClosing();
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -173,6 +120,7 @@ var CstyleBehaviour = function () {
} else if (closing) {
var next_indent = this.$getIndent(line);
} else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
return;
}
var indent = next_indent + session.getTabString();
@@ -186,22 +134,24 @@ var CstyleBehaviour = function () {
}
});
- this.add("braces", "deletion", function (state, action, editor, session, range) {
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.end.column, range.end.column + 1);
if (rightChar == '}') {
range.end.column++;
return range;
} else {
- maybeInsertedBrackets--;
+ context.maybeInsertedBrackets--;
}
}
});
- this.add("parens", "insertion", function (state, action, editor, session, text) {
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
if (text == '(') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
@@ -217,6 +167,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ')') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -233,9 +184,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("parens", "deletion", function (state, action, editor, session, range) {
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '(') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ')') {
@@ -245,8 +197,9 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
if (text == '[') {
+ initContext(editor);
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
@@ -262,6 +215,7 @@ var CstyleBehaviour = function () {
};
}
} else if (text == ']') {
+ initContext(editor);
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -278,9 +232,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && selected == '[') {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == ']') {
@@ -290,8 +245,9 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
if (text == '"' || text == "'") {
+ initContext(editor);
var quote = text;
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
@@ -350,9 +306,10 @@ var CstyleBehaviour = function () {
}
});
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
var selected = session.doc.getTextRange(range);
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ initContext(editor);
var line = session.doc.getLine(range.start.row);
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
if (rightChar == selected) {
@@ -364,6 +321,79 @@ var CstyleBehaviour = function () {
};
+
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+
+ // Don't insert in the middle of a keyword/identifier/lexical
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ // Look ahead in case we're at the end of a token
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+
+ // Only insert in front of whitespace/comments
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ // Reset previous state if text or context changed too much
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
oop.inherits(CstyleBehaviour, Behaviour);
exports.CstyleBehaviour = CstyleBehaviour;
diff --git a/lib/ace/mode/behaviour/html.js b/lib/ace/mode/behaviour/html.js
index 1d500e0f..181655c0 100644
--- a/lib/ace/mode/behaviour/html.js
+++ b/lib/ace/mode/behaviour/html.js
@@ -33,55 +33,13 @@ define(function(require, exports, module) {
var oop = require("../../lib/oop");
var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
-
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
- return hasType;
-}
var HtmlBehaviour = function () {
- this.inherit(XmlBehaviour); // Get xml behaviour
-
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
- if (text == '>') {
- var position = editor.getCursorPosition();
- var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
+ XmlBehaviour.call(this);
+
+};
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
- return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
- return;
- }
- var element = token.value;
- if (atCursor){
- var element = element.substring(0, position.column - token.start);
- }
- if (voidElements.indexOf(element) !== -1){
- return;
- }
- return {
- text: '>' + '' + element + '>',
- selection: [1, 1]
- }
- }
- });
-}
oop.inherits(HtmlBehaviour, XmlBehaviour);
exports.HtmlBehaviour = HtmlBehaviour;
diff --git a/lib/ace/mode/behaviour/xml.js b/lib/ace/mode/behaviour/xml.js
index 47261306..bd0574c6 100644
--- a/lib/ace/mode/behaviour/xml.js
+++ b/lib/ace/mode/behaviour/xml.js
@@ -33,49 +33,116 @@ define(function(require, exports, module) {
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
-var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
var TokenIterator = require("../../token_iterator").TokenIterator;
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
- return hasType;
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
}
var XmlBehaviour = function () {
-
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
-
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ // Ignore input and move right one if we're typing over the closing quote.
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ selection: [1, 1]
+ };
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
if (text == '>') {
var position = editor.getCursorPosition();
var iterator = new TokenIterator(session, position.row, position.column);
- var token = iterator.getCurrentToken();
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
- if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
+ // exit if we're not in a tag
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
return;
- var atCursor = false;
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
- } else {
- atCursor = true;
- }
- if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
+
+ // exit if we're inside of a quoted attribute value
+ if (is(token, "reference.attribute-value"))
return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
}
- var tag = token.value;
- if (atCursor){
- var tag = tag.substring(0, position.column - token.start);
+
+ // find tag name
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
}
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+
+ // exit if the tag is ending
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
return {
- text: '>' + '' + tag + '>',
+ text: '>' + '' + element + '>',
selection: [1, 1]
- }
+ };
}
});
@@ -91,12 +158,13 @@ var XmlBehaviour = function () {
return {
text: '\n' + indent + '\n' + next_indent,
selection: [1, indent.length, 1, indent.length]
- }
+ };
}
}
});
-}
+};
+
oop.inherits(XmlBehaviour, Behaviour);
exports.XmlBehaviour = XmlBehaviour;
diff --git a/lib/ace/mode/cirru_highlight_rules.js b/lib/ace/mode/cirru_highlight_rules.js
index 27c60368..737ec0be 100644
--- a/lib/ace/mode/cirru_highlight_rules.js
+++ b/lib/ace/mode/cirru_highlight_rules.js
@@ -47,6 +47,10 @@ var CirruHighlightRules = function() {
}, {
token: 'storage.modifier',
regex: /\(/,
+ }, {
+ token: 'storage.modifier',
+ regex: /\,/,
+ next: 'line',
}, {
token: 'support.function',
regex: /[^\(\)\"\s]+/,
@@ -88,6 +92,10 @@ var CirruHighlightRules = function() {
token: 'markup.raw',
regex: /^\s*/,
next: 'start',
+ }, {
+ token: 'storage.modifier',
+ regex: /\$/,
+ next: 'start',
}, {
token: 'variable.parameter',
regex: /[^\(\)\"\s]+/
@@ -102,10 +110,6 @@ var CirruHighlightRules = function() {
token: 'markup.raw',
regex: /^\ */,
next: 'start',
- }, {
- token: 'storage.modifier',
- regex: /\$/,
- next: 'start',
}, {
token: 'string.quoted.double',
regex: /"/,
diff --git a/lib/ace/mode/coldfusion.js b/lib/ace/mode/coldfusion.js
index 16527f26..bc8656a4 100644
--- a/lib/ace/mode/coldfusion.js
+++ b/lib/ace/mode/coldfusion.js
@@ -32,28 +32,25 @@ define(function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
-var XmlMode = require("./xml").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
+var lang = require("../lib/lang");
+var HtmlMode = require("./html").Mode;
var Tokenizer = require("../tokenizer").Tokenizer;
var ColdfusionHighlightRules = require("./coldfusion_highlight_rules").ColdfusionHighlightRules;
-var CfmlBehaviour = require("./behaviour/coldfusion").CfmlBehaviour;
+
+var voidElements = "cfabort|cfapplication|cfargument|cfassociate|cfbreak|cfcache|cfcollection|cfcookie|cfdbinfo|cfdirectory|cfdump|cfelse|cfelseif|cferror|cfexchangecalendar|cfexchangeconnection|cfexchangecontact|cfexchangefilter|cfexchangetask|cfexit|cffeed|cffile|cfflush|cfftp|cfheader|cfhtmlhead|cfhttpparam|cfimage|cfimport|cfinclude|cfindex|cfinsert|cfinvokeargument|cflocation|cflog|cfmailparam|cfNTauthenticate|cfobject|cfobjectcache|cfparam|cfpdfformparam|cfprint|cfprocparam|cfprocresult|cfproperty|cfqueryparam|cfregistry|cfreportparam|cfrethrow|cfreturn|cfschedule|cfsearch|cfset|cfsetting|cfthrow|cfzipparam)".split("|");
var Mode = function() {
- XmlMode.call(this);
+ HtmlMode.call(this);
this.HighlightRules = ColdfusionHighlightRules;
- this.$behaviour = new CfmlBehaviour();
-
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode
- });
};
-oop.inherits(Mode, XmlMode);
+oop.inherits(Mode, HtmlMode);
(function() {
+ // mix with html void elements
+ this.voidElements = oop.mixin(lang.arrayToMap(voidElements), this.voidElements);
+
this.getNextLineIndent = function(state, line, tab) {
return this.$getIndent(line);
};
diff --git a/lib/ace/mode/folding/html.js b/lib/ace/mode/folding/html.js
index fbfa1e9e..5edbe0b8 100644
--- a/lib/ace/mode/folding/html.js
+++ b/lib/ace/mode/folding/html.js
@@ -36,39 +36,8 @@ var MixedFoldMode = require("./mixed").FoldMode;
var XmlFoldMode = require("./xml").FoldMode;
var CStyleFoldMode = require("./cstyle").FoldMode;
-var FoldMode = exports.FoldMode = function() {
- MixedFoldMode.call(this, new XmlFoldMode({
- // void elements
- "area": 1,
- "base": 1,
- "br": 1,
- "col": 1,
- "command": 1,
- "embed": 1,
- "hr": 1,
- "img": 1,
- "input": 1,
- "keygen": 1,
- "link": 1,
- "meta": 1,
- "param": 1,
- "source": 1,
- "track": 1,
- "wbr": 1,
-
- // optional tags
- "li": 1,
- "dt": 1,
- "dd": 1,
- "p": 1,
- "rt": 1,
- "rp": 1,
- "optgroup": 1,
- "option": 1,
- "colgroup": 1,
- "td": 1,
- "th": 1
- }), {
+var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
"js-": new CStyleFoldMode(),
"css-": new CStyleFoldMode()
});
diff --git a/lib/ace/mode/folding/xml.js b/lib/ace/mode/folding/xml.js
index 5e8e4b9a..93c40572 100644
--- a/lib/ace/mode/folding/xml.js
+++ b/lib/ace/mode/folding/xml.js
@@ -37,62 +37,98 @@ var Range = require("../../range").Range;
var BaseFoldMode = require("./fold_mode").FoldMode;
var TokenIterator = require("../../token_iterator").TokenIterator;
-var FoldMode = exports.FoldMode = function(voidElements) {
+var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
BaseFoldMode.call(this);
- this.voidElements = voidElements || {};
+ // TODO folding support for optional end tags
+ this.voidElements = oop.mixin(voidElements || {}, optionalEndTags || {});
};
oop.inherits(FoldMode, BaseFoldMode);
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
(function() {
this.getFoldWidget = function(session, foldStyle, row) {
var tag = this._getFirstTagInLine(session, row);
- if (tag.closing)
+ if (!tag)
+ return "";
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
return foldStyle == "markbeginend" ? "end" : "";
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
return "";
- if (tag.selfClosing)
- return "";
-
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
return "";
return "start";
};
-
+
+ /*
+ * returns a first tag (or a fragment) in a line
+ */
this._getFirstTagInLine = function(session, row) {
var tokens = session.getTokens(row);
- var value = "";
+ var tag = new Tag();
+
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i];
- if (token.type.lastIndexOf("meta.tag", 0) === 0)
- value += token.value;
- else
- value += lang.stringRepeat(" ", token.value.length);
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
}
-
- return this._parseTag(value);
+
+ return null;
};
- this.tagRe = /^(\s*)((\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
- this._parseTag = function(tag) {
-
- var match = tag.match(this.tagRe);
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
var column = 0;
-
- return {
- value: tag,
- match: match ? match[2] : "",
- closing: match ? !!match[3] : false,
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
- tagName: match ? match[4] : "",
- column: match[1] ? column + match[1].length : column
- };
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
};
-
+
/*
* reads a full tag and places the iterator after the tag
*/
@@ -100,32 +136,24 @@ oop.inherits(FoldMode, BaseFoldMode);
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var start;
-
+
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!start) {
- var start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- }
- value += token.value;
- if (value.indexOf(">") !== -1) {
- var tag = this._parseTag(value);
- tag.start = start;
- tag.end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- iterator.stepForward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ iterator.stepForward();
+ return tag;
}
} while(token = iterator.stepForward());
-
+
return null;
};
@@ -133,32 +161,24 @@ oop.inherits(FoldMode, BaseFoldMode);
var token = iterator.getCurrentToken();
if (!token)
return null;
-
- var value = "";
- var end;
+ var tag = new Tag();
do {
- if (token.type.lastIndexOf("meta.tag", 0) === 0) {
- if (!end) {
- end = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn() + token.value.length
- };
- }
- value = token.value + value;
- if (value.indexOf("<") !== -1) {
- var tag = this._parseTag(value);
- tag.end = end;
- tag.start = {
- row: iterator.getCurrentTokenRow(),
- column: iterator.getCurrentTokenColumn()
- };
- iterator.stepBackward();
- return tag;
- }
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
}
} while(token = iterator.stepBackward());
-
+
return null;
};
@@ -169,10 +189,10 @@ oop.inherits(FoldMode, BaseFoldMode);
if (!tag || top.tagName == tag.tagName) {
return stack.pop();
}
- else if (this.voidElements[tag.tagName]) {
+ else if (this.voidElements.hasOwnProperty(tag.tagName)) {
return;
}
- else if (this.voidElements[top.tagName]) {
+ else if (this.voidElements.hasOwnProperty(top.tagName)) {
stack.pop();
continue;
} else {
@@ -184,7 +204,7 @@ oop.inherits(FoldMode, BaseFoldMode);
this.getFoldWidgetRange = function(session, foldStyle, row) {
var firstTag = this._getFirstTagInLine(session, row);
- if (!firstTag.match)
+ if (!firstTag)
return null;
var isBackward = firstTag.closing || firstTag.selfClosing;
@@ -192,10 +212,10 @@ oop.inherits(FoldMode, BaseFoldMode);
var tag;
if (!isBackward) {
- var iterator = new TokenIterator(session, row, firstTag.column);
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
var start = {
row: row,
- column: firstTag.column + firstTag.tagName.length + 2
+ column: firstTag.start.column + firstTag.tagName.length + 2
};
while (tag = this._readTagForward(iterator)) {
if (tag.selfClosing) {
@@ -213,15 +233,15 @@ oop.inherits(FoldMode, BaseFoldMode);
return Range.fromPoints(start, tag.start);
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
else {
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
var end = {
row: row,
- column: firstTag.column
+ column: firstTag.start.column
};
while (tag = this._readTagBackward(iterator)) {
@@ -242,7 +262,7 @@ oop.inherits(FoldMode, BaseFoldMode);
}
}
else {
- stack.push(tag)
+ stack.push(tag);
}
}
}
diff --git a/lib/ace/mode/gherkin.js b/lib/ace/mode/gherkin.js
new file mode 100644
index 00000000..557ce9fc
--- /dev/null
+++ b/lib/ace/mode/gherkin.js
@@ -0,0 +1,81 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2014, 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) {
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var GherkinHighlightRules = require("./gherkin_highlight_rules").GherkinHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = GherkinHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.$id = "ace/mode/gherkin";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var space2 = " ";
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ console.log(state)
+
+ if(line.match("[ ]*\\|")) {
+ indent += "| ";
+ }
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+
+ if (state == "start") {
+ if (line.match("Scenario:|Feature:|Scenario\ Outline:|Background:")) {
+ indent += space2;
+ } else if(line.match("(Given|Then).+(:)$|Examples:")) {
+ indent += space2;
+ } else if(line.match("\\*.+")) {
+ indent += "* ";
+ }
+ }
+
+
+ return indent;
+ };
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
\ No newline at end of file
diff --git a/lib/ace/mode/gherkin_highlight_rules.js b/lib/ace/mode/gherkin_highlight_rules.js
new file mode 100644
index 00000000..d54db204
--- /dev/null
+++ b/lib/ace/mode/gherkin_highlight_rules.js
@@ -0,0 +1,113 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2014, 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) {
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";
+
+var GherkinHighlightRules = function() {
+
+ // need to include constant ints
+ this.$rules = {
+ start : [{
+ token: 'constant.numeric',
+ regex: "(?:(?:[1-9]\\d*)|(?:0))"
+ }, {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "keyword",
+ regex : "Feature:|Background:|Scenario:|Scenario\ Outline:|Examples:|Given|When|Then|And|But|\\*",
+ }, {
+ token : "string", // multi line """ string start
+ regex : '"{3}',
+ next : "qqstring3"
+ }, {
+ token : "string", // " string
+ regex : '"',
+ next : "qqstring"
+ }, {
+ token : "comment",
+ regex : "@[A-Za-z0-9]+",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : "<.+>"
+ }, {
+ token : "comment",
+ regex : "\\| ",
+ next : "table-item"
+ }, {
+ token : "comment",
+ regex : "\\|$",
+ next : "start"
+ }],
+ "qqstring3" : [ {
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string", // multi line """ string end
+ regex : '"{3}',
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }],
+ "qqstring" : [{
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start"
+ }, {
+ defaultToken: "string"
+ }],
+ "table-item" : [{
+ token : "string",
+ regex : "[A-Za-z0-9 ]*",
+ next : "start"
+ }],
+ };
+
+
+ //new TextHighlightRules().getRules();
+
+}
+
+oop.inherits(GherkinHighlightRules, TextHighlightRules);
+
+exports.GherkinHighlightRules = GherkinHighlightRules;
+});
\ No newline at end of file
diff --git a/lib/ace/mode/html.js b/lib/ace/mode/html.js
index bc85dd5e..ab202a70 100644
--- a/lib/ace/mode/html.js
+++ b/lib/ace/mode/html.js
@@ -32,20 +32,25 @@ define(function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
+var lang = require("../lib/lang");
var TextMode = require("./text").Mode;
var JavaScriptMode = require("./javascript").Mode;
var CssMode = require("./css").Mode;
var Tokenizer = require("../tokenizer").Tokenizer;
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
-var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
var HtmlFoldMode = require("./folding/html").FoldMode;
var HtmlCompletions = require("./html_completions").HtmlCompletions;
var WorkerClient = require("../worker/worker_client").WorkerClient;
+// http://www.w3.org/TR/html5/syntax.html#void-elements
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
var Mode = function(options) {
this.fragmentContext = options && options.fragmentContext;
this.HighlightRules = HtmlHighlightRules;
- this.$behaviour = new HtmlBehaviour();
+ this.$behaviour = new XmlBehaviour();
this.$completer = new HtmlCompletions();
this.createModeDelegates({
@@ -53,7 +58,7 @@ var Mode = function(options) {
"css-": CssMode
});
- this.foldingRules = new HtmlFoldMode();
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
};
oop.inherits(Mode, TextMode);
@@ -61,6 +66,8 @@ oop.inherits(Mode, TextMode);
this.blockComment = {start: ""};
+ this.voidElements = lang.arrayToMap(voidElements);
+
this.getNextLineIndent = function(state, line, tab) {
return this.$getIndent(line);
};
diff --git a/lib/ace/mode/html/saxparser.js b/lib/ace/mode/html/saxparser.js
index 966630d5..079f2e5c 100644
--- a/lib/ace/mode/html/saxparser.js
+++ b/lib/ace/mode/html/saxparser.js
@@ -1,5 +1,5 @@
-define(["require", "exports", "module"], function(require, exports, module){
-require=(function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s -1;
}
function findTagName(session, pos) {
var iterator = new TokenIterator(session, pos.row, pos.column);
var token = iterator.getCurrentToken();
- if (!token || !hasType(token, 'tag') && !(hasType(token, 'text') && token.value.match('/'))){
- do {
- token = iterator.stepBackward();
- } while (token && (hasType(token, 'string') || hasType(token, 'operator') || hasType(token, 'attribute-name') || hasType(token, 'text')));
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
}
- if (token && hasType(token, 'tag-name') && !iterator.stepBackward().value.match('/'))
+ if (token)
return token.value;
}
@@ -260,27 +261,22 @@ var HtmlCompletions = function() {
return [];
// tag name
- if (hasType(token, "tag-name") || (token.value == '<' && hasType(token, "text")))
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
return this.getTagCompletions(state, session, pos, prefix);
// tag attribute
- if (hasType(token, 'text') || hasType(token, 'attribute-name'))
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
return this.getAttributeCompetions(state, session, pos, prefix);
return [];
};
this.getTagCompletions = function(state, session, pos, prefix) {
- var elements = allElements;
- if (prefix) {
- elements = elements.filter(function(element){
- return element.indexOf(prefix) === 0;
- });
- }
return elements.map(function(element){
return {
value: element,
- meta: "tag"
+ meta: "tag",
+ score: Number.MAX_VALUE
};
});
};
@@ -293,16 +289,12 @@ var HtmlCompletions = function() {
if (tagName in attributeMap) {
attributes = attributes.concat(attributeMap[tagName]);
}
- if (prefix) {
- attributes = attributes.filter(function(attribute){
- return attribute.indexOf(prefix) === 0;
- });
- }
return attributes.map(function(attribute){
return {
caption: attribute,
snippet: attribute + '="$0"',
- meta: "attribute"
+ meta: "attribute",
+ score: Number.MAX_VALUE
};
});
};
diff --git a/lib/ace/mode/html_highlight_rules.js b/lib/ace/mode/html_highlight_rules.js
index ec631873..9c9cc36f 100644
--- a/lib/ace/mode/html_highlight_rules.js
+++ b/lib/ace/mode/html_highlight_rules.js
@@ -62,17 +62,17 @@ var HtmlHighlightRules = function() {
this.addRules({
attributes: [{
- include : "space"
+ include : "tag_whitespace"
}, {
- token : "entity.other.attribute-name",
+ token : "entity.other.attribute-name.xml",
regex : "[-_a-zA-Z0-9:]+"
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "=",
push : [{
- include: "space"
+ include: "tag_whitespace"
}, {
- token : "string",
+ token : "string.unquoted.attribute-value.html",
regex : "[^<>='\"`\\s]+",
next : "pop"
}, {
@@ -81,33 +81,21 @@ var HtmlHighlightRules = function() {
next : "pop"
}]
}, {
- include : "string"
+ include : "attribute_value"
}],
tag: [{
token : function(start, tag) {
var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
},
- regex : "(<)([-_a-zA-Z0-9:]+)",
- next: "start_tag_stuff"
- }, {
- token : function(start, tag) {
- var group = tagMap[tag];
- return ["meta.tag.punctuation.begin",
- "meta.tag.name" + (group ? "." + group : "")];
- },
- regex : "()([-_a-zA-Z0-9:]+)",
- next: "end_tag_stuff"
+ regex : "(?)([-_a-zA-Z0-9:]+)",
+ next: "tag_stuff"
}],
- start_tag_stuff: [
+ tag_stuff: [
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
],
- end_tag_stuff: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
});
this.embedTagRules(CssHighlightRules, "css-", "style");
diff --git a/lib/ace/mode/lsl_highlight_rules.js b/lib/ace/mode/lsl_highlight_rules.js
index 752abc21..5de4d017 100644
--- a/lib/ace/mode/lsl_highlight_rules.js
+++ b/lib/ace/mode/lsl_highlight_rules.js
@@ -39,265 +39,21 @@ oop.inherits(LSLHighlightRules, TextHighlightRules);
function LSLHighlightRules() {
var keywordMapper = this.createKeywordMapper({
"constant.language.float.lsl" : "DEG_TO_RAD|PI|PI_BY_TWO|RAD_TO_DEG|SQRT2|TWO_PI",
- "constant.language.integer.lsl": "ACTIVE|AGENT|AGENT_ALWAYS_RUN|AGENT_ATTACHMENTS|" +
- "AGENT_AUTOPILOT|AGENT_AWAY|AGENT_BUSY|AGENT_BY_LEGACY_NAME|AGENT_BY_USERNAME|" +
- "AGENT_CROUCHING|AGENT_FLYING|AGENT_IN_AIR|AGENT_LIST_PARCEL|AGENT_LIST_PARCEL_OWNER|" +
- "AGENT_LIST_REGION|AGENT_MOUSELOOK|AGENT_ON_OBJECT|AGENT_SCRIPTED|AGENT_SITTING|" +
- "AGENT_TYPING|AGENT_WALKING|ALL_SIDES|ANIM_ON|ATTACH_AVATAR_CENTER|ATTACH_BACK|" +
- "ATTACH_BELLY|ATTACH_CHEST|ATTACH_CHIN|ATTACH_HEAD|ATTACH_HUD_BOTTOM|" +
- "ATTACH_HUD_BOTTOM_LEFT|ATTACH_HUD_BOTTOM_RIGHT|ATTACH_HUD_CENTER_1|ATTACH_HUD_CENTER_2|" +
- "ATTACH_HUD_TOP_CENTER|ATTACH_HUD_TOP_LEFT|ATTACH_HUD_TOP_RIGHT|ATTACH_LEAR|" +
- "ATTACH_LEFT_PEC|ATTACH_LEYE|ATTACH_LFOOT|ATTACH_LHAND|ATTACH_LHIP|ATTACH_LLARM|" +
- "ATTACH_LLLEG|ATTACH_LSHOULDER|ATTACH_LUARM|ATTACH_LULEG|ATTACH_MOUTH|" +
- "ATTACH_NECK|ATTACH_NOSE|ATTACH_PELVIS|ATTACH_REAR|ATTACH_REYE|ATTACH_RFOOT|" +
- "ATTACH_RHAND|ATTACH_RHIP|ATTACH_RIGHT_PEC|ATTACH_RLARM|ATTACH_RLLEG|" +
- "ATTACH_RSHOULDER|ATTACH_RUARM|ATTACH_RULEG|AVOID_CHARACTERS|AVOID_DYNAMIC_OBSTACLES|" +
- "AVOID_NONE|CAMERA_ACTIVE|CAMERA_BEHINDNESS_ANGLE|CAMERA_BEHINDNESS_LAG|" +
- "CAMERA_DISTANCE|CAMERA_FOCUS|CAMERA_FOCUS_LAG|CAMERA_FOCUS_LOCKED|CAMERA_FOCUS_OFFSET|" +
- "CAMERA_FOCUS_THRESHOLD|CAMERA_PITCH|CAMERA_POSITION|CAMERA_POSITION_LAG|" +
- "CAMERA_POSITION_LOCKED|CAMERA_POSITION_THRESHOLD|CHANGED_ALLOWED_DROP|" +
- "CHANGED_COLOR|CHANGED_INVENTORY|CHANGED_LINK|CHANGED_MEDIA|CHANGED_OWNER|" +
- "CHANGED_REGION|CHANGED_REGION_START|CHANGED_SCALE|CHANGED_SHAPE|CHANGED_TELEPORT|" +
- "CHANGED_TEXTURE|CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES|CHARACTER_AVOIDANCE_MODE|" +
- "CHARACTER_CMD_JUMP|CHARACTER_CMD_SMOOTH_STOP|CHARACTER_CMD_STOP|CHARACTER_DESIRED_SPEED|" +
- "CHARACTER_DESIRED_TURN_SPEED|CHARACTER_LENGTH|CHARACTER_MAX_ACCEL|CHARACTER_MAX_DECEL|" +
- "CHARACTER_MAX_SPEED|CHARACTER_MAX_TURN_RADIUS|CHARACTER_ORIENTATION|" +
- "CHARACTER_RADIUS|CHARACTER_STAY_WITHIN_PARCEL|CHARACTER_TYPE|CHARACTER_TYPE_A|" +
- "CHARACTER_TYPE_B|CHARACTER_TYPE_C|CHARACTER_TYPE_D|CHARACTER_TYPE_NONE|" +
- "CLICK_ACTION_BUY|CLICK_ACTION_NONE|CLICK_ACTION_OPEN|CLICK_ACTION_OPEN_MEDIA|" +
- "CLICK_ACTION_PAY|CLICK_ACTION_PLAY|CLICK_ACTION_SIT|CLICK_ACTION_TOUCH|" +
- "CONTENT_TYPE_ATOM|CONTENT_TYPE_FORM|CONTENT_TYPE_HTML|CONTENT_TYPE_JSON|" +
- "CONTENT_TYPE_LLSD|CONTENT_TYPE_RSS|CONTENT_TYPE_TEXT|CONTENT_TYPE_XHTML|" +
- "CONTENT_TYPE_XML|CONTROL_BACK|CONTROL_DOWN|CONTROL_FWD|CONTROL_LBUTTON|" +
- "CONTROL_LEFT|CONTROL_ML_LBUTTON|CONTROL_RIGHT|CONTROL_ROT_LEFT|CONTROL_ROT_RIGHT|" +
- "CONTROL_UP|DATA_BORN|DATA_NAME|DATA_ONLINE|DATA_PAYINFO|DATA_SIM_POS|" +
- "DATA_SIM_RATING|DATA_SIM_STATUS|DEBUG_CHANNEL|DENSITY|ERR_GENERIC|ERR_MALFORMED_PARAMS|" +
- "ERR_PARCEL_PERMISSIONS|ERR_RUNTIME_PERMISSIONS|ERR_THROTTLED|ESTATE_ACCESS_ALLOWED_AGENT_ADD|" +
- "ESTATE_ACCESS_ALLOWED_AGENT_REMOVE|ESTATE_ACCESS_ALLOWED_GROUP_ADD|ESTATE_ACCESS_ALLOWED_GROUP_REMOVE|" +
- "ESTATE_ACCESS_BANNED_AGENT_ADD|ESTATE_ACCESS_BANNED_AGENT_REMOVE|FORCE_DIRECT_PATH|" +
- "FRICTION|GCNP_RADIUS|GCNP_STATIC|GRAVITY_MULTIPLIER|HORIZONTAL|HTTP_BODY_MAXLENGTH|" +
- "HTTP_BODY_TRUNCATED|HTTP_CUSTOM_HEADER|HTTP_METHOD|HTTP_MIMETYPE|HTTP_PRAGMA_NO_CACHE|" +
- "HTTP_VERBOSE_THROTTLE|HTTP_VERIFY_CERT|INVENTORY_ALL|INVENTORY_ANIMATION|" +
- "INVENTORY_BODYPART|INVENTORY_CLOTHING|INVENTORY_GESTURE|INVENTORY_LANDMARK|" +
- "INVENTORY_NONE|INVENTORY_NOTECARD|INVENTORY_OBJECT|INVENTORY_SCRIPT|" +
- "INVENTORY_SOUND|INVENTORY_TEXTURE|JSON_APPEND|KFM_CMD_PAUSE|KFM_CMD_PLAY|" +
- "KFM_CMD_SET_MODE|KFM_CMD_STOP|KFM_COMMAND|KFM_DATA|KFM_FORWARD|KFM_LOOP|" +
- "KFM_MODE|KFM_PING_PONG|KFM_REVERSE|KFM_ROTATION|KFM_TRANSLATION|LAND_LEVEL|" +
- "LAND_LOWER|LAND_NOISE|LAND_RAISE|LAND_REVERT|LAND_SMOOTH|LINK_ALL_CHILDREN|" +
- "LINK_ALL_OTHERS|LINK_ROOT|LINK_SET|LINK_THIS|LIST_STAT_GEOMETRIC_MEAN|" +
- "LIST_STAT_MAX|LIST_STAT_MEAN|LIST_STAT_MEDIAN|LIST_STAT_MIN|LIST_STAT_NUM_COUNT|" +
- "LIST_STAT_RANGE|LIST_STAT_STD_DEV|LIST_STAT_SUM|LIST_STAT_SUM_SQUARES|" +
- "LOOP|MASK_BASE|MASK_EVERYONE|MASK_GROUP|MASK_NEXT|MASK_OWNER|OBJECT_ATTACHED_POINT|" +
- "OBJECT_CHARACTER_TIME|OBJECT_CREATOR|OBJECT_DESC|OBJECT_GROUP|OBJECT_NAME|" +
- "OBJECT_OWNER|OBJECT_PATHFINDING_TYPE|OBJECT_PHANTOM|OBJECT_PHYSICS|OBJECT_PHYSICS_COST|" +
- "OBJECT_POS|OBJECT_PRIM_EQUIVALENCE|OBJECT_RETURN_PARCEL|OBJECT_RETURN_PARCEL_OWNER|" +
- "OBJECT_RETURN_REGION|OBJECT_ROOT|OBJECT_ROT|OBJECT_RUNNING_SCRIPT_COUNT|" +
- "OBJECT_SCRIPT_MEMORY|OBJECT_SCRIPT_TIME|OBJECT_SERVER_COST|OBJECT_STREAMING_COST|" +
- "OBJECT_TEMP_ON_REZ|OBJECT_TOTAL_SCRIPT_COUNT|OBJECT_UNKNOWN_DETAIL|OBJECT_VELOCITY|" +
- "OPT_AVATAR|OPT_CHARACTER|OPT_EXCLUSION_VOLUME|OPT_LEGACY_LINKSET|OPT_MATERIAL_VOLUME|" +
- "OPT_OTHER|OPT_STATIC_OBSTACLE|OPT_WALKABLE|PARCEL_COUNT_GROUP|PARCEL_COUNT_OTHER|" +
- "PARCEL_COUNT_OWNER|PARCEL_COUNT_SELECTED|PARCEL_COUNT_TEMP|PARCEL_COUNT_TOTAL|" +
- "PARCEL_DETAILS_AREA|PARCEL_DETAILS_DESC|PARCEL_DETAILS_GROUP|PARCEL_DETAILS_ID|" +
- "PARCEL_DETAILS_NAME|PARCEL_DETAILS_OWNER|PARCEL_DETAILS_SEE_AVATARS|" +
- "PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS|" +
- "PARCEL_FLAG_ALLOW_CREATE_OBJECTS|PARCEL_FLAG_ALLOW_DAMAGE|PARCEL_FLAG_ALLOW_FLY|" +
- "PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_GROUP_SCRIPTS|" +
- "PARCEL_FLAG_ALLOW_LANDMARK|PARCEL_FLAG_ALLOW_SCRIPTS|PARCEL_FLAG_ALLOW_TERRAFORM|" +
- "PARCEL_FLAG_LOCAL_SOUND_ONLY|PARCEL_FLAG_RESTRICT_PUSHOBJECT|PARCEL_FLAG_USE_ACCESS_GROUP|" +
- "PARCEL_FLAG_USE_ACCESS_LIST|PARCEL_FLAG_USE_BAN_LIST|PARCEL_FLAG_USE_LAND_PASS_LIST|" +
- "PARCEL_MEDIA_COMMAND_AGENT|PARCEL_MEDIA_COMMAND_AUTO_ALIGN|PARCEL_MEDIA_COMMAND_DESC|" +
- "PARCEL_MEDIA_COMMAND_LOOP|PARCEL_MEDIA_COMMAND_LOOP_SET|PARCEL_MEDIA_COMMAND_PAUSE|" +
- "PARCEL_MEDIA_COMMAND_PLAY|PARCEL_MEDIA_COMMAND_SIZE|PARCEL_MEDIA_COMMAND_STOP|" +
- "PARCEL_MEDIA_COMMAND_TEXTURE|PARCEL_MEDIA_COMMAND_TIME|PARCEL_MEDIA_COMMAND_TYPE|" +
- "PARCEL_MEDIA_COMMAND_UNLOAD|PARCEL_MEDIA_COMMAND_URL|PASSIVE|PATROL_PAUSE_AT_WAYPOINTS|" +
- "PAY_DEFAULT|PAY_HIDE|PAYMENT_INFO_ON_FILE|PAYMENT_INFO_USED|PERM_ALL|" +
- "PERM_COPY|PERM_MODIFY|PERM_MOVE|PERM_TRANSFER|PERMISSION_ATTACH|PERMISSION_CHANGE_LINKS|" +
- "PERMISSION_CONTROL_CAMERA|PERMISSION_DEBIT|PERMISSION_OVERRIDE_ANIMATIONS|" +
- "PERMISSION_RETURN_OBJECTS|PERMISSION_SILENT_ESTATE_MANAGEMENT|PERMISSION_TAKE_CONTROLS|" +
- "PERMISSION_TELEPORT|PERMISSION_TRACK_CAMERA|PERMISSION_TRIGGER_ANIMATION|" +
- "PING_PONG|PRIM_BUMP_BARK|PRIM_BUMP_BLOBS|PRIM_BUMP_BRICKS|PRIM_BUMP_BRIGHT|" +
- "PRIM_BUMP_CHECKER|PRIM_BUMP_CONCRETE|PRIM_BUMP_DARK|PRIM_BUMP_DISKS|" +
- "PRIM_BUMP_GRAVEL|PRIM_BUMP_LARGETILE|PRIM_BUMP_NONE|PRIM_BUMP_SHINY|" +
- "PRIM_BUMP_SIDING|PRIM_BUMP_STONE|PRIM_BUMP_STUCCO|PRIM_BUMP_SUCTION|" +
- "PRIM_BUMP_TILE|PRIM_BUMP_WEAVE|PRIM_BUMP_WOOD|PRIM_COLOR|PRIM_DESC|PRIM_FLEXIBLE|" +
- "PRIM_FULLBRIGHT|PRIM_GLOW|PRIM_HOLE_CIRCLE|PRIM_HOLE_DEFAULT|PRIM_HOLE_SQUARE|" +
- "PRIM_HOLE_TRIANGLE|PRIM_LINK_TARGET|PRIM_MATERIAL|PRIM_MATERIAL_FLESH|" +
- "PRIM_MATERIAL_GLASS|PRIM_MATERIAL_METAL|PRIM_MATERIAL_PLASTIC|PRIM_MATERIAL_RUBBER|" +
- "PRIM_MATERIAL_STONE|PRIM_MATERIAL_WOOD|PRIM_MEDIA_ALT_IMAGE_ENABLE|PRIM_MEDIA_AUTO_LOOP|" +
- "PRIM_MEDIA_AUTO_PLAY|PRIM_MEDIA_AUTO_SCALE|PRIM_MEDIA_AUTO_ZOOM|PRIM_MEDIA_CONTROLS|" +
- "PRIM_MEDIA_CONTROLS_MINI|PRIM_MEDIA_CONTROLS_STANDARD|PRIM_MEDIA_CURRENT_URL|" +
- "PRIM_MEDIA_FIRST_CLICK_INTERACT|PRIM_MEDIA_HEIGHT_PIXELS|PRIM_MEDIA_HOME_URL|" +
- "PRIM_MEDIA_MAX_HEIGHT_PIXELS|PRIM_MEDIA_MAX_URL_LENGTH|PRIM_MEDIA_MAX_WHITELIST_COUNT|" +
- "PRIM_MEDIA_MAX_WHITELIST_SIZE|PRIM_MEDIA_MAX_WIDTH_PIXELS|PRIM_MEDIA_PARAM_MAX|" +
- "PRIM_MEDIA_PERM_ANYONE|PRIM_MEDIA_PERM_GROUP|PRIM_MEDIA_PERM_NONE|PRIM_MEDIA_PERM_OWNER|" +
- "PRIM_MEDIA_PERMS_CONTROL|PRIM_MEDIA_PERMS_INTERACT|PRIM_MEDIA_WHITELIST|" +
- "PRIM_MEDIA_WHITELIST_ENABLE|PRIM_MEDIA_WIDTH_PIXELS|PRIM_NAME|PRIM_OMEGA|" +
- "PRIM_PHANTOM|PRIM_PHYSICS|PRIM_PHYSICS_SHAPE_CONVEX|PRIM_PHYSICS_SHAPE_NONE|" +
- "PRIM_PHYSICS_SHAPE_PRIM|PRIM_PHYSICS_SHAPE_TYPE|PRIM_POINT_LIGHT|PRIM_POS_LOCAL|" +
- "PRIM_POSITION|PRIM_ROT_LOCAL|PRIM_ROTATION|PRIM_SCULPT_FLAG_INVERT|PRIM_SCULPT_FLAG_MIRROR|" +
- "PRIM_SCULPT_TYPE_CYLINDER|PRIM_SCULPT_TYPE_MASK|PRIM_SCULPT_TYPE_PLANE|" +
- "PRIM_SCULPT_TYPE_SPHERE|PRIM_SCULPT_TYPE_TORUS|PRIM_SHINY_HIGH|PRIM_SHINY_LOW|" +
- "PRIM_SHINY_MEDIUM|PRIM_SHINY_NONE|PRIM_SIZE|PRIM_SLICE|PRIM_TEMP_ON_REZ|" +
- "PRIM_TEXGEN|PRIM_TEXGEN_DEFAULT|PRIM_TEXGEN_PLANAR|PRIM_TEXT|PRIM_TEXTURE|" +
- "PRIM_TYPE|PRIM_TYPE_BOX|PRIM_TYPE_CYLINDER|PRIM_TYPE_PRISM|PRIM_TYPE_RING|" +
- "PRIM_TYPE_SCULPT|PRIM_TYPE_SPHERE|PRIM_TYPE_TORUS|PRIM_TYPE_TUBE|PROFILE_NONE|" +
- "PROFILE_SCRIPT_MEMORY|PSYS_PART_BOUNCE_MASK|PSYS_PART_EMISSIVE_MASK|" +
- "PSYS_PART_END_ALPHA|PSYS_PART_END_COLOR|PSYS_PART_END_SCALE|PSYS_PART_FLAGS|" +
- "PSYS_PART_FOLLOW_SRC_MASK|PSYS_PART_FOLLOW_VELOCITY_MASK|PSYS_PART_INTERP_COLOR_MASK|" +
- "PSYS_PART_INTERP_SCALE_MASK|PSYS_PART_MAX_AGE|PSYS_PART_START_ALPHA|" +
- "PSYS_PART_START_COLOR|PSYS_PART_START_SCALE|PSYS_PART_TARGET_LINEAR_MASK|" +
- "PSYS_PART_TARGET_POS_MASK|PSYS_PART_WIND_MASK|PSYS_SRC_ACCEL|PSYS_SRC_ANGLE_BEGIN|" +
- "PSYS_SRC_ANGLE_END|PSYS_SRC_BURST_PART_COUNT|PSYS_SRC_BURST_RADIUS|PSYS_SRC_BURST_RATE|" +
- "PSYS_SRC_BURST_SPEED_MAX|PSYS_SRC_BURST_SPEED_MIN|PSYS_SRC_MAX_AGE|PSYS_SRC_OMEGA|" +
- "PSYS_SRC_PATTERN|PSYS_SRC_PATTERN_ANGLE|PSYS_SRC_PATTERN_ANGLE_CONE|" +
- "PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY|PSYS_SRC_PATTERN_DROP|PSYS_SRC_PATTERN_EXPLODE|" +
- "PSYS_SRC_TARGET_KEY|PSYS_SRC_TEXTURE|PU_EVADE_HIDDEN|PU_EVADE_SPOTTED|" +
- "PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED|PU_FAILURE_INVALID_GOAL|PU_FAILURE_INVALID_START|" +
- "PU_FAILURE_NO_NAVMESH|PU_FAILURE_NO_VALID_DESTINATION|PU_FAILURE_OTHER|" +
- "PU_FAILURE_PARCEL_UNREACHABLE|PU_FAILURE_TARGET_GONE|PU_FAILURE_UNREACHABLE|" +
- "PU_GOAL_REACHED|PU_SLOWDOWN_DISTANCE_REACHED|PUBLIC_CHANNEL|PURSUIT_FUZZ_FACTOR|" +
- "PURSUIT_GOAL_TOLERANCE|PURSUIT_INTERCEPT|PURSUIT_OFFSET|RC_DATA_FLAGS|" +
- "RC_DETECT_PHANTOM|RC_GET_LINK_NUM|RC_GET_NORMAL|RC_GET_ROOT_KEY|RC_MAX_HITS|" +
- "RC_REJECT_AGENTS|RC_REJECT_LAND|RC_REJECT_NONPHYSICAL|RC_REJECT_PHYSICAL|" +
- "RC_REJECT_TYPES|RCERR_CAST_TIME_EXCEEDED|RCERR_SIM_PERF_LOW|RCERR_UNKNOWN|" +
- "REGION_FLAG_ALLOW_DAMAGE|REGION_FLAG_ALLOW_DIRECT_TELEPORT|REGION_FLAG_BLOCK_FLY|" +
- "REGION_FLAG_BLOCK_TERRAFORM|REGION_FLAG_DISABLE_COLLISIONS|REGION_FLAG_DISABLE_PHYSICS|" +
- "REGION_FLAG_FIXED_SUN|REGION_FLAG_RESTRICT_PUSHOBJECT|REGION_FLAG_SANDBOX|" +
- "REMOTE_DATA_CHANNEL|REMOTE_DATA_REPLY|REMOTE_DATA_REQUEST|REQUIRE_LINE_OF_SIGHT|" +
- "RESTITUTION|REVERSE|ROTATE|SCALE|SCRIPTED|SIM_STAT_PCT_CHARS_STEPPED|" +
- "SMOOTH|STATUS_BLOCK_GRAB|STATUS_BLOCK_GRAB_OBJECT|STATUS_BOUNDS_ERROR|" +
- "STATUS_CAST_SHADOWS|STATUS_DIE_AT_EDGE|STATUS_INTERNAL_ERROR|STATUS_MALFORMED_PARAMS|" +
- "STATUS_NOT_FOUND|STATUS_NOT_SUPPORTED|STATUS_OK|STATUS_PHANTOM|STATUS_PHYSICS|" +
- "STATUS_RETURN_AT_EDGE|STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z|" +
- "STATUS_SANDBOX|STATUS_TYPE_MISMATCH|STATUS_WHITELIST_FAILED|STRING_TRIM|" +
- "STRING_TRIM_HEAD|STRING_TRIM_TAIL|TOUCH_INVALID_FACE|TRAVERSAL_TYPE|" +
- "TRAVERSAL_TYPE_FAST|TRAVERSAL_TYPE_NONE|TRAVERSAL_TYPE_SLOW|TYPE_FLOAT|" +
- "TYPE_INTEGER|TYPE_INVALID|TYPE_KEY|TYPE_ROTATION|TYPE_STRING|TYPE_VECTOR|" +
- "VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY|VEHICLE_ANGULAR_DEFLECTION_TIMESCALE|" +
- "VEHICLE_ANGULAR_FRICTION_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE|" +
- "VEHICLE_ANGULAR_MOTOR_DIRECTION|VEHICLE_ANGULAR_MOTOR_TIMESCALE|VEHICLE_BANKING_EFFICIENCY|" +
- "VEHICLE_BANKING_MIX|VEHICLE_BANKING_TIMESCALE|VEHICLE_BUOYANCY|VEHICLE_FLAG_CAMERA_DECOUPLED|" +
- "VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT|VEHICLE_FLAG_HOVER_TERRAIN_ONLY|VEHICLE_FLAG_HOVER_UP_ONLY|" +
- "VEHICLE_FLAG_HOVER_WATER_ONLY|VEHICLE_FLAG_LIMIT_MOTOR_UP|VEHICLE_FLAG_LIMIT_ROLL_ONLY|" +
- "VEHICLE_FLAG_MOUSELOOK_BANK|VEHICLE_FLAG_MOUSELOOK_STEER|VEHICLE_FLAG_NO_DEFLECTION_UP|" +
- "VEHICLE_HOVER_EFFICIENCY|VEHICLE_HOVER_HEIGHT|VEHICLE_HOVER_TIMESCALE|" +
- "VEHICLE_LINEAR_DEFLECTION_EFFICIENCY|VEHICLE_LINEAR_DEFLECTION_TIMESCALE|" +
- "VEHICLE_LINEAR_FRICTION_TIMESCALE|VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE|" +
- "VEHICLE_LINEAR_MOTOR_DIRECTION|VEHICLE_LINEAR_MOTOR_OFFSET|VEHICLE_LINEAR_MOTOR_TIMESCALE|" +
- "VEHICLE_REFERENCE_FRAME|VEHICLE_TYPE_AIRPLANE|VEHICLE_TYPE_BALLOON|VEHICLE_TYPE_BOAT|" +
- "VEHICLE_TYPE_CAR|VEHICLE_TYPE_NONE|VEHICLE_TYPE_SLED|VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY|" +
- "VEHICLE_VERTICAL_ATTRACTION_TIMESCALE|VERTICAL|WANDER_PAUSE_AT_WAYPOINTS",
+ "constant.language.integer.lsl": "ACTIVE|AGENT|AGENT_ALWAYS_RUN|AGENT_ATTACHMENTS|AGENT_AUTOPILOT|AGENT_AWAY|AGENT_BUSY|AGENT_BY_LEGACY_NAME|AGENT_BY_USERNAME|AGENT_CROUCHING|AGENT_FLYING|AGENT_IN_AIR|AGENT_LIST_PARCEL|AGENT_LIST_PARCEL_OWNER|AGENT_LIST_REGION|AGENT_MOUSELOOK|AGENT_ON_OBJECT|AGENT_SCRIPTED|AGENT_SITTING|AGENT_TYPING|AGENT_WALKING|ALL_SIDES|ANIM_ON|ATTACH_AVATAR_CENTER|ATTACH_BACK|ATTACH_BELLY|ATTACH_CHEST|ATTACH_CHIN|ATTACH_HEAD|ATTACH_HUD_BOTTOM|ATTACH_HUD_BOTTOM_LEFT|ATTACH_HUD_BOTTOM_RIGHT|ATTACH_HUD_CENTER_1|ATTACH_HUD_CENTER_2|ATTACH_HUD_TOP_CENTER|ATTACH_HUD_TOP_LEFT|ATTACH_HUD_TOP_RIGHT|ATTACH_LEAR|ATTACH_LEFT_PEC|ATTACH_LEYE|ATTACH_LFOOT|ATTACH_LHAND|ATTACH_LHIP|ATTACH_LLARM|ATTACH_LLLEG|ATTACH_LSHOULDER|ATTACH_LUARM|ATTACH_LULEG|ATTACH_MOUTH|ATTACH_NECK|ATTACH_NOSE|ATTACH_PELVIS|ATTACH_REAR|ATTACH_REYE|ATTACH_RFOOT|ATTACH_RHAND|ATTACH_RHIP|ATTACH_RIGHT_PEC|ATTACH_RLARM|ATTACH_RLLEG|ATTACH_RSHOULDER|ATTACH_RUARM|ATTACH_RULEG|AVOID_CHARACTERS|AVOID_DYNAMIC_OBSTACLES|AVOID_NONE|CAMERA_ACTIVE|CAMERA_BEHINDNESS_ANGLE|CAMERA_BEHINDNESS_LAG|CAMERA_DISTANCE|CAMERA_FOCUS|CAMERA_FOCUS_LAG|CAMERA_FOCUS_LOCKED|CAMERA_FOCUS_OFFSET|CAMERA_FOCUS_THRESHOLD|CAMERA_PITCH|CAMERA_POSITION|CAMERA_POSITION_LAG|CAMERA_POSITION_LOCKED|CAMERA_POSITION_THRESHOLD|CHANGED_ALLOWED_DROP|CHANGED_COLOR|CHANGED_INVENTORY|CHANGED_LINK|CHANGED_MEDIA|CHANGED_OWNER|CHANGED_REGION|CHANGED_REGION_START|CHANGED_SCALE|CHANGED_SHAPE|CHANGED_TELEPORT|CHANGED_TEXTURE|CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES|CHARACTER_AVOIDANCE_MODE|CHARACTER_CMD_JUMP|CHARACTER_CMD_SMOOTH_STOP|CHARACTER_CMD_STOP|CHARACTER_DESIRED_SPEED|CHARACTER_DESIRED_TURN_SPEED|CHARACTER_LENGTH|CHARACTER_MAX_ACCEL|CHARACTER_MAX_DECEL|CHARACTER_MAX_SPEED|CHARACTER_MAX_TURN_RADIUS|CHARACTER_ORIENTATION|CHARACTER_RADIUS|CHARACTER_STAY_WITHIN_PARCEL|CHARACTER_TYPE|CHARACTER_TYPE_A|CHARACTER_TYPE_B|CHARACTER_TYPE_C|CHARACTER_TYPE_D|CHARACTER_TYPE_NONE|CLICK_ACTION_BUY|CLICK_ACTION_NONE|CLICK_ACTION_OPEN|CLICK_ACTION_OPEN_MEDIA|CLICK_ACTION_PAY|CLICK_ACTION_PLAY|CLICK_ACTION_SIT|CLICK_ACTION_TOUCH|CONTENT_TYPE_ATOM|CONTENT_TYPE_FORM|CONTENT_TYPE_HTML|CONTENT_TYPE_JSON|CONTENT_TYPE_LLSD|CONTENT_TYPE_RSS|CONTENT_TYPE_TEXT|CONTENT_TYPE_XHTML|CONTENT_TYPE_XML|CONTROL_BACK|CONTROL_DOWN|CONTROL_FWD|CONTROL_LBUTTON|CONTROL_LEFT|CONTROL_ML_LBUTTON|CONTROL_RIGHT|CONTROL_ROT_LEFT|CONTROL_ROT_RIGHT|CONTROL_UP|DATA_BORN|DATA_NAME|DATA_ONLINE|DATA_PAYINFO|DATA_SIM_POS|DATA_SIM_RATING|DATA_SIM_STATUS|DEBUG_CHANNEL|DENSITY|ERR_GENERIC|ERR_MALFORMED_PARAMS|ERR_PARCEL_PERMISSIONS|ERR_RUNTIME_PERMISSIONS|ERR_THROTTLED|ESTATE_ACCESS_ALLOWED_AGENT_ADD|ESTATE_ACCESS_ALLOWED_AGENT_REMOVE|ESTATE_ACCESS_ALLOWED_GROUP_ADD|ESTATE_ACCESS_ALLOWED_GROUP_REMOVE|ESTATE_ACCESS_BANNED_AGENT_ADD|ESTATE_ACCESS_BANNED_AGENT_REMOVE|FALSE|FORCE_DIRECT_PATH|FRICTION|GCNP_RADIUS|GCNP_STATIC|GRAVITY_MULTIPLIER|HORIZONTAL|HTTP_BODY_MAXLENGTH|HTTP_BODY_TRUNCATED|HTTP_CUSTOM_HEADER|HTTP_METHOD|HTTP_MIMETYPE|HTTP_PRAGMA_NO_CACHE|HTTP_VERBOSE_THROTTLE|HTTP_VERIFY_CERT|INVENTORY_ALL|INVENTORY_ANIMATION|INVENTORY_BODYPART|INVENTORY_CLOTHING|INVENTORY_GESTURE|INVENTORY_LANDMARK|INVENTORY_NONE|INVENTORY_NOTECARD|INVENTORY_OBJECT|INVENTORY_SCRIPT|INVENTORY_SOUND|INVENTORY_TEXTURE|JSON_APPEND|KFM_CMD_PAUSE|KFM_CMD_PLAY|KFM_CMD_SET_MODE|KFM_CMD_STOP|KFM_COMMAND|KFM_DATA|KFM_FORWARD|KFM_LOOP|KFM_MODE|KFM_PING_PONG|KFM_REVERSE|KFM_ROTATION|KFM_TRANSLATION|LAND_LEVEL|LAND_LOWER|LAND_NOISE|LAND_RAISE|LAND_REVERT|LAND_SMOOTH|LINK_ALL_CHILDREN|LINK_ALL_OTHERS|LINK_ROOT|LINK_SET|LINK_THIS|LIST_STAT_GEOMETRIC_MEAN|LIST_STAT_MAX|LIST_STAT_MEAN|LIST_STAT_MEDIAN|LIST_STAT_MIN|LIST_STAT_NUM_COUNT|LIST_STAT_RANGE|LIST_STAT_STD_DEV|LIST_STAT_SUM|LIST_STAT_SUM_SQUARES|LOOP|MASK_BASE|MASK_EVERYONE|MASK_GROUP|MASK_NEXT|MASK_OWNER|OBJECT_ATTACHED_POINT|OBJECT_CHARACTER_TIME|OBJECT_CREATOR|OBJECT_DESC|OBJECT_GROUP|OBJECT_NAME|OBJECT_OWNER|OBJECT_PATHFINDING_TYPE|OBJECT_PHANTOM|OBJECT_PHYSICS|OBJECT_PHYSICS_COST|OBJECT_POS|OBJECT_PRIM_EQUIVALENCE|OBJECT_RENDER_WEIGHT|OBJECT_RETURN_PARCEL|OBJECT_RETURN_PARCEL_OWNER|OBJECT_RETURN_REGION|OBJECT_ROOT|OBJECT_ROT|OBJECT_RUNNING_SCRIPT_COUNT|OBJECT_SCRIPT_MEMORY|OBJECT_SCRIPT_TIME|OBJECT_SERVER_COST|OBJECT_STREAMING_COST|OBJECT_TEMP_ON_REZ|OBJECT_TOTAL_SCRIPT_COUNT|OBJECT_UNKNOWN_DETAIL|OBJECT_VELOCITY|OPT_AVATAR|OPT_CHARACTER|OPT_EXCLUSION_VOLUME|OPT_LEGACY_LINKSET|OPT_MATERIAL_VOLUME|OPT_OTHER|OPT_STATIC_OBSTACLE|OPT_WALKABLE|PARCEL_COUNT_GROUP|PARCEL_COUNT_OTHER|PARCEL_COUNT_OWNER|PARCEL_COUNT_SELECTED|PARCEL_COUNT_TEMP|PARCEL_COUNT_TOTAL|PARCEL_DETAILS_AREA|PARCEL_DETAILS_DESC|PARCEL_DETAILS_GROUP|PARCEL_DETAILS_ID|PARCEL_DETAILS_NAME|PARCEL_DETAILS_OWNER|PARCEL_DETAILS_SEE_AVATARS|PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS|PARCEL_FLAG_ALLOW_CREATE_OBJECTS|PARCEL_FLAG_ALLOW_DAMAGE|PARCEL_FLAG_ALLOW_FLY|PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_GROUP_SCRIPTS|PARCEL_FLAG_ALLOW_LANDMARK|PARCEL_FLAG_ALLOW_SCRIPTS|PARCEL_FLAG_ALLOW_TERRAFORM|PARCEL_FLAG_LOCAL_SOUND_ONLY|PARCEL_FLAG_RESTRICT_PUSHOBJECT|PARCEL_FLAG_USE_ACCESS_GROUP|PARCEL_FLAG_USE_ACCESS_LIST|PARCEL_FLAG_USE_BAN_LIST|PARCEL_FLAG_USE_LAND_PASS_LIST|PARCEL_MEDIA_COMMAND_AGENT|PARCEL_MEDIA_COMMAND_AUTO_ALIGN|PARCEL_MEDIA_COMMAND_DESC|PARCEL_MEDIA_COMMAND_LOOP|PARCEL_MEDIA_COMMAND_LOOP_SET|PARCEL_MEDIA_COMMAND_PAUSE|PARCEL_MEDIA_COMMAND_PLAY|PARCEL_MEDIA_COMMAND_SIZE|PARCEL_MEDIA_COMMAND_STOP|PARCEL_MEDIA_COMMAND_TEXTURE|PARCEL_MEDIA_COMMAND_TIME|PARCEL_MEDIA_COMMAND_TYPE|PARCEL_MEDIA_COMMAND_UNLOAD|PARCEL_MEDIA_COMMAND_URL|PASSIVE|PATROL_PAUSE_AT_WAYPOINTS|PAYMENT_INFO_ON_FILE|PAYMENT_INFO_USED|PAY_DEFAULT|PAY_HIDE|PERMISSION_ATTACH|PERMISSION_CHANGE_LINKS|PERMISSION_CONTROL_CAMERA|PERMISSION_DEBIT|PERMISSION_OVERRIDE_ANIMATIONS|PERMISSION_RETURN_OBJECTS|PERMISSION_SILENT_ESTATE_MANAGEMENT|PERMISSION_TAKE_CONTROLS|PERMISSION_TELEPORT|PERMISSION_TRACK_CAMERA|PERMISSION_TRIGGER_ANIMATION|PERM_ALL|PERM_COPY|PERM_MODIFY|PERM_MOVE|PERM_TRANSFER|PING_PONG|PRIM_BUMP_BARK|PRIM_BUMP_BLOBS|PRIM_BUMP_BRICKS|PRIM_BUMP_BRIGHT|PRIM_BUMP_CHECKER|PRIM_BUMP_CONCRETE|PRIM_BUMP_DARK|PRIM_BUMP_DISKS|PRIM_BUMP_GRAVEL|PRIM_BUMP_LARGETILE|PRIM_BUMP_NONE|PRIM_BUMP_SHINY|PRIM_BUMP_SIDING|PRIM_BUMP_STONE|PRIM_BUMP_STUCCO|PRIM_BUMP_SUCTION|PRIM_BUMP_TILE|PRIM_BUMP_WEAVE|PRIM_BUMP_WOOD|PRIM_COLOR|PRIM_DESC|PRIM_FLEXIBLE|PRIM_FULLBRIGHT|PRIM_GLOW|PRIM_HOLE_CIRCLE|PRIM_HOLE_DEFAULT|PRIM_HOLE_SQUARE|PRIM_HOLE_TRIANGLE|PRIM_LINK_TARGET|PRIM_MATERIAL|PRIM_MATERIAL_FLESH|PRIM_MATERIAL_GLASS|PRIM_MATERIAL_METAL|PRIM_MATERIAL_PLASTIC|PRIM_MATERIAL_RUBBER|PRIM_MATERIAL_STONE|PRIM_MATERIAL_WOOD|PRIM_MEDIA_ALT_IMAGE_ENABLE|PRIM_MEDIA_AUTO_LOOP|PRIM_MEDIA_AUTO_PLAY|PRIM_MEDIA_AUTO_SCALE|PRIM_MEDIA_AUTO_ZOOM|PRIM_MEDIA_CONTROLS|PRIM_MEDIA_CONTROLS_MINI|PRIM_MEDIA_CONTROLS_STANDARD|PRIM_MEDIA_CURRENT_URL|PRIM_MEDIA_FIRST_CLICK_INTERACT|PRIM_MEDIA_HEIGHT_PIXELS|PRIM_MEDIA_HOME_URL|PRIM_MEDIA_MAX_HEIGHT_PIXELS|PRIM_MEDIA_MAX_URL_LENGTH|PRIM_MEDIA_MAX_WHITELIST_COUNT|PRIM_MEDIA_MAX_WHITELIST_SIZE|PRIM_MEDIA_MAX_WIDTH_PIXELS|PRIM_MEDIA_PARAM_MAX|PRIM_MEDIA_PERMS_CONTROL|PRIM_MEDIA_PERMS_INTERACT|PRIM_MEDIA_PERM_ANYONE|PRIM_MEDIA_PERM_GROUP|PRIM_MEDIA_PERM_NONE|PRIM_MEDIA_PERM_OWNER|PRIM_MEDIA_WHITELIST|PRIM_MEDIA_WHITELIST_ENABLE|PRIM_MEDIA_WIDTH_PIXELS|PRIM_NAME|PRIM_OMEGA|PRIM_PHANTOM|PRIM_PHYSICS|PRIM_PHYSICS_SHAPE_CONVEX|PRIM_PHYSICS_SHAPE_NONE|PRIM_PHYSICS_SHAPE_PRIM|PRIM_PHYSICS_SHAPE_TYPE|PRIM_POINT_LIGHT|PRIM_POSITION|PRIM_POS_LOCAL|PRIM_ROTATION|PRIM_ROT_LOCAL|PRIM_SCULPT_FLAG_INVERT|PRIM_SCULPT_FLAG_MIRROR|PRIM_SCULPT_TYPE_CYLINDER|PRIM_SCULPT_TYPE_MASK|PRIM_SCULPT_TYPE_PLANE|PRIM_SCULPT_TYPE_SPHERE|PRIM_SCULPT_TYPE_TORUS|PRIM_SHINY_HIGH|PRIM_SHINY_LOW|PRIM_SHINY_MEDIUM|PRIM_SHINY_NONE|PRIM_SIZE|PRIM_SLICE|PRIM_TEMP_ON_REZ|PRIM_TEXGEN|PRIM_TEXGEN_DEFAULT|PRIM_TEXGEN_PLANAR|PRIM_TEXT|PRIM_TEXTURE|PRIM_TYPE|PRIM_TYPE_BOX|PRIM_TYPE_CYLINDER|PRIM_TYPE_PRISM|PRIM_TYPE_RING|PRIM_TYPE_SCULPT|PRIM_TYPE_SPHERE|PRIM_TYPE_TORUS|PRIM_TYPE_TUBE|PROFILE_NONE|PROFILE_SCRIPT_MEMORY|PSYS_PART_BF_DEST_COLOR|PSYS_PART_BF_ONE|PSYS_PART_BF_ONE_MINUS_DEST_COLOR|PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA|PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR|PSYS_PART_BF_SOURCE_ALPHA|PSYS_PART_BF_SOURCE_COLOR|PSYS_PART_BF_ZERO|PSYS_PART_BLEND_FUNC_DEST|PSYS_PART_BLEND_FUNC_SOURCE|PSYS_PART_BOUNCE_MASK|PSYS_PART_EMISSIVE_MASK|PSYS_PART_END_ALPHA|PSYS_PART_END_COLOR|PSYS_PART_END_GLOW|PSYS_PART_END_SCALE|PSYS_PART_FLAGS|PSYS_PART_FOLLOW_SRC_MASK|PSYS_PART_FOLLOW_VELOCITY_MASK|PSYS_PART_INTERP_COLOR_MASK|PSYS_PART_INTERP_SCALE_MASK|PSYS_PART_MAX_AGE|PSYS_PART_RIBBON_MASK|PSYS_PART_START_ALPHA|PSYS_PART_START_COLOR|PSYS_PART_START_GLOW|PSYS_PART_START_SCALE|PSYS_PART_TARGET_LINEAR_MASK|PSYS_PART_TARGET_POS_MASK|PSYS_PART_WIND_MASK|PSYS_SRC_ACCEL|PSYS_SRC_ANGLE_BEGIN|PSYS_SRC_ANGLE_END|PSYS_SRC_BURST_PART_COUNT|PSYS_SRC_BURST_RADIUS|PSYS_SRC_BURST_RATE|PSYS_SRC_BURST_SPEED_MAX|PSYS_SRC_BURST_SPEED_MIN|PSYS_SRC_MAX_AGE|PSYS_SRC_OMEGA|PSYS_SRC_PATTERN|PSYS_SRC_PATTERN_ANGLE|PSYS_SRC_PATTERN_ANGLE_CONE|PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY|PSYS_SRC_PATTERN_DROP|PSYS_SRC_PATTERN_EXPLODE|PSYS_SRC_TARGET_KEY|PSYS_SRC_TEXTURE|PUBLIC_CHANNEL|PURSUIT_FUZZ_FACTOR|PURSUIT_GOAL_TOLERANCE|PURSUIT_INTERCEPT|PURSUIT_OFFSET|PU_EVADE_HIDDEN|PU_EVADE_SPOTTED|PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED|PU_FAILURE_INVALID_GOAL|PU_FAILURE_INVALID_START|PU_FAILURE_NO_NAVMESH|PU_FAILURE_NO_VALID_DESTINATION|PU_FAILURE_OTHER|PU_FAILURE_PARCEL_UNREACHABLE|PU_FAILURE_TARGET_GONE|PU_FAILURE_UNREACHABLE|PU_GOAL_REACHED|PU_SLOWDOWN_DISTANCE_REACHED|RCERR_CAST_TIME_EXCEEDED|RCERR_SIM_PERF_LOW|RCERR_UNKNOWN|RC_DATA_FLAGS|RC_DETECT_PHANTOM|RC_GET_LINK_NUM|RC_GET_NORMAL|RC_GET_ROOT_KEY|RC_MAX_HITS|RC_REJECT_AGENTS|RC_REJECT_LAND|RC_REJECT_NONPHYSICAL|RC_REJECT_PHYSICAL|RC_REJECT_TYPES|REGION_FLAG_ALLOW_DAMAGE|REGION_FLAG_ALLOW_DIRECT_TELEPORT|REGION_FLAG_BLOCK_FLY|REGION_FLAG_BLOCK_TERRAFORM|REGION_FLAG_DISABLE_COLLISIONS|REGION_FLAG_DISABLE_PHYSICS|REGION_FLAG_FIXED_SUN|REGION_FLAG_RESTRICT_PUSHOBJECT|REGION_FLAG_SANDBOX|REMOTE_DATA_CHANNEL|REMOTE_DATA_REPLY|REMOTE_DATA_REQUEST|REQUIRE_LINE_OF_SIGHT|RESTITUTION|REVERSE|ROTATE|SCALE|SCRIPTED|SIM_STAT_PCT_CHARS_STEPPED|SMOOTH|STATUS_BLOCK_GRAB|STATUS_BLOCK_GRAB_OBJECT|STATUS_BOUNDS_ERROR|STATUS_CAST_SHADOWS|STATUS_DIE_AT_EDGE|STATUS_INTERNAL_ERROR|STATUS_MALFORMED_PARAMS|STATUS_NOT_FOUND|STATUS_NOT_SUPPORTED|STATUS_OK|STATUS_PHANTOM|STATUS_PHYSICS|STATUS_RETURN_AT_EDGE|STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z|STATUS_SANDBOX|STATUS_TYPE_MISMATCH|STATUS_WHITELIST_FAILED|STRING_TRIM|STRING_TRIM_HEAD|STRING_TRIM_TAIL|TOUCH_INVALID_FACE|TRAVERSAL_TYPE|TRAVERSAL_TYPE_FAST|TRAVERSAL_TYPE_NONE|TRAVERSAL_TYPE_SLOW|TRUE|TYPE_FLOAT|TYPE_INTEGER|TYPE_INVALID|TYPE_KEY|TYPE_ROTATION|TYPE_STRING|TYPE_VECTOR|VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY|VEHICLE_ANGULAR_DEFLECTION_TIMESCALE|VEHICLE_ANGULAR_FRICTION_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DIRECTION|VEHICLE_ANGULAR_MOTOR_TIMESCALE|VEHICLE_BANKING_EFFICIENCY|VEHICLE_BANKING_MIX|VEHICLE_BANKING_TIMESCALE|VEHICLE_BUOYANCY|VEHICLE_FLAG_CAMERA_DECOUPLED|VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT|VEHICLE_FLAG_HOVER_TERRAIN_ONLY|VEHICLE_FLAG_HOVER_UP_ONLY|VEHICLE_FLAG_HOVER_WATER_ONLY|VEHICLE_FLAG_LIMIT_MOTOR_UP|VEHICLE_FLAG_LIMIT_ROLL_ONLY|VEHICLE_FLAG_MOUSELOOK_BANK|VEHICLE_FLAG_MOUSELOOK_STEER|VEHICLE_FLAG_NO_DEFLECTION_UP|VEHICLE_HOVER_EFFICIENCY|VEHICLE_HOVER_HEIGHT|VEHICLE_HOVER_TIMESCALE|VEHICLE_LINEAR_DEFLECTION_EFFICIENCY|VEHICLE_LINEAR_DEFLECTION_TIMESCALE|VEHICLE_LINEAR_FRICTION_TIMESCALE|VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE|VEHICLE_LINEAR_MOTOR_DIRECTION|VEHICLE_LINEAR_MOTOR_OFFSET|VEHICLE_LINEAR_MOTOR_TIMESCALE|VEHICLE_REFERENCE_FRAME|VEHICLE_TYPE_AIRPLANE|VEHICLE_TYPE_BALLOON|VEHICLE_TYPE_BOAT|VEHICLE_TYPE_CAR|VEHICLE_TYPE_NONE|VEHICLE_TYPE_SLED|VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY|VEHICLE_VERTICAL_ATTRACTION_TIMESCALE|VERTICAL|WANDER_PAUSE_AT_WAYPOINTS",
"constant.language.integer.boolean.lsl" : "FALSE|TRUE",
"constant.language.quaternion.lsl" : "ZERO_ROTATION",
- "constant.language.string.lsl" : "EOF|JSON_ARRAY|JSON_FALSE|JSON_INVALID|" +
- "JSON_NULL|JSON_NUMBER|JSON_OBJECT|JSON_STRING|JSON_TRUE|NULL_KEY|" +
- "TEXTURE_BLANK|TEXTURE_DEFAULT|TEXTURE_MEDIA|TEXTURE_PLYWOOD|" +
- "TEXTURE_TRANSPARENT|URL_REQUEST_DENIED|URL_REQUEST_GRANTED",
+ "constant.language.string.lsl" : "EOF|JSON_ARRAY|JSON_DELETE|JSON_FALSE|JSON_INVALID|JSON_NULL|JSON_NUMBER|JSON_OBJECT|JSON_STRING|JSON_TRUE|NULL_KEY|TEXTURE_BLANK|TEXTURE_DEFAULT|TEXTURE_MEDIA|TEXTURE_PLYWOOD|TEXTURE_TRANSPARENT|URL_REQUEST_DENIED|URL_REQUEST_GRANTED",
"constant.language.vector.lsl" : "TOUCH_INVALID_TEXCOORD|TOUCH_INVALID_VECTOR|ZERO_VECTOR",
"invalid.broken.lsl": "LAND_LARGE_BRUSH|LAND_MEDIUM_BRUSH|LAND_SMALL_BRUSH",
- "invalid.deprecated.lsl" : "ATTACH_LPEC|ATTACH_RPEC|CHARACTER_MAX_ANGULAR_ACCEL|" +
- "CHARACTER_MAX_ANGULAR_SPEED|CHARACTER_TURN_SPEED_MULTIPLIER|DATA_RATING|" +
- "PRIM_CAST_SHADOWS|PRIM_MATERIAL_LIGHT|PRIM_PHYSICS_MATERIAL|PRIM_TYPE_LEGACY|" +
- "PSYS_SRC_INNERANGLE|PSYS_SRC_OUTERANGLE|VEHICLE_FLAG_NO_FLY_UP|llCloud|" +
- "llGodLikeRezObject|llMakeExplosion|llMakeFire|llMakeFountain|llMakeSmoke|" +
- "llRemoteDataSetRegion|llSetInventoryPermMask|llSetObjectPermMask|llSound|" +
- "llSoundPreload|llXorBase64Strings|llXorBase64StringsCorrect",
- "invalid.godmode.lsl": "llGodLikeRezObject|llSetInventoryPermMask|llSetObjectPermMask",
- "invalid.illegal.lsl" : "print",
- "invalid.unimplemented.lsl": "CHARACTER_MAX_ANGULAR_ACCEL|CHARACTER_MAX_ANGULAR_SPEED|" +
- "CHARACTER_TURN_SPEED_MULTIPLIER|PERMISSION_CHANGE_JOINTS|PERMISSION_CHANGE_PERMISSIONS|" +
- "PERMISSION_RELEASE_OWNERSHIP|PERMISSION_REMAP_CONTROLS|PRIM_PHYSICS_MATERIAL|PRIM_TYPE_LEGACY|" +
- "PSYS_SRC_OBJ_REL_MASK|event|llCollisionSprite|llPointAt|llRefreshPrimURL|" +
- "llReleaseCamera|llRemoteLoadScript|llSetPrimURL|llStopPointAt|llTakeCamera",
+ "invalid.deprecated.lsl" : "ATTACH_LPEC|ATTACH_RPEC|DATA_RATING|OBJECT_ATTACHMENT_GEOMETRY_BYTES|OBJECT_ATTACHMENT_SURFACE_AREA|PRIM_CAST_SHADOWS|PRIM_MATERIAL_LIGHT|PRIM_TYPE_LEGACY|PSYS_SRC_INNERANGLE|PSYS_SRC_OUTERANGLE|VEHICLE_FLAG_NO_FLY_UP|llCloud|llMakeExplosion|llMakeFire|llMakeFountain|llMakeSmoke|llRemoteDataSetRegion|llSound|llSoundPreload|llXorBase64Strings|llXorBase64StringsCorrect",
+ "invalid.illegal.lsl": "event",
+ "invalid.unimplemented.lsl": "CHARACTER_MAX_ANGULAR_ACCEL|CHARACTER_MAX_ANGULAR_SPEED|CHARACTER_TURN_SPEED_MULTIPLIER|PERMISSION_CHANGE_JOINTS|PERMISSION_CHANGE_PERMISSIONS|PERMISSION_RELEASE_OWNERSHIP|PERMISSION_REMAP_CONTROLS|PRIM_PHYSICS_MATERIAL|PSYS_SRC_OBJ_REL_MASK|llCollisionSprite|llPointAt|llRefreshPrimURL|llReleaseCamera|llRemoteLoadScript|llSetPrimURL|llStopPointAt|llTakeCamera",
+ "reserved.godmode.lsl": "llGodLikeRezObject|llSetInventoryPermMask|llSetObjectPermMask",
+ "reserved.log.lsl" : "print",
"keyword.control.lsl" : "do|else|for|if|jump|return|while",
"storage.type.lsl" : "float|integer|key|list|quaternion|rotation|string|vector",
- "support.function.lsl": "llAbs|llAcos|llAddToLandBanList|llAddToLandPassList|" +
- "llAdjustSoundVolume|llAllowInventoryDrop|llAngleBetween|llApplyImpulse|" +
- "llApplyRotationalImpulse|llAsin|llAtan2|llAttachToAvatar|llAttachToAvatarTemp|" +
- "llAvatarOnLinkSitTarget|llAvatarOnSitTarget|llAxes2Rot|llAxisAngle2Rot|" +
- "llBase64ToInteger|llBase64ToString|llBreakAllLinks|llBreakLink|llCastRay|" +
- "llCeil|llClearCameraParams|llClearLinkMedia|llClearPrimMedia|llCloseRemoteDataChannel|" +
- "llCollisionFilter|llCollisionSound|llCos|llCreateCharacter|llCreateLink|" +
- "llCSV2List|llDeleteCharacter|llDeleteSubList|llDeleteSubString|llDetachFromAvatar|" +
- "llDetectedGrab|llDetectedGroup|llDetectedKey|llDetectedLinkNumber|llDetectedName|" +
- "llDetectedOwner|llDetectedPos|llDetectedRot|llDetectedTouchBinormal|" +
- "llDetectedTouchFace|llDetectedTouchNormal|llDetectedTouchPos|llDetectedTouchST|" +
- "llDetectedTouchUV|llDetectedType|llDetectedVel|llDialog|llDie|llDumpList2String|" +
- "llEdgeOfWorld|llEjectFromLand|llEmail|llEscapeURL|llEuler2Rot|llExecCharacterCmd|" +
- "llEvade|llFabs|llFleeFrom|llFloor|llForceMouselook|llFrand|llGenerateKey|" +
- "llGetAccel|llGetAgentInfo|llGetAgentLanguage|llGetAgentList|llGetAgentSize|" +
- "llGetAlpha|llGetAndResetTime|llGetAnimation|llGetAnimationList|llGetAnimationOverride|" +
- "llGetAttached|llGetBoundingBox|llGetCameraPos|llGetCameraRot|llGetCenterOfMass|" +
- "llGetClosestNavPoint|llGetColor|llGetCreator|llGetDate|llGetDisplayName|" +
- "llGetEnergy|llGetEnv|llGetForce|llGetFreeMemory|llGetFreeURLs|llGetGeometricCenter|" +
- "llGetGMTclock|llGetHTTPHeader|llGetInventoryCreator|llGetInventoryKey|llGetInventoryName|" +
- "llGetInventoryNumber|llGetInventoryPermMask|llGetInventoryType|llGetKey|" +
- "llGetLandOwnerAt|llGetLinkKey|llGetLinkMedia|llGetLinkName|llGetLinkNumber|" +
- "llGetLinkNumberOfSides|llGetLinkPrimitiveParams|llGetListEntryType|llGetListLength|" +
- "llGetLocalPos|llGetLocalRot|llGetMass|llGetMassMKS|llGetMemoryLimit|" +
- "llGetNextEmail|llGetNotecardLine|llGetNumberOfNotecardLines|llGetNumberOfPrims|" +
- "llGetNumberOfSides|llGetObjectDesc|llGetObjectDetails|llGetObjectMass|" +
- "llGetObjectName|llGetObjectPermMask|llGetObjectPrimCount|llGetOmega|" +
- "llGetOwner|llGetOwnerKey|llGetParcelDetails|llGetParcelFlags|llGetParcelMaxPrims|" +
- "llGetParcelMusicURL|llGetParcelPrimCount|llGetParcelPrimOwners|llGetPermissions|" +
- "llGetPermissionsKey|llGetPhysicsMaterial|llGetPos|llGetPrimitiveParams|" +
- "llGetPrimMediaParams|llGetRegionAgentCount|llGetRegionCorner|llGetRegionFlags|" +
- "llGetRegionFPS|llGetRegionName|llGetRegionTimeDilation|llGetRootPosition|" +
- "llGetRootRotation|llGetRot|llGetScale|llGetScriptName|llGetScriptState|" +
- "llGetSimStats|llGetSimulatorHostname|llGetSPMaxMemory|llGetStartParameter|" +
- "llGetStaticPath|llGetStatus|llGetSubString|llGetSunDirection|llGetTexture|" +
- "llGetTextureOffset|llGetTextureRot|llGetTextureScale|llGetTime|llGetTimeOfDay|" +
- "llGetTimestamp|llGetTorque|llGetUnixTime|llGetUsedMemory|llGetUsername|" +
- "llGetVel|llGetWallclock|llGiveInventory|llGiveInventoryList|llGiveMoney|" +
- "llGround|llGroundContour|llGroundNormal|llGroundRepel|llGroundSlope|" +
- "llHTTPRequest|llHTTPResponse|llInsertString|llInstantMessage|llIntegerToBase64|" +
- "llJson2List|llJsonGetValue|llJsonSetValue|llJsonValueType|llKey2Name|" +
- "llLinkParticleSystem|llLinkSitTarget|llList2CSV|llList2Float|llList2Integer|" +
- "llList2Json|llList2Key|llList2List|llList2ListStrided|llList2Rot|" +
- "llList2String|llList2Vector|llListen|llListenControl|llListenRemove|" +
- "llListFindList|llListInsertList|llListRandomize|llListReplaceList|llListSort|" +
- "llListStatistics|llLoadURL|llLog|llLog10|llLookAt|llLoopSound|llLoopSoundMaster|" +
- "llLoopSoundSlave|llManageEstateAccess|llMapDestination|llMD5String|llMessageLinked|" +
- "llMinEventDelay|llModifyLand|llModPow|llMoveToTarget|llNavigateTo|llOffsetTexture|" +
- "llOpenRemoteDataChannel|llOverMyLand|llOwnerSay|llParcelMediaCommandList|" +
- "llParcelMediaQuery|llParseString2List|llParseStringKeepNulls|llParticleSystem|" +
- "llPassCollisions|llPassTouches|llPatrolPoints|llPlaySound|llPlaySoundSlave|" +
- "llPow|llPreloadSound|llPursue|llPushObject|llRegionSay|llRegionSayTo|" +
- "llReleaseControls|llReleaseURL|llRemoteDataReply|llRemoteLoadScriptPin|" +
- "llRemoveFromLandBanList|llRemoveFromLandPassList|llRemoveInventory|llRemoveVehicleFlags|" +
- "llRequestAgentData|llRequestDisplayName|llRequestInventoryData|llRequestPermissions|" +
- "llRequestSecureURL|llRequestSimulatorData|llRequestURL|llRequestUsername|" +
- "llResetAnimationOverride|llResetLandBanList|llResetLandPassList|llResetOtherScript|" +
- "llResetScript|llResetTime|llReturnObjectsByID|llReturnObjectsByOwner|" +
- "llRezAtRoot|llRezObject|llRot2Angle|llRot2Axis|llRot2Euler|" +
- "llRot2Fwd|llRot2Left|llRot2Up|llRotateTexture|llRotBetween|llRotLookAt|" +
- "llRotTarget|llRotTargetRemove|llRound|llSameGroup|llSay|llScaleTexture|" +
- "llScriptDanger|llScriptProfiler|llSendRemoteData|llSensor|llSensorRemove|" +
- "llSensorRepeat|llSetAlpha|llSetAngularVelocity|llSetAnimationOverride|llSetBuoyancy|" +
- "llSetCameraAtOffset|llSetCameraEyeOffset|llSetCameraParams|llSetClickAction|" +
- "llSetColor|llSetContentType|llSetDamage|llSetForce|llSetForceAndTorque|llSetHoverHeight|" +
- "llSetKeyframedMotion|llSetLinkAlpha|llSetLinkCamera|llSetLinkColor|llSetLinkMedia|" +
- "llSetLinkPrimitiveParams|llSetLinkPrimitiveParamsFast|llSetLinkTexture|llSetLinkTextureAnim|" +
- "llSetLocalRot|llSetMemoryLimit|llSetObjectDesc|llSetObjectName|llSetParcelMusicURL|" +
- "llSetPayPrice|llSetPhysicsMaterial|llSetPos|llSetPrimitiveParams|llSetPrimMediaParams|" +
- "llSetRegionPos|llSetRemoteScriptAccessPin|llSetRot|llSetScale|llSetScriptState|" +
- "llSetSitText|llSetSoundQueueing|llSetSoundRadius|llSetStatus|llSetText|" +
- "llSetTexture|llSetTextureAnim|llSetTimerEvent|llSetTorque|llSetTouchText|" +
- "llSetVehicleFlags|llSetVehicleFloatParam|llSetVehicleRotationParam|llSetVehicleType|" +
- "llSetVehicleVectorParam|llSetVelocity|llSHA1String|llShout|llSin|llSitTarget|" +
- "llSleep|llSqrt|llStartAnimation|llStopAnimation|llStopHover|llStopLookAt|" +
- "llStopMoveToTarget|llStopSound|llStringLength|llStringToBase64|llStringTrim|" +
- "llSubStringIndex|llTakeControls|llTan|llTarget|llTargetOmega|llTargetRemove|" +
- "llTeleportAgent|llTeleportAgentGlobalCoords|llTeleportAgentHome|llTextBox|" +
- "llToLower|llToUpper|llTransferLindenDollars|llTriggerSound|llTriggerSoundLimited|" +
- "llUnescapeURL|llUnSit|llUpdateCharacter|llVecDist|llVecMag|llVecNorm|" +
- "llVolumeDetect|llWanderWithin|llWater|llWhisper|llWind|llXorBase64",
- "support.function.event.lsl" : "at_rot_target|at_target|attach|changed|collision|" +
- "collision_end|collision_start|control|dataserver|email|http_request|" +
- "http_response|land_collision|land_collision_end|land_collision_start|" +
- "link_message|listen|money|moving_end|moving_start|no_sensor|not_at_rot_target|" +
- "not_at_target|object_rez|on_rez|path_update|remote_data|run_time_permissions|" +
- "sensor|state_entry|state_exit|timer|touch|touch_end|touch_start|transaction_result"
+ "support.function.lsl": "llAbs|llAcos|llAddToLandBanList|llAddToLandPassList|llAdjustSoundVolume|llAllowInventoryDrop|llAngleBetween|llApplyImpulse|llApplyRotationalImpulse|llAsin|llAtan2|llAttachToAvatar|llAttachToAvatarTemp|llAvatarOnLinkSitTarget|llAvatarOnSitTarget|llAxes2Rot|llAxisAngle2Rot|llBase64ToInteger|llBase64ToString|llBreakAllLinks|llBreakLink|llCSV2List|llCastRay|llCeil|llClearCameraParams|llClearLinkMedia|llClearPrimMedia|llCloseRemoteDataChannel|llCollisionFilter|llCollisionSound|llCos|llCreateCharacter|llCreateLink|llDeleteCharacter|llDeleteSubList|llDeleteSubString|llDetachFromAvatar|llDetectedGrab|llDetectedGroup|llDetectedKey|llDetectedLinkNumber|llDetectedName|llDetectedOwner|llDetectedPos|llDetectedRot|llDetectedTouchBinormal|llDetectedTouchFace|llDetectedTouchNormal|llDetectedTouchPos|llDetectedTouchST|llDetectedTouchUV|llDetectedType|llDetectedVel|llDialog|llDie|llDumpList2String|llEdgeOfWorld|llEjectFromLand|llEmail|llEscapeURL|llEuler2Rot|llEvade|llExecCharacterCmd|llFabs|llFleeFrom|llFloor|llForceMouselook|llFrand|llGenerateKey|llGetAccel|llGetAgentInfo|llGetAgentLanguage|llGetAgentList|llGetAgentSize|llGetAlpha|llGetAndResetTime|llGetAnimation|llGetAnimationList|llGetAnimationOverride|llGetAttached|llGetBoundingBox|llGetCameraPos|llGetCameraRot|llGetCenterOfMass|llGetClosestNavPoint|llGetColor|llGetCreator|llGetDate|llGetDisplayName|llGetEnergy|llGetEnv|llGetForce|llGetFreeMemory|llGetFreeURLs|llGetGMTclock|llGetGeometricCenter|llGetHTTPHeader|llGetInventoryCreator|llGetInventoryKey|llGetInventoryName|llGetInventoryNumber|llGetInventoryPermMask|llGetInventoryType|llGetKey|llGetLandOwnerAt|llGetLinkKey|llGetLinkMedia|llGetLinkName|llGetLinkNumber|llGetLinkNumberOfSides|llGetLinkPrimitiveParams|llGetListEntryType|llGetListLength|llGetLocalPos|llGetLocalRot|llGetMass|llGetMassMKS|llGetMaxScaleFactor|llGetMemoryLimit|llGetMinScaleFactor|llGetNextEmail|llGetNotecardLine|llGetNumberOfNotecardLines|llGetNumberOfPrims|llGetNumberOfSides|llGetObjectDesc|llGetObjectDetails|llGetObjectMass|llGetObjectName|llGetObjectPermMask|llGetObjectPrimCount|llGetOmega|llGetOwner|llGetOwnerKey|llGetParcelDetails|llGetParcelFlags|llGetParcelMaxPrims|llGetParcelMusicURL|llGetParcelPrimCount|llGetParcelPrimOwners|llGetPermissions|llGetPermissionsKey|llGetPhysicsMaterial|llGetPos|llGetPrimMediaParams|llGetPrimitiveParams|llGetRegionAgentCount|llGetRegionCorner|llGetRegionFPS|llGetRegionFlags|llGetRegionName|llGetRegionTimeDilation|llGetRootPosition|llGetRootRotation|llGetRot|llGetSPMaxMemory|llGetScale|llGetScriptName|llGetScriptState|llGetSimStats|llGetSimulatorHostname|llGetStartParameter|llGetStaticPath|llGetStatus|llGetSubString|llGetSunDirection|llGetTexture|llGetTextureOffset|llGetTextureRot|llGetTextureScale|llGetTime|llGetTimeOfDay|llGetTimestamp|llGetTorque|llGetUnixTime|llGetUsedMemory|llGetUsername|llGetVel|llGetWallclock|llGiveInventory|llGiveInventoryList|llGiveMoney|llGround|llGroundContour|llGroundNormal|llGroundRepel|llGroundSlope|llHTTPRequest|llHTTPResponse|llInsertString|llInstantMessage|llIntegerToBase64|llJson2List|llJsonGetValue|llJsonSetValue|llJsonValueType|llKey2Name|llLinkParticleSystem|llLinkSitTarget|llList2CSV|llList2Float|llList2Integer|llList2Json|llList2Key|llList2List|llList2ListStrided|llList2Rot|llList2String|llList2Vector|llListFindList|llListInsertList|llListRandomize|llListReplaceList|llListSort|llListStatistics|llListen|llListenControl|llListenRemove|llLoadURL|llLog|llLog10|llLookAt|llLoopSound|llLoopSoundMaster|llLoopSoundSlave|llMD5String|llManageEstateAccess|llMapDestination|llMessageLinked|llMinEventDelay|llModPow|llModifyLand|llMoveToTarget|llNavigateTo|llOffsetTexture|llOpenRemoteDataChannel|llOverMyLand|llOwnerSay|llParcelMediaCommandList|llParcelMediaQuery|llParseString2List|llParseStringKeepNulls|llParticleSystem|llPassCollisions|llPassTouches|llPatrolPoints|llPlaySound|llPlaySoundSlave|llPow|llPreloadSound|llPursue|llPushObject|llRegionSay|llRegionSayTo|llReleaseControls|llReleaseURL|llRemoteDataReply|llRemoteLoadScriptPin|llRemoveFromLandBanList|llRemoveFromLandPassList|llRemoveInventory|llRemoveVehicleFlags|llRequestAgentData|llRequestDisplayName|llRequestInventoryData|llRequestPermissions|llRequestSecureURL|llRequestSimulatorData|llRequestURL|llRequestUsername|llResetAnimationOverride|llResetLandBanList|llResetLandPassList|llResetOtherScript|llResetScript|llResetTime|llReturnObjectsByID|llReturnObjectsByOwner|llRezAtRoot|llRezObject|llRot2Angle|llRot2Axis|llRot2Euler|llRot2Fwd|llRot2Left|llRot2Up|llRotBetween|llRotLookAt|llRotTarget|llRotTargetRemove|llRotateTexture|llRound|llSHA1String|llSameGroup|llSay|llScaleByFactor|llScaleTexture|llScriptDanger|llScriptProfiler|llSendRemoteData|llSensor|llSensorRemove|llSensorRepeat|llSetAlpha|llSetAngularVelocity|llSetAnimationOverride|llSetBuoyancy|llSetCameraAtOffset|llSetCameraEyeOffset|llSetCameraParams|llSetClickAction|llSetColor|llSetContentType|llSetDamage|llSetForce|llSetForceAndTorque|llSetHoverHeight|llSetKeyframedMotion|llSetLinkAlpha|llSetLinkCamera|llSetLinkColor|llSetLinkMedia|llSetLinkPrimitiveParams|llSetLinkPrimitiveParamsFast|llSetLinkTexture|llSetLinkTextureAnim|llSetLocalRot|llSetMemoryLimit|llSetObjectDesc|llSetObjectName|llSetParcelMusicURL|llSetPayPrice|llSetPhysicsMaterial|llSetPos|llSetPrimMediaParams|llSetPrimitiveParams|llSetRegionPos|llSetRemoteScriptAccessPin|llSetRot|llSetScale|llSetScriptState|llSetSitText|llSetSoundQueueing|llSetSoundRadius|llSetStatus|llSetText|llSetTexture|llSetTextureAnim|llSetTimerEvent|llSetTorque|llSetTouchText|llSetVehicleFlags|llSetVehicleFloatParam|llSetVehicleRotationParam|llSetVehicleType|llSetVehicleVectorParam|llSetVelocity|llShout|llSin|llSitTarget|llSleep|llSqrt|llStartAnimation|llStopAnimation|llStopHover|llStopLookAt|llStopMoveToTarget|llStopSound|llStringLength|llStringToBase64|llStringTrim|llSubStringIndex|llTakeControls|llTan|llTarget|llTargetOmega|llTargetRemove|llTeleportAgent|llTeleportAgentGlobalCoords|llTeleportAgentHome|llTextBox|llToLower|llToUpper|llTransferLindenDollars|llTriggerSound|llTriggerSoundLimited|llUnSit|llUnescapeURL|llUpdateCharacter|llVecDist|llVecMag|llVecNorm|llVolumeDetect|llWanderWithin|llWater|llWhisper|llWind|llXorBase64",
+ "support.function.event.lsl" : "at_rot_target|at_target|attach|changed|collision|collision_end|collision_start|control|dataserver|email|http_request|http_response|land_collision|land_collision_end|land_collision_start|link_message|listen|money|moving_end|moving_start|no_sensor|not_at_rot_target|not_at_target|object_rez|on_rez|path_update|remote_data|run_time_permissions|sensor|state_entry|state_exit|timer|touch|touch_end|touch_start|transaction_result"
}, "identifier");
this.$rules = {
@@ -306,7 +62,7 @@ function LSLHighlightRules() {
token : "comment.line.double-slash.lsl",
regex : "\\/\\/.*$"
}, {
- token : "comment.block.lsl",
+ token : "comment.block.begin.lsl",
regex : "\\/\\*",
next : "comment"
}, {
@@ -314,7 +70,8 @@ function LSLHighlightRules() {
start : '"',
end : '"',
next : [{
- token : "constant.language.escape.lsl", regex : /\\[tn"\\]/
+ token : "constant.character.escape.lsl",
+ regex : /\\[tn"\\]/
}]
}, {
token : "constant.numeric.lsl",
@@ -331,6 +88,9 @@ function LSLHighlightRules() {
}, {
token : "keyword.operator.lsl",
regex : "\\+\\+|\\-\\-|<<|>>|&&?|\\|\\|?|\\^|~|[!%<>=*+\\-\\/]=?"
+ }, {
+ token : "invalid.illegal.keyword.operator.lsl",
+ regex : ":=?"
}, {
token : "punctuation.operator.lsl",
regex : "\\,|\\;"
@@ -347,8 +107,8 @@ function LSLHighlightRules() {
],
"comment" : [
{
- token : "comment.block.lsl",
- regex : ".*?\\*\\/",
+ token : "comment.block.end.lsl",
+ regex : "\\*\\/",
next : "start"
}, {
token : "comment.block.lsl",
diff --git a/lib/ace/mode/luapage.js b/lib/ace/mode/luapage.js
index 93c1ff56..19f5d04f 100644
--- a/lib/ace/mode/luapage.js
+++ b/lib/ace/mode/luapage.js
@@ -8,7 +8,7 @@ var Tokenizer = require("../tokenizer").Tokenizer;
var LuaPageHighlightRules = require("./luapage_highlight_rules").LuaPageHighlightRules;
var Mode = function() {
- this.HighlightRules = LuaPageHighlightRules;
+ HtmlMode.call(this);
this.HighlightRules = LuaPageHighlightRules;
this.createModeDelegates({
diff --git a/lib/ace/mode/markdown.js b/lib/ace/mode/markdown.js
index e7d38ff1..934f316a 100644
--- a/lib/ace/mode/markdown.js
+++ b/lib/ace/mode/markdown.js
@@ -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
@@ -42,21 +42,21 @@ var MarkdownFoldMode = require("./folding/markdown").FoldMode;
var Mode = function() {
this.HighlightRules = MarkdownHighlightRules;
-
+
this.createModeDelegates({
"js-": JavaScriptMode,
"xml-": XmlMode,
"html-": HtmlMode
});
-
+
this.foldingRules = new MarkdownFoldMode();
};
oop.inherits(Mode, TextMode);
(function() {
this.type = "text";
- this.lineCommentStart = ">";
-
+ this.blockComment = {start: ""};
+
this.getNextLineIndent = function(state, line, tab) {
if (state == "listblock") {
var match = /^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(line);
diff --git a/lib/ace/mode/markdown_highlight_rules.js b/lib/ace/mode/markdown_highlight_rules.js
index e5146ae0..db4caec8 100644
--- a/lib/ace/mode/markdown_highlight_rules.js
+++ b/lib/ace/mode/markdown_highlight_rules.js
@@ -46,7 +46,7 @@ var escaped = function(ch) {
function github_embed(tag, prefix) {
return { // Github style block
token : "support.function",
- regex : "^```" + tag + "\\s*$",
+ regex : "^\\s*```" + tag + "\\s*$",
push : prefix + "start"
};
}
@@ -79,7 +79,7 @@ var MarkdownHighlightRules = function() {
github_embed("css", "csscode-"),
{ // Github style block
token : "support.function",
- regex : "^```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
+ regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",
next : "githubblock"
}, { // block quote
token : "string.blockquote",
@@ -164,11 +164,15 @@ 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"
}, {
defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly
} ],
- "blockquote" : [ { // BLockquotes only escape on blank lines.
+ "blockquote" : [ { // Blockquotes only escape on blank lines.
token : "empty_line",
regex : "^\\s*$",
next : "start"
@@ -184,7 +188,7 @@ var MarkdownHighlightRules = function() {
"githubblock" : [ {
token : "support.function",
- regex : "^```",
+ regex : "^\\s*```",
next : "start"
}, {
token : "support.function",
@@ -194,25 +198,25 @@ var MarkdownHighlightRules = function() {
this.embedRules(JavaScriptHighlightRules, "jscode-", [{
token : "support.function",
- regex : "^```",
+ regex : "^\\s*```",
next : "pop"
}]);
this.embedRules(HtmlHighlightRules, "htmlcode-", [{
token : "support.function",
- regex : "^```",
+ regex : "^\\s*```",
next : "pop"
}]);
this.embedRules(CssHighlightRules, "csscode-", [{
token : "support.function",
- regex : "^```",
+ regex : "^\\s*```",
next : "pop"
}]);
this.embedRules(XmlHighlightRules, "xmlcode-", [{
token : "support.function",
- regex : "^```",
+ regex : "^\\s*```",
next : "pop"
}]);
diff --git a/lib/ace/mode/php/php.js b/lib/ace/mode/php/php.js
index 12786baa..a1abc609 100644
--- a/lib/ace/mode/php/php.js
+++ b/lib/ace/mode/php/php.js
@@ -4810,6 +4810,16 @@ PHP.Parser.prototype.Node_Expr_BitwiseOr = function() {
};
+PHP.Parser.prototype.Node_Expr_BitwiseXor = function() {
+ return {
+ type: "Node_Expr_BitwiseXor",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
PHP.Parser.prototype.Node_Expr_BitwiseNot = function() {
return {
type: "Node_Expr_BitwiseNot",
diff --git a/lib/ace/mode/rhtml.js b/lib/ace/mode/rhtml.js
index 84af5312..878f7699 100644
--- a/lib/ace/mode/rhtml.js
+++ b/lib/ace/mode/rhtml.js
@@ -49,6 +49,7 @@ var RCodeModel = require("mode/r_code_model").RCodeModel;
*/
var Mode = function(doc, session) {
+ HtmlMode.call(this);
this.$session = session;
this.HighlightRules = RHtmlHighlightRules;
diff --git a/lib/ace/mode/ruby.js b/lib/ace/mode/ruby.js
index c10ca247..7777cfaa 100644
--- a/lib/ace/mode/ruby.js
+++ b/lib/ace/mode/ruby.js
@@ -63,7 +63,7 @@ oop.inherits(Mode, TextMode);
if (state == "start") {
var match = line.match(/^.*[\{\(\[]\s*$/);
- var startingClassOrMethod = line.match(/^\s*(class|def)\s.*$/);
+ var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/);
var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/);
var startingConditional = line.match(/^\s*(if|else)\s*/)
if (match || startingClassOrMethod || startingDoBlock || startingConditional) {
diff --git a/lib/ace/mode/smarty.js b/lib/ace/mode/smarty.js
index af0a33ed..c4e445c2 100644
--- a/lib/ace/mode/smarty.js
+++ b/lib/ace/mode/smarty.js
@@ -35,16 +35,10 @@ var oop = require("../lib/oop");
var HtmlMode = require("./html").Mode;
var Tokenizer = require("../tokenizer").Tokenizer;
var SmartyHighlightRules = require("./smarty_highlight_rules").SmartyHighlightRules;
-var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
-var HtmlFoldMode = require("./folding/html").FoldMode;
var Mode = function() {
HtmlMode.call(this);
this.HighlightRules = SmartyHighlightRules;
- this.$behaviour = new HtmlBehaviour();
-
-
- this.foldingRules = new HtmlFoldMode();
};
oop.inherits(Mode, HtmlMode);
diff --git a/lib/ace/mode/smarty_highlight_rules.js b/lib/ace/mode/smarty_highlight_rules.js
index dfc1f593..80c6069f 100644
--- a/lib/ace/mode/smarty_highlight_rules.js
+++ b/lib/ace/mode/smarty_highlight_rules.js
@@ -114,9 +114,9 @@ var SmartyHighlightRules = function() {
var smartyStart = smartyRules.start;
- ["start", "qqstring_inner", "qstring_inner", "attributes", "cdata"].forEach(function(x) {
- this.$rules[x].unshift.apply(this.$rules[x], smartyStart);
- }, this);
+ for (var rule in this.$rules) {
+ this.$rules[rule].unshift.apply(this.$rules[rule], smartyStart);
+ }
Object.keys(smartyRules).forEach(function(x) {
if (!this.$rules[x])
diff --git a/lib/ace/mode/svg.js b/lib/ace/mode/svg.js
index d9892f9f..aede9c0a 100644
--- a/lib/ace/mode/svg.js
+++ b/lib/ace/mode/svg.js
@@ -49,7 +49,7 @@ var Mode = function() {
"js-": JavaScriptMode
});
- this.foldingRules = new MixedFoldMode(new XmlFoldMode({}), {
+ this.foldingRules = new MixedFoldMode(new XmlFoldMode(), {
"js-": new CStyleFoldMode()
});
};
diff --git a/lib/ace/mode/twig.js b/lib/ace/mode/twig.js
index 1a07f7a5..e8920b9e 100644
--- a/lib/ace/mode/twig.js
+++ b/lib/ace/mode/twig.js
@@ -32,28 +32,16 @@ define(function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var JavaScriptMode = require("./javascript").Mode;
-var CssMode = require("./css").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
+var HtmlMode = require("./html").Mode;
var TwigHighlightRules = require("./twig_highlight_rules").TwigHighlightRules;
-var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
-var HtmlFoldMode = require("./folding/html").FoldMode;
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
var Mode = function() {
+ HtmlMode.call(this);
this.HighlightRules = TwigHighlightRules;
this.$outdent = new MatchingBraceOutdent();
- this.$behaviour = new HtmlBehaviour();
-
- this.createModeDelegates({
- "js-": JavaScriptMode,
- "css-": CssMode
- });
-
- this.foldingRules = new HtmlFoldMode();
};
-oop.inherits(Mode, TextMode);
+oop.inherits(Mode, HtmlMode);
(function() {
this.blockComment = {start: "{#", end: "#}"};
diff --git a/lib/ace/mode/velocity.js b/lib/ace/mode/velocity.js
index 30dc59dc..ca572a21 100644
--- a/lib/ace/mode/velocity.js
+++ b/lib/ace/mode/velocity.js
@@ -37,18 +37,17 @@ define(function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
+var HtmlMode = require("./html").Mode;
var Tokenizer = require("../tokenizer").Tokenizer;
var VelocityHighlightRules = require("./velocity_highlight_rules").VelocityHighlightRules;
var FoldMode = require("./folding/velocity").FoldMode;
-var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
var Mode = function() {
+ HtmlMode.call(this);
this.HighlightRules = VelocityHighlightRules;
this.foldingRules = new FoldMode();
- this.$behaviour = new HtmlBehaviour();
};
-oop.inherits(Mode, TextMode);
+oop.inherits(Mode, HtmlMode);
(function() {
this.lineCommentStart = "##";
diff --git a/lib/ace/mode/xml.js b/lib/ace/mode/xml.js
index 171a01cf..fe714d7c 100644
--- a/lib/ace/mode/xml.js
+++ b/lib/ace/mode/xml.js
@@ -32,6 +32,7 @@ define(function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
+var lang = require("../lib/lang");
var TextMode = require("./text").Mode;
var Tokenizer = require("../tokenizer").Tokenizer;
var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
@@ -47,7 +48,9 @@ var Mode = function() {
oop.inherits(Mode, TextMode);
(function() {
-
+
+ this.voidElements = lang.arrayToMap([]);
+
this.blockComment = {start: ""};
this.$id = "ace/mode/xml";
diff --git a/lib/ace/mode/xml_highlight_rules.js b/lib/ace/mode/xml_highlight_rules.js
index ee6ef8cd..54c7db9f 100644
--- a/lib/ace/mode/xml_highlight_rules.js
+++ b/lib/ace/mode/xml_highlight_rules.js
@@ -38,57 +38,72 @@ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var XmlHighlightRules = function(normalize) {
this.$rules = {
start : [
- {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
+ token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
},
{
- token : ["punctuation.instruction.begin", "keyword.instruction"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction",
},
- {token : "comment", regex : "<\\!--", next : "comment"},
+ {token : "comment.xml", regex : "<\\!--", next : "comment"},
{
- token : ["punctuation.doctype.begin", "meta.tag.doctype"],
- regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
},
{include : "tag"},
- {include : "reference"}
+ {token : "text.end-tag-open.xml", regex: ""},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
],
- xml_declaration : [
- {include : "attributes"},
- {include : "instruction"}
- ],
+ xml_decl : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
- instruction : [
- {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
+ processing_instruction : [
+ {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
+ {defaultToken : "instruction.xml"}
],
doctype : [
- {include : "space"},
+ {include : "whitespace"},
{include : "string"},
- {token : "punctuation.doctype.end", regex : ">", next : "start"},
- {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
- {token : "punctuation.begin", regex : "\\[", push : "declarations"}
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
],
- declarations : [{
- token : "text",
+ int_subset : [{
+ token : "text.xml",
regex : "\\s+"
}, {
- token: "punctuation.end",
+ token: "punctuation.int-subset.xml",
regex: "]",
next: "pop"
}, {
- token : ["punctuation.begin", "keyword"],
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
regex : "(<\\!)([-_a-zA-Z0-9]+)",
push : [{
token : "text",
regex : "\\s+"
},
{
- token : "punctuation.end",
+ token : "punctuation.markup-decl.xml",
regex : ">",
next : "pop"
},
@@ -96,75 +111,88 @@ var XmlHighlightRules = function(normalize) {
}],
cdata : [
- {token : "string.end", regex : "\\]\\]>", next : "start"},
- {token : "text", regex : "\\s+"},
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
],
comment : [
- {token : "comment", regex : "-->", next : "start"},
- {defaultToken : "comment"}
- ],
-
- tag : [{
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
- ]
- }, {
- token : ["meta.tag.punctuation.begin", "meta.tag.name"],
- regex : "()((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
- next: [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
- ]
- }],
-
- space : [
- {token : "text", regex : "\\s+"}
+ {token : "comment.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
],
reference : [{
- token : "constant.language.escape",
+ token : "constant.language.escape.reference.xml",
regex : "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
- }, {
- token : "text", regex : "&"
}],
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|())((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ // for doctype and processing instructions
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+
+ // for doctype and processing instructions
string: [{
- token : "string",
+ token : "string.xml",
regex : "'",
- push : "qstring_inner"
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}, {
- token : "string",
+ token : "string.xml",
regex : '"',
- push : "qqstring_inner"
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
}],
- qstring_inner: [
- {token : "string", regex: "'", next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
- qqstring_inner: [
- {token : "string", regex: '"', next: "pop"},
- {include : "reference"},
- {defaultToken : "string"}
- ],
-
attributes: [{
- token : "entity.other.attribute-name",
+ token : "entity.other.attribute-name.xml",
regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
}, {
- token : "keyword.operator.separator",
+ token : "keyword.operator.attribute-equals.xml",
regex : "="
}, {
- include : "space"
+ include: "tag_whitespace"
}, {
- include : "string"
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
}]
};
@@ -177,18 +205,17 @@ var XmlHighlightRules = function(normalize) {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
- token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
regex : "(<)(" + tag + ")",
next: [
- {include : "space"},
{include : "attributes"},
- {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
]
});
this.$rules[tag + "-end"] = [
- {include : "space"},
- {token : "meta.tag.punctuation.end", regex : ">", next: "start",
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
onMatch : function(value, currentState, stack) {
stack.splice(0);
return this.token;
@@ -196,14 +223,14 @@ var XmlHighlightRules = function(normalize) {
]
this.embedRules(HighlightRules, prefix, [{
- token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
regex : "()(" + tag + ")",
next: tag + "-end"
}, {
- token: "string.begin",
+ token: "string.cdata.xml",
regex : "<\\!\\[CDATA\\["
}, {
- token: "string.end",
+ token: "string.cdata.xml",
regex : "\\]\\]>"
}]);
};
diff --git a/lib/ace/mode/xml_test.js b/lib/ace/mode/xml_test.js
index 39edf633..160537b0 100644
--- a/lib/ace/mode/xml_test.js
+++ b/lib/ace/mode/xml_test.js
@@ -51,7 +51,7 @@ module.exports = {
assert.ok(tokenizer instanceof Tokenizer);
var tokens = tokenizer.getLineTokens("", "start").tokens;
- assert.equal("meta.tag.punctuation.begin", tokens[0].type);
+ assert.equal("meta.tag.punctuation.tag-open.xml", tokens[0].type);
},
"test: toggle comment lines should not do anything" : function() {
diff --git a/lib/ace/mode/yaml_highlight_rules.js b/lib/ace/mode/yaml_highlight_rules.js
index cf946577..7bd9f453 100644
--- a/lib/ace/mode/yaml_highlight_rules.js
+++ b/lib/ace/mode/yaml_highlight_rules.js
@@ -86,9 +86,6 @@ var YamlHighlightRules = function() {
}, {
token : "constant.language.boolean",
regex : "(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"
- }, {
- token : "invalid.illegal", // comments are not allowed
- regex : "\\/\\/.*$"
}, {
token : "paren.lparen",
regex : "[[({]"
diff --git a/lib/ace/mouse/default_handlers.js b/lib/ace/mouse/default_handlers.js
index 84e0ac48..6e97bc5d 100644
--- a/lib/ace/mouse/default_handlers.js
+++ b/lib/ace/mouse/default_handlers.js
@@ -72,8 +72,7 @@ function DefaultHandlers(mouseHandler) {
var selectionEmpty = selectionRange.isEmpty();
if (selectionEmpty) {
- editor.moveCursorToPosition(pos);
- editor.selection.clearSelection();
+ editor.selection.moveToPosition(pos);
}
// 2: contextmenu, 1: linux paste
@@ -93,6 +92,7 @@ function DefaultHandlers(mouseHandler) {
}
}
+ this.captureMouse(ev);
if (!inSelection || this.$clickSelection || ev.getShiftKey() || editor.inMultiSelectMode) {
// Directly pick STATE_SELECT, since the user is not clicking inside
// a selection.
@@ -101,7 +101,6 @@ function DefaultHandlers(mouseHandler) {
this.mousedownEvent.time = Date.now();
this.startSelect(pos);
}
- this.captureMouse(ev);
return ev.preventDefault();
};
@@ -114,8 +113,7 @@ function DefaultHandlers(mouseHandler) {
editor.selection.selectToPosition(pos);
}
else if (!this.$clickSelection) {
- editor.moveCursorToPosition(pos);
- editor.selection.clearSelection();
+ editor.selection.moveToPosition(pos);
}
if (editor.renderer.scroller.setCapture) {
editor.renderer.scroller.setCapture();
diff --git a/lib/ace/mouse/multi_select_handler.js b/lib/ace/mouse/multi_select_handler.js
index dc01bd6c..88dc6668 100644
--- a/lib/ace/mouse/multi_select_handler.js
+++ b/lib/ace/mouse/multi_select_handler.js
@@ -32,7 +32,6 @@ define(function(require, exports, module) {
var event = require("../lib/event");
-
// mouse
function isSamePoint(p1, p2) {
return p1.row == p2.row && p1.column == p2.column;
@@ -51,7 +50,7 @@ function onMouseDown(e) {
}
if (!ctrl && !alt) {
- if (button == 0 && e.editor.inMultiSelectMode)
+ if (button === 0 && e.editor.inMultiSelectMode)
e.editor.exitMultiSelectMode();
return;
}
@@ -79,8 +78,7 @@ function onMouseDown(e) {
return;
screenCursor = newCursor;
- editor.selection.moveCursorToPosition(cursor);
- editor.selection.clearSelection();
+ editor.selection.moveToPosition(cursor);
editor.renderer.scrollCursorIntoView();
editor.removeSelectionMarkers(rectSel);
@@ -95,7 +93,7 @@ function onMouseDown(e) {
- if (ctrl && !shift && !alt && button == 0) {
+ if (ctrl && !alt && !shift && button === 0) {
if (!isMultiSelect && inSelection)
return; // dragging
@@ -122,7 +120,7 @@ function onMouseDown(e) {
editor.$blockScrolling--;
});
- } else if (alt && button == 0) {
+ } else if (alt && button === 0) {
e.stop();
if (isMultiSelect && !ctrl)
@@ -135,8 +133,7 @@ function onMouseDown(e) {
screenAnchor = session.documentToScreenPosition(selection.lead);
blockSelect();
} else {
- selection.moveCursorToPosition(pos);
- selection.clearSelection();
+ selection.moveToPosition(pos);
}
diff --git a/lib/ace/multi_select.js b/lib/ace/multi_select.js
index 3a0b28cd..200ea075 100644
--- a/lib/ace/multi_select.js
+++ b/lib/ace/multi_select.js
@@ -437,6 +437,7 @@ var Editor = require("./editor").Editor;
this.commands.removeDefaultHandler("exec", this.$onMultiSelectExec);
this.renderer.updateCursor();
this.renderer.updateBackMarkers();
+ this._emit("changeSelection");
};
this.$onMultiSelectExec = function(e) {
@@ -487,9 +488,10 @@ var Editor = require("./editor").Editor;
i--;
}
tmpSel.fromOrientedRange(rangeList.ranges[i]);
+ tmpSel.id = rangeList.ranges[i].marker;
this.selection = session.selection = tmpSel;
var cmdResult = cmd.exec(this, args || {});
- if (!result == undefined)
+ if (result !== undefined)
result = cmdResult;
tmpSel.toOrientedRange(rangeList.ranges[i]);
}
diff --git a/lib/ace/occur.js b/lib/ace/occur.js
index 385bc76a..d3522ee3 100644
--- a/lib/ace/occur.js
+++ b/lib/ace/occur.js
@@ -112,12 +112,15 @@ oop.inherits(Occur, Search);
occurSession.$occur = this;
occurSession.$occurMatchingLines = found;
editor.setSession(occurSession);
+ this.$useEmacsStyleLineStart = this.$originalSession.$useEmacsStyleLineStart;
+ occurSession.$useEmacsStyleLineStart = this.$useEmacsStyleLineStart;
this.highlight(occurSession, options.re);
occurSession._emit('changeBackMarker');
}
this.displayOriginalContent = function(editor) {
editor.setSession(this.$originalSession);
+ this.$originalSession.$useEmacsStyleLineStart = this.$useEmacsStyleLineStart;
}
/**
diff --git a/lib/ace/selection.js b/lib/ace/selection.js
index adfb6518..403b1e76 100644
--- a/lib/ace/selection.js
+++ b/lib/ace/selection.js
@@ -298,6 +298,27 @@ var Selection = function(session) {
});
};
+ /**
+ * Moves the selection cursor to the indicated row and column.
+ * @param {Number} row The row to select to
+ * @param {Number} column The column to select to
+ *
+ **/
+ this.moveTo = function(row, column) {
+ this.clearSelection();
+ this.moveCursorTo(row, column);
+ };
+
+ /**
+ * Moves the selection cursor to the row and column indicated by `pos`.
+ * @param {Object} pos An object containing the row and column
+ **/
+ this.moveToPosition = function(pos) {
+ this.clearSelection();
+ this.moveCursorToPosition(pos);
+ };
+
+
/**
*
* Moves the selection up one row.
@@ -868,6 +889,27 @@ var Selection = function(session) {
return range;
}
+ /**
+ * Saves the current cursor position and calls `func` that can change the cursor
+ * postion. The result is the range of the starting and eventual cursor position.
+ * Will reset the cursor position.
+ * @param {Function} The callback that should change the cursor position
+ * @returns {Range}
+ *
+ **/
+ this.getRangeOfMovements = function(func) {
+ var start = this.getCursor();
+ try {
+ func.call(null, this);
+ var end = this.getCursor();
+ return Range.fromPoints(start,end);
+ } catch(e) {
+ return Range.fromPoints(start,start);
+ } finally {
+ this.moveCursorToPosition(start);
+ }
+ }
+
this.toJSON = function() {
if (this.rangeCount) {
var data = this.ranges.map(function(r) {
diff --git a/lib/ace/snippets/lsl.snippets b/lib/ace/snippets/lsl.snippets
index e65f7771..7198c974 100644
--- a/lib/ace/snippets/lsl.snippets
+++ b/lib/ace/snippets/lsl.snippets
@@ -1,887 +1,1034 @@
snippet @
- @${1:label}
+ @${1:label};
snippet CAMERA_ACTIVE
- CAMERA_ACTIVE, ${1:integer isActive},
+ CAMERA_ACTIVE, ${1:integer isActive}, $0
snippet CAMERA_BEHINDNESS_ANGLE
- CAMERA_BEHINDNESS_ANGLE, ${1:float degrees},
+ CAMERA_BEHINDNESS_ANGLE, ${1:float degrees}, $0
snippet CAMERA_BEHINDNESS_LAG
- CAMERA_BEHINDNESS_LAG, ${1:float seconds},
+ CAMERA_BEHINDNESS_LAG, ${1:float seconds}, $0
snippet CAMERA_DISTANCE
- CAMERA_DISTANCE, ${1:float meters},
+ CAMERA_DISTANCE, ${1:float meters}, $0
snippet CAMERA_FOCUS
- CAMERA_FOCUS, ${1:vector position},
+ CAMERA_FOCUS, ${1:vector position}, $0
snippet CAMERA_FOCUS_LAG
- CAMERA_FOCUS_LAG, ${1:float seconds},
+ CAMERA_FOCUS_LAG, ${1:float seconds}, $0
snippet CAMERA_FOCUS_LOCKED
- CAMERA_FOCUS_LOCKED, ${1:integer isLocked},
+ CAMERA_FOCUS_LOCKED, ${1:integer isLocked}, $0
snippet CAMERA_FOCUS_OFFSET
- CAMERA_FOCUS_OFFSET, ${1:vector meters},
+ CAMERA_FOCUS_OFFSET, ${1:vector meters}, $0
snippet CAMERA_FOCUS_THRESHOLD
- CAMERA_FOCUS_THRESHOLD, ${1:float meters},
+ CAMERA_FOCUS_THRESHOLD, ${1:float meters}, $0
snippet CAMERA_PITCH
- CAMERA_PITCH, ${1:float degrees},
+ CAMERA_PITCH, ${1:float degrees}, $0
snippet CAMERA_POSITION
- CAMERA_POSITION, ${1:vector position},
+ CAMERA_POSITION, ${1:vector position}, $0
snippet CAMERA_POSITION_LAG
- CAMERA_POSITION_LAG, ${1:float seconds},
+ CAMERA_POSITION_LAG, ${1:float seconds}, $0
snippet CAMERA_POSITION_LOCKED
- CAMERA_POSITION_LOCKED, ${1:integer isLocked},
+ CAMERA_POSITION_LOCKED, ${1:integer isLocked}, $0
snippet CAMERA_POSITION_THRESHOLD
- CAMERA_POSITION_THRESHOLD, ${1:float meters},
+ CAMERA_POSITION_THRESHOLD, ${1:float meters}, $0
snippet CHARACTER_AVOIDANCE_MODE
- CHARACTER_AVOIDANCE_MODE, ${1:integer flags},
+ CHARACTER_AVOIDANCE_MODE, ${1:integer flags}, $0
snippet CHARACTER_DESIRED_SPEED
- CHARACTER_DESIRED_SPEED, ${1:float speed},
+ CHARACTER_DESIRED_SPEED, ${1:float speed}, $0
snippet CHARACTER_DESIRED_TURN_SPEED
- CHARACTER_DESIRED_TURN_SPEED, ${1:float speed},
+ CHARACTER_DESIRED_TURN_SPEED, ${1:float speed}, $0
snippet CHARACTER_LENGTH
- CHARACTER_LENGTH, ${1:float length},
+ CHARACTER_LENGTH, ${1:float length}, $0
snippet CHARACTER_MAX_TURN_RADIUS
- CHARACTER_MAX_TURN_RADIUS, ${1:float radius},
+ CHARACTER_MAX_TURN_RADIUS, ${1:float radius}, $0
snippet CHARACTER_ORIENTATION
- CHARACTER_ORIENTATION, ${1:integer orientation},
+ CHARACTER_ORIENTATION, ${1:integer orientation}, $0
snippet CHARACTER_RADIUS
- CHARACTER_RADIUS, ${1:float radius},
+ CHARACTER_RADIUS, ${1:float radius}, $0
snippet CHARACTER_STAY_WITHIN_PARCEL
- CHARACTER_STAY_WITHIN_PARCEL, ${1:boolean stay},
+ CHARACTER_STAY_WITHIN_PARCEL, ${1:boolean stay}, $0
snippet CHARACTER_TYPE
- CHARACTER_TYPE, ${1:integer type},
+ CHARACTER_TYPE, ${1:integer type}, $0
snippet HTTP_BODY_MAXLENGTH
- HTTP_BODY_MAXLENGTH, ${1:integer length},
+ HTTP_BODY_MAXLENGTH, ${1:integer length}, $0
snippet HTTP_CUSTOM_HEADER
- HTTP_CUSTOM_HEADER, ${1:string name}, ${2:string value},
+ HTTP_CUSTOM_HEADER, ${1:string name}, ${2:string value}, $0
snippet HTTP_METHOD
- HTTP_METHOD, ${1:string method},
+ HTTP_METHOD, ${1:string method}, $0
snippet HTTP_MIMETYPE
- HTTP_MIMETYPE, ${1:string mimeType},
+ HTTP_MIMETYPE, ${1:string mimeType}, $0
snippet HTTP_PRAGMA_NO_CACHE
- HTTP_PRAGMA_NO_CACHE, ${1:integer send_header},
+ HTTP_PRAGMA_NO_CACHE, ${1:integer send_header}, $0
snippet HTTP_VERBOSE_THROTTLE
- HTTP_VERBOSE_THROTTLE, ${1:integer noisy},
+ HTTP_VERBOSE_THROTTLE, ${1:integer noisy}, $0
snippet HTTP_VERIFY_CERT
- HTTP_VERIFY_CERT, ${1:integer verify},
+ HTTP_VERIFY_CERT, ${1:integer verify}, $0
snippet RC_DATA_FLAGS
- RC_DATA_FLAGS, ${1:integer flags},
+ RC_DATA_FLAGS, ${1:integer flags}, $0
snippet RC_DETECT_PHANTOM
- RC_DETECT_PHANTOM, ${1:integer dectedPhantom},
+ RC_DETECT_PHANTOM, ${1:integer dectedPhantom}, $0
snippet RC_MAX_HITS
- RC_MAX_HITS, ${1:integer maxHits},
+ RC_MAX_HITS, ${1:integer maxHits}, $0
snippet RC_REJECT_TYPES
- RC_REJECT_TYPES, ${1:integer filterMask},
+ RC_REJECT_TYPES, ${1:integer filterMask}, $0
snippet at_rot_target
- at_rot_target(${1:integer handle}, ${2:rotation targetrot}, ${3:rotation ourrot})
- {
- $0
- }
+ at_rot_target(${1:integer handle}, ${2:rotation targetrot}, ${3:rotation ourrot})
+ {
+ $0
+ }
snippet at_target
- at_target(${1:integer tnum}, ${2:vector targetpos}, ${3:vector ourpos})
- {
- $0
- }
+ at_target(${1:integer tnum}, ${2:vector targetpos}, ${3:vector ourpos})
+ {
+ $0
+ }
snippet attach
- attach(${1:key id})
- {
- $0
- }
+ attach(${1:key id})
+ {
+ $0
+ }
snippet changed
- changed(${1:integer change})
- {
- $0
- }
+ changed(${1:integer change})
+ {
+ $0
+ }
snippet collision
- collision(${1:integer index})
- {
- $0
- }
+ collision(${1:integer index})
+ {
+ $0
+ }
snippet collision_end
- collision_end(${1:integer index})
- {
- $0
- }
+ collision_end(${1:integer index})
+ {
+ $0
+ }
snippet collision_start
- collision_start(${1:integer index})
- {
- $0
- }
+ collision_start(${1:integer index})
+ {
+ $0
+ }
snippet control
- control(${1:key id}, ${2:integer level}, ${3:integer edge})
- {
- $0
- }
+ control(${1:key id}, ${2:integer level}, ${3:integer edge})
+ {
+ $0
+ }
snippet dataserver
- dataserver(${1:key query_id}, ${2:string data})
- {
- $0
- }
+ dataserver(${1:key query_id}, ${2:string data})
+ {
+ $0
+ }
snippet do
- do
- {
- $0
- }
- while (${1:condition});
+ do
+ {
+ $0
+ }
+ while (${1:condition});
snippet else
- else
- {
- $0
- }
-snippet else if
- else if (${1:condition})
- {
- $0
- }
+ else
+ {
+ $0
+ }
snippet email
- email(${1:string time}, ${2:string address}, ${3:string subject}, ${4:string message}, ${5:integer num_left})
- {
- $0
- }
+ email(${1:string time}, ${2:string address}, ${3:string subject}, ${4:string message}, ${5:integer num_left})
+ {
+ $0
+ }
snippet for
- for (${1:start}; ${3:condition}; ${3:step})
- {
- $0
- }
+ for (${1:start}; ${3:condition}; ${3:step})
+ {
+ $0
+ }
snippet http_request
- http_request(${1:key request_id}, ${2:string method}, ${3:string body})
- {
- $0
- }
+ http_request(${1:key request_id}, ${2:string method}, ${3:string body})
+ {
+ $0
+ }
snippet http_response
- http_response(${1:key request_id}, ${2:integer status}, ${3:list metadata}, ${4:string body})
- {
- $0
- }
+ http_response(${1:key request_id}, ${2:integer status}, ${3:list metadata}, ${4:string body})
+ {
+ $0
+ }
snippet if
- if (${1:condition})
- {
- $0
- }
+ if (${1:condition})
+ {
+ $0
+ }
snippet jump
- jump ${1:label};
+ jump ${1:label};
snippet land_collision
- land_collision(${1:vector pos})
- {
- $0
- }
+ land_collision(${1:vector pos})
+ {
+ $0
+ }
snippet land_collision_end
- land_collision_end(${1:vector pos})
- {
- $0
- }
+ land_collision_end(${1:vector pos})
+ {
+ $0
+ }
snippet land_collision_start
- land_collision_start(${1:vector pos})
- {
- $0
- }
+ land_collision_start(${1:vector pos})
+ {
+ $0
+ }
snippet link_message
- link_message(${1:integer sender_num}, ${2:integer num}, ${3:string str}, ${4:key id})
- {
- $0
- }
+ link_message(${1:integer sender_num}, ${2:integer num}, ${3:string str}, ${4:key id})
+ {
+ $0
+ }
snippet listen
- listen(${1:integer channel}, ${2:string name}, ${3:key id}, ${4:string message})
- {
- $0
- }
+ listen(${1:integer channel}, ${2:string name}, ${3:key id}, ${4:string message})
+ {
+ $0
+ }
snippet llAbs
- llAbs(${1:integer val})
+ llAbs(${1:integer val})
snippet llAcos
- llAcos(${1:float val})
+ llAcos(${1:float val})
snippet llAddToLandBanList
- llAddToLandBanList(${1:key avatar}, ${2:float hours})
+ llAddToLandBanList(${1:key agent}, ${2:float hours});
snippet llAddToLandPassList
- llAddToLandPassList(${1:key avatar}, ${2:float hours})
+ llAddToLandPassList(${1:key agent}, ${2:float hours});
snippet llAdjustSoundVolume
- llAdjustSoundVolume(${1:float volume})
+ llAdjustSoundVolume(${1:float volume});
snippet llAllowInventoryDrop
- llAllowInventoryDrop(${1:integer add})
+ llAllowInventoryDrop(${1:integer add});
snippet llAngleBetween
- llAngleBetween(${1:rotation a}, ${2:rotation b})
+ llAngleBetween(${1:rotation a}, ${2:rotation b})
snippet llApplyImpulse
- llApplyImpulse(${1:vector force}, ${2:integer local})
+ llApplyImpulse(${1:vector force}, ${2:integer local});
snippet llApplyRotationalImpulse
- llApplyRotationalImpulse(${1:vector force}, ${2:integer local})
+ llApplyRotationalImpulse(${1:vector force}, ${2:integer local});
snippet llAsin
- llAsin(${1:float val})
+ llAsin(${1:float val})
snippet llAtan2
- llAtan2(${1:float y}, ${2:float x})
+ llAtan2(${1:float y}, ${2:float x})
snippet llAttachToAvatar
- llAttachToAvatar(${1:integer attach_point})
+ llAttachToAvatar(${1:integer attach_point});
snippet llAttachToAvatarTemp
- llAttachToAvatarTemp(${1:integer attach_point})
+ llAttachToAvatarTemp(${1:integer attach_point});
snippet llAvatarOnLinkSitTarget
- llAvatarOnLinkSitTarget(${1:integer link})
+ llAvatarOnLinkSitTarget(${1:integer link})
+snippet llAvatarOnSitTarget
+ llAvatarOnSitTarget()
snippet llAxes2Rot
- llAxes2Rot(${1:vector fwd}, ${2:vector left}, ${3:vector up})
+ llAxes2Rot(${1:vector fwd}, ${2:vector left}, ${3:vector up})
snippet llAxisAngle2Rot
- llAxisAngle2Rot(${1:vector axis}, ${2:float angle})
+ llAxisAngle2Rot(${1:vector axis}, ${2:float angle})
snippet llBase64ToInteger
- llBase64ToInteger(${1:string str})
+ llBase64ToInteger(${1:string str})
snippet llBase64ToString
- llBase64ToString(${1:string str})
+ llBase64ToString(${1:string str})
+snippet llBreakAllLinks
+ llBreakAllLinks();
snippet llBreakLink
- llBreakLink(${1:integer link})
+ llBreakLink(${1:integer link});
snippet llCastRay
- llCastRay(${1:vector start}, ${2:vector end}, ${3:list options})
+ llCastRay(${1:vector start}, ${2:vector end}, ${3:list options});
snippet llCeil
- llCeil(${1:float val})
+ llCeil(${1:float val})
+snippet llClearCameraParams
+ llClearCameraParams();
snippet llClearLinkMedia
- llClearLinkMedia(${1:integer link}, ${2:integer face})
+ llClearLinkMedia(${1:integer link}, ${2:integer face});
snippet llClearPrimMedia
- llClearPrimMedia(${1:integer link}, ${2:integer face})
+ llClearPrimMedia(${1:integer face});
snippet llCloseRemoteDataChannel
- llCloseRemoteDataChannel(${1:key channel})
+ llCloseRemoteDataChannel(${1:key channel});
snippet llCollisionFilter
- llCollisionFilter(${1:string name}, ${2:key id}, ${3:integer accept})
+ llCollisionFilter(${1:string name}, ${2:key id}, ${3:integer accept});
snippet llCollisionSound
- llCollisionSound(${1:string impact_sound}, ${2:float impact_volume})
-snippet llCollisionSprite
- llCollisionSprite(${1:string impact_sprite})
+ llCollisionSound(${1:string impact_sound}, ${2:float impact_volume});
snippet llCos
- llCos(${1:float theta})
+ llCos(${1:float theta})
snippet llCreateCharacter
- llCreateCharacter(${1:list options})
+ llCreateCharacter(${1:list options});
snippet llCreateLink
- llCreateLink(${1:key target}, ${2:integer parent})
+ llCreateLink(${1:key target}, ${2:integer parent});
snippet llCSV2List
- llCSV2List(${1:string src})
+ llCSV2List(${1:string src})
+snippet llDeleteCharacter
+ llDeleteCharacter();
snippet llDeleteSubList
- llDeleteSubList(${1:list src}, ${2:integer start}, ${3:integer end})
+ llDeleteSubList(${1:list src}, ${2:integer start}, ${3:integer end})
snippet llDeleteSubString
- llDeleteSubString(${1:string src}, ${2:integer start}, ${3:integer end})
+ llDeleteSubString(${1:string src}, ${2:integer start}, ${3:integer end})
+snippet llDetachFromAvatar
+ llDetachFromAvatar();
snippet llDetectedGrab
- llDetectedGrab(${1:integer number})
+ llDetectedGrab(${1:integer number})
snippet llDetectedGroup
- llDetectedGroup(${1:integer number})
+ llDetectedGroup(${1:integer number})
snippet llDetectedKey
- llDetectedKey(${1:integer number})
+ llDetectedKey(${1:integer number})
snippet llDetectedLinkNumber
- llDetectedLinkNumber(${1:integer number})
+ llDetectedLinkNumber(${1:integer number})
snippet llDetectedName
- llDetectedName(${1:integer number})
+ llDetectedName(${1:integer number})
snippet llDetectedOwner
- llDetectedOwner(${1:integer number})
+ llDetectedOwner(${1:integer number})
snippet llDetectedPos
- llDetectedPos(${1:integer number})
+ llDetectedPosl(${1:integer number})
snippet llDetectedRot
- llDetectedRot(${1:integer number})
+ llDetectedRot(${1:integer number})
snippet llDetectedTouchBinormal
- llDetectedTouchBinormal(${1:integer number})
+ llDetectedTouchBinormal(${1:integer number})
snippet llDetectedTouchFace
- llDetectedTouchFace(${1:integer number})
+ llDetectedTouchFace(${1:integer number})
snippet llDetectedTouchNormal
- llDetectedTouchNormal(${1:integer number})
+ llDetectedTouchNormal(${1:integer number})
snippet llDetectedTouchPos
- llDetectedTouchPos(${1:integer number})
+ llDetectedTouchPos(${1:integer number})
snippet llDetectedTouchST
- llDetectedTouchST(${1:integer number})
+ llDetectedTouchST(${1:integer number})
snippet llDetectedTouchUV
- llDetectedTouchUV(${1:integer number})
+ llDetectedTouchUV(${1:integer number})
snippet llDetectedType
- llDetectedType(${1:integer number})
+ llDetectedType(${1:integer number})
snippet llDetectedVel
- llDetectedVel(${1:integer number})
+ llDetectedVel(${1:integer number})
snippet llDialog
- llDialog(${1:key avatar}, ${2:string message}, ${3:list buttons}, ${4:integer channel})
+ llDialog(${1:key agent}, ${2:string message}, ${3:list buttons}, ${4:integer channel});
+snippet llDie
+ llDie();
snippet llDumpList2String
- llDumpList2String(${1:list src}, ${2:string separator})
+ llDumpList2String(${1:list src}, ${2:string separator})
snippet llEdgeOfWorld
- llEdgeOfWorld(${1:vector pos}, ${2:vector dir})
+ llEdgeOfWorld(${1:vector pos}, ${2:vector dir})
snippet llEjectFromLand
- llEjectFromLand(${1:key avatar})
+ llEjectFromLand(${1:key agent});
snippet llEmail
- llEmail(${1:string address}, ${2:string subject}, ${3:string message})
+ llEmail(${1:string address}, ${2:string subject}, ${3:string message});
snippet llEscapeURL
- llEscapeURL(${1:string url})
+ llEscapeURL(${1:string url})
snippet llEuler2Rot
- llEuler2Rot(${1:vector v})
+ llEuler2Rot(${1:vector v})
snippet llExecCharacterCmd
- llExecCharacterCmd(${1:integer command}, ${2:list options})
+ llExecCharacterCmd(${1:integer command}, ${2:list options});
snippet llEvade
- llEvade(${1:key target}, ${2:list options})
+ llEvade(${1:key target}, ${2:list options});
snippet llFabs
- llFabs(${1:float val})
+ llFabs(${1:float val})
snippet llFleeFrom
- llFleeFrom(${1:vector position}, ${2:float distance}, ${3:list options})
+ llFleeFrom(${1:vector position}, ${2:float distance}, ${3:list options});
snippet llFloor
- llFloor(${1:float val})
+ llFloor(${1:float val})
snippet llForceMouselook
- llForceMouselook(${1:integer mouselook})
+ llForceMouselook(${1:integer mouselook});
snippet llFrand
- llFrand(${1:float mag})
+ llFrand(${1:float mag})
+snippet llGenerateKey
+ llGenerateKey()
+snippet llGetAccel
+ llGetAccel()
snippet llGetAgentInfo
- llGetAgentInfo(${1:key id})
+ llGetAgentInfo(${1:key id})
snippet llGetAgentLanguage
- llGetAgentLanguage(${1:key avatar})
+ llGetAgentLanguage(${1:key agent})
snippet llGetAgentList
- llGetAgentList(${1:integer scope}, ${2:list options})
+ llGetAgentList(${1:integer scope}, ${2:list options})
snippet llGetAgentSize
- llGetAgentSize(${1:key avatar})
+ llGetAgentSize(${1:key agent})
snippet llGetAlpha
- llGetAlpha(${1:integer face})
+ llGetAlpha(${1:integer face})
+snippet llGetAndResetTime
+ llGetAndResetTime()
snippet llGetAnimation
- llGetAnimation(${1:key id})
+ llGetAnimation(${1:key id})
snippet llGetAnimationList
- llGetAnimationList(${1:key avatar})
+ llGetAnimationList(${1:key agent})
snippet llGetAnimationOverride
- llGetAnimationOverride(${1:string anim_state})
+ llGetAnimationOverride(${1:string anim_state})
+snippet llGetAttached
+ llGetAttached()
snippet llGetBoundingBox
- llGetBoundingBox(${1:key object})
+ llGetBoundingBox(${1:key object})
+snippet llGetCameraPos
+ llGetCameraPos()
+snippet llGetCameraRot
+ llGetCameraRot()
+snippet llGetCenterOfMass
+ llGetCenterOfMass()
snippet llGetClosestNavPoint
- llGetClosestNavPoint(${1:vector point}, ${2:list options})
+ llGetClosestNavPoint(${1:vector point}, ${2:list options})
snippet llGetColor
- llGetColor(${1:integer face})
+ llGetColor(${1:integer face})
+snippet llGetCreator
+ llGetCreator()
+snippet llGetDate
+ llGetDate()
snippet llGetDisplayName
- llGetDisplayName(${1:key id})
+ llGetDisplayName(${1:key id})
+snippet llGetEnergy
+ llGetEnergy()
snippet llGetEnv
- llGetEnv(${1:string name})
+ llGetEnv(${1:string name})
+snippet llGetForce
+ llGetForce()
+snippet llGetFreeMemory
+ llGetFreeMemory()
+snippet llGetFreeURLs
+ llGetFreeURLs()
+snippet llGetGeometricCenter
+ llGetGeometricCenter()
+snippet llGetGMTclock
+ llGetGMTclock()
snippet llGetHTTPHeader
- llGetHTTPHeader(${1:key request_id}, ${2:string header})
+ llGetHTTPHeader(${1:key request_id}, ${2:string header})
snippet llGetInventoryCreator
- llGetInventoryCreator(${1:string item})
+ llGetInventoryCreator(${1:string item})
snippet llGetInventoryKey
- llGetInventoryKey(${1:string name})
+ llGetInventoryKey(${1:string name})
snippet llGetInventoryName
- llGetInventoryName(${1:integer type}, ${2:integer number})
+ llGetInventoryName(${1:integer type}, ${2:integer number})
snippet llGetInventoryNumber
- llGetInventoryNumber(${1:integer type})
+ llGetInventoryNumber(${1:integer type})
snippet llGetInventoryPermMask
- llGetInventoryPermMask(${1:string item}, ${2:integer mask})
+ llGetInventoryPermMask(${1:string item}, ${2:integer mask})
snippet llGetInventoryType
- llGetInventoryType(${1:string name})
+ llGetInventoryType(${1:string name})
+snippet llGetKey
+ llGetKey()
snippet llGetLandOwnerAt
- llGetLandOwnerAt(${1:vector pos})
+ llGetLandOwnerAt(${1:vector pos})
snippet llGetLinkKey
- llGetLinkKey(${1:integer link})
+ llGetLinkKey(${1:integer link})
snippet llGetLinkMedia
- llGetLinkMedia(${1:integer link}, ${2:integer face}, ${3:list params})
+ llGetLinkMedia(${1:integer link}, ${2:integer face}, ${3:list params})
snippet llGetLinkName
- llGetLinkName(${1:integer link})
+ llGetLinkName(${1:integer link})
+snippet llGetLinkNumber
+ llGetLinkNumber()
snippet llGetLinkNumberOfSides
- llGetLinkNumberOfSides(${1:integer link})
+ llGetLinkNumberOfSides(${1:integer link})
snippet llGetLinkPrimitiveParams
- llGetLinkPrimitiveParams(${1:integer link}, ${2:list params})
+ llGetLinkPrimitiveParams(${1:integer link}, ${2:list params})
snippet llGetListEntryType
- llGetListEntryType(${1:list src}, ${2:integer index})
+ llGetListEntryType(${1:list src}, ${2:integer index})
snippet llGetListLength
- llGetListLength(${1:list src})
+ llGetListLength(${1:list src})
+snippet llGetLocalPos
+ llGetLocalPos()
+snippet llGetLocalRot
+ llGetLocalRot()
+snippet llGetMass
+ llGetMass()
+snippet llGetMassMKS
+ llGetMassMKS()
+snippet llGetMaxScaleFactor
+ llGetMaxScaleFactor()
+snippet llGetMemoryLimit
+ llGetMemoryLimit()
+snippet llGetMinScaleFactor
+ llGetMinScaleFactor()
snippet llGetNextEmail
- llGetNextEmail(${1:string address}, ${2:string subject})
+ llGetNextEmail(${1:string address}, ${2:string subject});
snippet llGetNotecardLine
- llGetNotecardLine(${1:string name}, ${2:integer line})
+ llGetNotecardLine(${1:string name}, ${2:integer line})
snippet llGetNumberOfNotecardLines
- llGetNumberOfNotecardLines(${1:string name})
+ llGetNumberOfNotecardLines(${1:string name})
+snippet llGetNumberOfPrims
+ llGetNumberOfPrims()
+snippet llGetNumberOfSides
+ llGetNumberOfSides()
+snippet llGetObjectDesc
+ llGetObjectDesc()
snippet llGetObjectDetails
- llGetObjectDetails(${1:key id}, ${2:list params})
+ llGetObjectDetails(${1:key id}, ${2:list params})
snippet llGetObjectMass
- llGetObjectMass(${1:key id})
+ llGetObjectMass(${1:key id})
+snippet llGetObjectName
+ llGetObjectName()
snippet llGetObjectPermMask
- llGetObjectPermMask(${1:integer mask})
+ llGetObjectPermMask(${1:integer mask})
snippet llGetObjectPrimCount
- llGetObjectPrimCount(${1:key prim})
+ llGetObjectPrimCount(${1:key prim})
+snippet llGetOmega
+ llGetOmega()
+snippet llGetOwner
+ llGetOwner()
snippet llGetOwnerKey
- llGetOwnerKey(${1:key id})
+ llGetOwnerKey(${1:key id})
snippet llGetParcelDetails
- llGetParcelDetails(${1:vector pos}, ${2:list params})
+ llGetParcelDetails(${1:vector pos}, ${2:list params})
snippet llGetParcelFlags
- llGetParcelFlags(${1:vector pos})
+ llGetParcelFlags(${1:vector pos})
snippet llGetParcelMaxPrims
- llGetParcelMaxPrims(${1:vector pos}, ${2:integer sim_wide})
+ llGetParcelMaxPrims(${1:vector pos}, ${2:integer sim_wide})
+snippet llGetParcelMusicURL
+ llGetParcelMusicURL()
snippet llGetParcelPrimCount
- llGetParcelPrimCount(${1:vector pos}, ${2:integer category}, ${3:integer sim_wide})
+ llGetParcelPrimCount(${1:vector pos}, ${2:integer category}, ${3:integer sim_wide})
snippet llGetParcelPrimOwners
- llGetParcelPrimOwners(${1:vector pos})
+ llGetParcelPrimOwners(${1:vector pos})
+snippet llGetPermissions
+ llGetPermissions()
+snippet llGetPermissionsKey
+ llGetPermissionsKey()
+snippet llGetPhysicsMaterial
+ llGetPhysicsMaterial()
+snippet llGetPos
+ llGetPos()
snippet llGetPrimitiveParams
- llGetPrimitiveParams(${1:list params})
+ llGetPrimitiveParams(${1:list params})
snippet llGetPrimMediaParams
- llGetPrimMediaParams(${1:integer face}, ${2:list params})
+ llGetPrimMediaParams(${1:integer face}, ${2:list params})
+snippet llGetRegionAgentCount
+ llGetRegionAgentCount()
+snippet llGetRegionCorner
+ llGetRegionCorner()
+snippet llGetRegionFlags
+ llGetRegionFlags()
+snippet llGetRegionFPS
+ llGetRegionFPS()
+snippet llGetRegionName
+ llGetRegionName()
+snippet llGetRegionTimeDilation
+ llGetRegionTimeDilation()
+snippet llGetRootPosition
+ llGetRootPosition()
+snippet llGetRootRotation
+ llGetRootRotation()
+snippet llGetRot
+ llGetRot()
+snippet llGetScale
+ llGetScale()
+snippet llGetScriptName
+ llGetScriptName()
snippet llGetScriptState
- llGetScriptState(${1:string script})
+ llGetScriptState(${1:string script})
snippet llGetSimStats
- llGetSimStats(${1:integer stat_type})
+ llGetSimStats(${1:integer stat_type})
+snippet llGetSimulatorHostname
+ llGetSimulatorHostname()
+snippet llGetSPMaxMemory
+ llGetSPMaxMemory()
+snippet llGetStartParameter
+ llGetStartParameter()
snippet llGetStaticPath
- llGetStaticPath(${1:vector start}, ${2:vector end}, ${3:float radius}, ${4:list params})
+ llGetStaticPath(${1:vector start}, ${2:vector end}, ${3:float radius}, ${4:list params})
snippet llGetStatus
- llGetStatus(${1:integer status})
+ llGetStatus(${1:integer status})
snippet llGetSubString
- llGetSubString(${1:string src}, ${2:integer start}, ${3:integer end})
+ llGetSubString(${1:string src}, ${2:integer start}, ${3:integer end})
+snippet llGetSunDirection
+ llGetSunDirection()
snippet llGetTexture
- llGetTexture(${1:integer face})
+ llGetTexture(${1:integer face})
snippet llGetTextureOffset
- llGetTextureOffset(${1:integer face})
+ llGetTextureOffset(${1:integer face})
snippet llGetTextureRot
- llGetTextureRot(${1:integer face})
+ llGetTextureRot(${1:integer face})
snippet llGetTextureScale
- llGetTextureScale(${1:integer face})
+ llGetTextureScale(${1:integer face})
+snippet llGetTime
+ llGetTime()
+snippet llGetTimeOfDay
+ llGetTimeOfDay()
+snippet llGetTimestamp
+ llGetTimestamp()
+snippet llGetTorque
+ llGetTorque()
+snippet llGetUnixTime
+ llGetUnixTime()
+snippet llGetUsedMemory
+ llGetUsedMemory()
snippet llGetUsername
- llGetUsername(${1:key id})
+ llGetUsername(${1:key id})
+snippet llGetVel
+ llGetVel()
+snippet llGetWallclock
+ llGetWallclock()
snippet llGiveInventory
- llGiveInventory(${1:key destination}, ${2:string inventory})
+ llGiveInventory(${1:key destination}, ${2:string inventory});
snippet llGiveInventoryList
- llGiveInventoryList(${1:key target}, ${2:string folder}, ${3:list inventory})
+ llGiveInventoryList(${1:key target}, ${2:string folder}, ${3:list inventory});
snippet llGiveMoney
- llGiveMoney(${1:key destination}, ${2:integer amount})
+ llGiveMoney(${1:key destination}, ${2:integer amount})
snippet llGround
- llGround(${1:vector offset})
+ llGround(${1:vector offset})
snippet llGroundContour
- llGroundContour(${1:vector offset})
+ llGroundContour(${1:vector offset})
snippet llGroundNormal
- llGroundNormal(${1:vector offset})
+ llGroundNormal(${1:vector offset})
snippet llGroundRepel
- llGroundRepel(${1:float height}, ${2:integer water}, ${3:float tau})
+ llGroundRepel(${1:float height}, ${2:integer water}, ${3:float tau});
snippet llGroundSlope
- llGroundSlope(${1:vector offset})
+ llGroundSlope(${1:vector offset})
snippet llHTTPRequest
- llHTTPRequest(${1:string url}, ${2:list parameters}, ${3:string body})
+ llHTTPRequest(${1:string url}, ${2:list parameters}, ${3:string body})
snippet llHTTPResponse
- llHTTPResponse(${1:key request_id}, ${2:integer status}, ${3:string body})
+ llHTTPResponse(${1:key request_id}, ${2:integer status}, ${3:string body});
snippet llInsertString
- llInsertString(${1:string dst}, ${2:integer pos}, ${3:string src})
+ llInsertString(${1:string dst}, ${2:integer pos}, ${3:string src})
snippet llInstantMessage
- llInstantMessage(${1:key user}, ${2:string message})
+ llInstantMessage(${1:key user}, ${2:string message});
snippet llIntegerToBase64
- llIntegerToBase64(${1:integer number})
+ llIntegerToBase64(${1:integer number})
snippet llJson2List
- llJson2List(${1:string json})
+ llJson2List(${1:string json})
snippet llJsonGetValue
- llJsonGetValue(${1:string json}, ${2:list specifiers})
+ llJsonGetValue(${1:string json}, ${2:list specifiers})
snippet llJsonSetValue
- llJsonSetValue(${1:string json}, ${2:list specifiers}, ${3:string newValue})
+ llJsonSetValue(${1:string json}, ${2:list specifiers}, ${3:string newValue})
snippet llJsonValueType
- llJsonValueType(${1:string json}, ${2:list specifiers})
+ llJsonValueType(${1:string json}, ${2:list specifiers})
snippet llKey2Name
- llKey2Name(${1:key id})
+ llKey2Name(${1:key id})
snippet llLinkParticleSystem
- llLinkParticleSystem(${1:integer link}, ${2:list rules})
+ llLinkParticleSystem(${1:integer link}, ${2:list rules});
snippet llLinkSitTarget
- llLinkSitTarget(${1:integer link}, ${2:vector offset}, ${3:rotation rot})
+ llLinkSitTarget(${1:integer link}, ${2:vector offset}, ${3:rotation rot});
snippet llList2CSV
- llList2CSV(${1:list src})
+ llList2CSV(${1:list src})
snippet llList2Float
- llList2Float(${1:list src}, ${2:integer index})
+ llList2Float(${1:list src}, ${2:integer index})
snippet llList2Integer
- llList2Integer(${1:list src}, ${2:integer index})
+ llList2Integer(${1:list src}, ${2:integer index})
snippet llList2Json
- llList2Json(${1:string type}, ${2:list values})
+ llList2Json(${1:string type}, ${2:list values})
snippet llList2Key
- llList2Key(${1:list src}, ${2:integer index})
+ llList2Key(${1:list src}, ${2:integer index})
snippet llList2List
- llList2List(${1:list src}, ${2:integer start}, ${3:integer end})
+ llList2List(${1:list src}, ${2:integer start}, ${3:integer end})
snippet llList2ListStrided
- llList2ListStrided(${1:list src}, ${2:integer start}, ${3:integer end}, ${4:integer stride})
+ llList2ListStrided(${1:list src}, ${2:integer start}, ${3:integer end}, ${4:integer stride})
snippet llList2Rot
- llList2Rot(${1:list src}, ${2:integer index})
+ llList2Rot(${1:list src}, ${2:integer index})
snippet llList2String
- llList2String(${1:list src}, ${2:integer index})
+ llList2String(${1:list src}, ${2:integer index})
snippet llList2Vector
- llList2Vector(${1:list src}, ${2:integer index})
+ llList2Vector(${1:list src}, ${2:integer index})
snippet llListen
- llListen(${1:integer channel}, ${2:string name}, ${3:key id}, ${4:string msg})
+ llListen(${1:integer channel}, ${2:string name}, ${3:key id}, ${4:string msg})
snippet llListenControl
- llListenControl(${1:integer handle}, ${2:integer active})
+ llListenControl(${1:integer handle}, ${2:integer active});
snippet llListenRemove
- llListenRemove(${1:integer handle})
+ llListenRemove(${1:integer handle});
snippet llListFindList
- llListFindList(${1:list src}, ${2:list test})
+ llListFindList(${1:list src}, ${2:list test})
snippet llListInsertList
- llListInsertList(${1:list dest}, ${2:list src}, ${3:integer start})
+ llListInsertList(${1:list dest}, ${2:list src}, ${3:integer start})
snippet llListRandomize
- llListRandomize(${1:list src}, ${2:integer stride})
+ llListRandomize(${1:list src}, ${2:integer stride})
snippet llListReplaceList
- llListReplaceList(${1:list dest}, ${2:list src}, ${3:integer start}, ${4:integer end})
+ llListReplaceList(${1:list dest}, ${2:list src}, ${3:integer start}, ${4:integer end})
snippet llListSort
- llListSort(${1:list src}, ${2:integer stride}, ${3:integer ascending})
+ llListSort(${1:list src}, ${2:integer stride}, ${3:integer ascending})
snippet llListStatistics
- llListStatistics(${1:integer operation}, ${2:list src})
+ llListStatistics(${1:integer operation}, ${2:list src})
snippet llLoadURL
- llLoadURL(${1:key avatar}, ${2:string message}, ${3:string url})
+ llLoadURL(${1:key agent}, ${2:string message}, ${3:string url});
snippet llLog
- llLog(${1:float val})
+ llLog(${1:float val})
snippet llLog10
- llLog10(${1:float val})
+ llLog10(${1:float val})
snippet llLookAt
- llLookAt(${1:vector target}, ${2:float strength}, ${3:float damping})
+ llLookAt(${1:vector target}, ${2:float strength}, ${3:float damping});
snippet llLoopSound
- llLoopSound(${1:string sound}, ${2:float volume})
+ llLoopSound(${1:string sound}, ${2:float volume});
snippet llLoopSoundMaster
- llLoopSoundMaster(${1:string sound}, ${2:float volume})
+ llLoopSoundMaster(${1:string sound}, ${2:float volume});
snippet llLoopSoundSlave
- llLoopSoundSlave(${1:string sound}, ${2:float volume})
+ llLoopSoundSlave(${1:string sound}, ${2:float volume});
snippet llManageEstateAccess
- llManageEstateAccess(${1:integer action}, ${2:key avatar})
+ llManageEstateAccess(${1:integer action}, ${2:key agent})
snippet llMapDestination
- llMapDestination(${1:string simname}, ${2:vector pos}, ${3:vector look_at})
+ llMapDestination(${1:string simname}, ${2:vector pos}, ${3:vector look_at});
snippet llMD5String
- llMD5String(${1:string src}, ${2:integer nonce})
+ llMD5String(${1:string src}, ${2:integer nonce})
snippet llMessageLinked
- llMessageLinked(${1:integer link}, ${2:integer num}, ${3:string str}, ${4:key id})
+ llMessageLinked(${1:integer link}, ${2:integer num}, ${3:string str}, ${4:key id});
snippet llMinEventDelay
- llMinEventDelay(${1:float delay})
+ llMinEventDelay(${1:float delay});
snippet llModifyLand
- llModifyLand(${1:integer action}, ${2:integer brush})
+ llModifyLand(${1:integer action}, ${2:integer brush});
snippet llModPow
- llModPow(${1:integer a}, ${2:integer b}, ${3:integer c})
+ llModPow(${1:integer a}, ${2:integer b}, ${3:integer c})
snippet llMoveToTarget
- llMoveToTarget(${1:vector target}, ${2:float tau})
+ llMoveToTarget(${1:vector target}, ${2:float tau});
snippet llNavigateTo
- llNavigateTo(${1:vector pos}, ${2:list options})
+ llNavigateTo(${1:vector pos}, ${2:list options});
snippet llOffsetTexture
- llOffsetTexture(${1:float u}, ${2:float v}, ${3:integer face})
+ llOffsetTexture(${1:float u}, ${2:float v}, ${3:integer face});
+snippet llOpenRemoteDataChannel
+ llOpenRemoteDataChannel();
snippet llOverMyLand
- llOverMyLand(${1:key id})
+ llOverMyLand(${1:key id})
snippet llOwnerSay
- llOwnerSay(${1:string msg})
+ llOwnerSay(${1:string msg});
snippet llParcelMediaCommandList
- llParcelMediaCommandList(${1:list commandList})
+ llParcelMediaCommandList(${1:list commandList});
snippet llParcelMediaQuery
- llParcelMediaQuery(${1:list query})
+ llParcelMediaQuery(${1:list query})
snippet llParseString2List
- llParseString2List(${1:string src}, ${2:list separators}, ${3:list spacers})
+ llParseString2List(${1:string src}, ${2:list separators}, ${3:list spacers})
snippet llParseStringKeepNulls
- llParseStringKeepNulls(${1:string src}, ${2:list separators}, ${3:list spacers})
+ llParseStringKeepNulls(${1:string src}, ${2:list separators}, ${3:list spacers})
snippet llParticleSystem
- llParticleSystem(${1:list rules})
+ llParticleSystem(${1:list rules});
snippet llPassCollisions
- llPassCollisions(${1:integer pass})
+ llPassCollisions(${1:integer pass});
snippet llPassTouches
- llPassTouches(${1:integer pass})
+ llPassTouches(${1:integer pass});
snippet llPatrolPoints
- llPatrolPoints(${1:list patrolPoints}, ${2:list options})
+ llPatrolPoints(${1:list patrolPoints}, ${2:list options});
snippet llPlaySound
- llPlaySound(${1:string sound}, ${2:float volume})
+ llPlaySound(${1:string sound}, ${2:float volume});
snippet llPlaySoundSlave
- llPlaySoundSlave(${1:string sound}, ${2:float volume})
+ llPlaySoundSlave(${1:string sound}, ${2:float volume});
snippet llPow
- llPow(${1:float base}, ${2:float exponent})
+ llPow(${1:float base}, ${2:float exponent})
snippet llPreloadSound
- llPreloadSound(${1:string sound})
+ llPreloadSound(${1:string sound});
snippet llPursue
- llPursue(${1:key target}, ${2:list options})
+ llPursue(${1:key target}, ${2:list options});
snippet llPushObject
- llPushObject(${1:key target}, ${2:vector impulse}, ${3:vector ang_impulse}, ${4:integer local})
+ llPushObject(${1:key target}, ${2:vector impulse}, ${3:vector ang_impulse}, ${4:integer local});
snippet llRegionSay
- llRegionSay(${1:integer channel}, ${2:string msg})
+ llRegionSay(${1:integer channel}, ${2:string msg});
snippet llRegionSayTo
- llRegionSayTo(${1:key target}, ${2:integer channel}, ${3:string msg})
+ llRegionSayTo(${1:key target}, ${2:integer channel}, ${3:string msg});
+snippet llReleaseControls
+ llReleaseControls();
snippet llReleaseURL
- llReleaseURL(${1:string url})
+ llReleaseURL(${1:string url});
snippet llRemoteDataReply
- llRemoteDataReply(${1:key channel}, ${2:key message_id}, ${3:string sdata}, ${4:integer idata})
+ llRemoteDataReply(${1:key channel}, ${2:key message_id}, ${3:string sdata}, ${4:integer idata});
snippet llRemoteLoadScriptPin
- llRemoteLoadScriptPin(${1:key target}, ${2:string name}, ${3:integer pin}, ${4:integer running}, ${5:integer start_param})
+ llRemoteLoadScriptPin(${1:key target}, ${2:string name}, ${3:integer pin}, ${4:integer running}, ${5:integer start_param});
snippet llRemoveFromLandBanList
- llRemoveFromLandBanList(${1:key avatar})
+ llRemoveFromLandBanList(${1:key agent});
snippet llRemoveFromLandPassList
- llRemoveFromLandPassList(${1:key avatar})
+ llRemoveFromLandPassList(${1:key agent});
snippet llRemoveInventory
- llRemoveInventory(${1:string item})
+ llRemoveInventory(${1:string item});
snippet llRemoveVehicleFlags
- llRemoveVehicleFlags(${1:integer flags})
+ llRemoveVehicleFlags(${1:integer flags});
snippet llRequestAgentData
- llRequestAgentData(${1:key id}, ${2:integer data})
+ llRequestAgentData(${1:key id}, ${2:integer data})
snippet llRequestDisplayName
- llRequestDisplayName(${1:key id})
+ llRequestDisplayName(${1:key id})
snippet llRequestInventoryData
- llRequestInventoryData(${1:string name})
+ llRequestInventoryData(${1:string name})
snippet llRequestPermissions
- llRequestPermissions(${1:key agent}, ${2:integer permissions})
+ llRequestPermissions(${1:key agent}, ${2:integer permissions})
+snippet llRequestSecureURL
+ llRequestSecureURL()
snippet llRequestSimulatorData
- llRequestSimulatorData(${1:string region}, ${2:integer data})
+ llRequestSimulatorData(${1:string region}, ${2:integer data})
+snippet llRequestURL
+ llRequestURL()
snippet llRequestUsername
- llRequestUsername(${1:key id})
+ llRequestUsername(${1:key id})
snippet llResetAnimationOverride
- llResetAnimationOverride(${1:string anim_state})
+ llResetAnimationOverride(${1:string anim_state});
+snippet llResetLandBanList
+ llResetLandBanList();
+snippet llResetLandPassList
+ llResetLandPassList();
snippet llResetOtherScript
- llResetOtherScript(${1:string name})
+ llResetOtherScript(${1:string name});
+snippet llResetScript
+ llResetScript();
+snippet llResetTime
+ llResetTime();
snippet llReturnObjectsByID
- llReturnObjectsByID(${1:list objects})
+ llReturnObjectsByID(${1:list objects})
snippet llReturnObjectsByOwner
- llReturnObjectsByOwner(${1:key owner}, ${2:integer scope})
+ llReturnObjectsByOwner(${1:key owner}, ${2:integer scope})
snippet llRezAtRoot
- llRezAtRoot(${1:string inventory}, ${2:vector position}, ${3:vector velocity}, ${4:rotation rot}, ${5:integer param})
+ llRezAtRoot(${1:string inventory}, ${2:vector position}, ${3:vector velocity}, ${4:rotation rot}, ${5:integer param});
snippet llRezObject
- llRezObject(${1:string inventory}, ${2:vector pos}, ${3:vector vel}, ${4:rotation rot}, ${5:integer param})
+ llRezObject(${1:string inventory}, ${2:vector pos}, ${3:vector vel}, ${4:rotation rot}, ${5:integer param});
snippet llRot2Angle
- llRot2Angle(${1:rotation rot})
+ llRot2Angle(${1:rotation rot})
snippet llRot2Axis
- llRot2Axis(${1:rotation rot})
+ llRot2Axis(${1:rotation rot})
snippet llRot2Euler
- llRot2Euler(${1:rotation quat})
+ llRot2Euler(${1:rotation quat})
snippet llRot2Fwd
- llRot2Fwd(${1:rotation q})
+ llRot2Fwd(${1:rotation q})
snippet llRot2Left
- llRot2Left(${1:rotation q})
+ llRot2Left(${1:rotation q})
snippet llRot2Up
- llRot2Up(${1:rotation q})
+ llRot2Up(${1:rotation q})
snippet llRotateTexture
- llRotateTexture(${1:float angle}, ${2:integer face})
+ llRotateTexture(${1:float angle}, ${2:integer face});
snippet llRotBetween
- llRotBetween(${1:vector start}, ${2:vector end})
+ llRotBetween(${1:vector start}, ${2:vector end})
snippet llRotLookAt
- llRotLookAt(${1:rotation target_direction}, ${2:float strength}, ${3:float damping})
+ llRotLookAt(${1:rotation target_direction}, ${2:float strength}, ${3:float damping});
snippet llRotTarget
- llRotTarget(${1:rotation rot}, ${2:float error})
+ llRotTarget(${1:rotation rot}, ${2:float error})
snippet llRotTargetRemove
- llRotTargetRemove(${1:integer handle})
+ llRotTargetRemove(${1:integer handle});
snippet llRound
- llRound(${1:float val})
+ llRound(${1:float val})
snippet llSameGroup
- llSameGroup(${1:key uuid})
+ llSameGroup(${1:key group})
snippet llSay
- llSay(${1:integer channel}, ${2:string msg})
+ llSay(${1:integer channel}, ${2:string msg});
+snippet llScaleByFactor
+ llScaleByFactor(${1:float scaling_factor})
snippet llScaleTexture
- llScaleTexture(${1:float u}, ${2:float v}, ${3:integer face})
+ llScaleTexture(${1:float u}, ${2:float v}, ${3:integer face});
snippet llScriptDanger
- llScriptDanger(${1:vector pos})
+ llScriptDanger(${1:vector pos})
snippet llScriptProfiler
- llScriptProfiler(${1:integer flags})
+ llScriptProfiler(${1:integer flags});
snippet llSendRemoteData
- llSendRemoteData(${1:key channel}, ${2:string dest}, ${3:integer idata}, ${4:string sdata})
+ llSendRemoteData(${1:key channel}, ${2:string dest}, ${3:integer idata}, ${4:string sdata})
snippet llSensor
- llSensor(${1:string name}, ${2:key id}, ${3:integer type}, ${4:float range}, ${5:float arc})
+ llSensor(${1:string name}, ${2:key id}, ${3:integer type}, ${4:float range}, ${5:float arc});
snippet llSensorRepeat
- llSensorRepeat(${1:string name}, ${2:key id}, ${3:integer type}, ${4:float range}, ${5:float arc}, ${6:float rate})
+ llSensorRepeat(${1:string name}, ${2:key id}, ${3:integer type}, ${4:float range}, ${5:float arc}, ${6:float rate});
snippet llSetAlpha
- llSetAlpha(${1:float alpha}, ${2:integer face})
+ llSetAlpha(${1:float alpha}, ${2:integer face});
snippet llSetAngularVelocity
- llSetAngularVelocity(${1:vector force}, ${2:integer local})
+ llSetAngularVelocity(${1:vector force}, ${2:integer local});
snippet llSetAnimationOverride
- llSetAnimationOverride(${1:string anim_state}, ${2:string anim})
+ llSetAnimationOverride(${1:string anim_state}, ${2:string anim})
snippet llSetBuoyancy
- llSetBuoyancy(${1:float buoyancy})
+ llSetBuoyancy(${1:float buoyancy});
snippet llSetCameraAtOffset
- llSetCameraAtOffset(${1:vector offset})
+ llSetCameraAtOffset(${1:vector offset});
snippet llSetCameraEyeOffset
- llSetCameraEyeOffset(${1:vector offset})
+ llSetCameraEyeOffset(${1:vector offset});
snippet llSetCameraParams
- llSetCameraParams(${1:list rules})
+ llSetCameraParams(${1:list rules});
snippet llSetClickAction
- llSetClickAction(${1:integer action})
+ llSetClickAction(${1:integer action});
snippet llSetColor
- llSetColor(${1:vector color}, ${2:integer face})
+ llSetColor(${1:vector color}, ${2:integer face});
snippet llSetContentType
- llSetContentType(${1:key request_id}, ${2:integer content_type})
+ llSetContentType(${1:key request_id}, ${2:integer content_type});
snippet llSetDamage
- llSetDamage(${1:float damage})
+ llSetDamage(${1:float damage});
snippet llSetForce
- llSetForce(${1:vector force}, ${2:integer local})
+ llSetForce(${1:vector force}, ${2:integer local});
snippet llSetForceAndTorque
- llSetForceAndTorque(${1:vector force}, ${2:vector torque}, ${3:integer local})
+ llSetForceAndTorque(${1:vector force}, ${2:vector torque}, ${3:integer local});
snippet llSetHoverHeight
- llSetHoverHeight(${1:float height}, ${2:integer water}, ${3:float tau})
+ llSetHoverHeight(${1:float height}, ${2:integer water}, ${3:float tau});
snippet llSetKeyframedMotion
- llSetKeyframedMotion(${1:list keyframes}, ${2:list options})
+ llSetKeyframedMotion(${1:list keyframes}, ${2:list options});
snippet llSetLinkAlpha
- llSetLinkAlpha(${1:integer link}, ${2:float alpha}, ${3:integer face})
+ llSetLinkAlpha(${1:integer link}, ${2:float alpha}, ${3:integer face});
snippet llSetLinkCamera
- llSetLinkCamera(${1:integer link}, ${2:vector eye}, ${3:vector at})
+ llSetLinkCamera(${1:integer link}, ${2:vector eye}, ${3:vector at});
snippet llSetLinkColor
- llSetLinkColor(${1:integer link}, ${2:vector color}, ${3:integer face})
+ llSetLinkColor(${1:integer link}, ${2:vector color}, ${3:integer face});
snippet llSetLinkMedia
- llSetLinkMedia(${1:integer link}, ${2:integer face}, ${3:list params})
+ llSetLinkMedia(${1:integer link}, ${2:integer face}, ${3:list params});
snippet llSetLinkPrimitiveParams
- llSetLinkPrimitiveParams(${1:integer link}, ${2:list rules})
+ llSetLinkPrimitiveParams(${1:integer link}, ${2:list rules});
snippet llSetLinkPrimitiveParamsFast
- llSetLinkPrimitiveParamsFast(${1:integer link}, ${2:list rules})
+ llSetLinkPrimitiveParamsFast(${1:integer link}, ${2:list rules});
snippet llSetLinkTexture
- llSetLinkTexture(${1:integer link}, ${2:string texture}, ${3:integer face})
+ llSetLinkTexture(${1:integer link}, ${2:string texture}, ${3:integer face});
snippet llSetLinkTextureAnim
- llSetLinkTextureAnim(${1:integer link}, ${2:integer mode}, ${3:integer face}, ${4:integer sizex}, ${5:integer sizey}, ${6:float start}, ${7:float length}, ${8:float rate})
+ llSetLinkTextureAnim(${1:integer link}, ${2:integer mode}, ${3:integer face}, ${4:integer sizex}, ${5:integer sizey}, ${6:float start}, ${7:float length}, ${8:float rate});
snippet llSetLocalRot
- llSetLocalRot(${1:rotation rot})
+ llSetLocalRot(${1:rotation rot});
snippet llSetMemoryLimit
- llSetMemoryLimit(${1:integer limit})
+ llSetMemoryLimit(${1:integer limit})
snippet llSetObjectDesc
- llSetObjectDesc(${1:string description})
+ llSetObjectDesc(${1:string description});
snippet llSetObjectName
- llSetObjectName(${1:string name})
+ llSetObjectName(${1:string name});
snippet llSetParcelMusicURL
- llSetParcelMusicURL(${1:string url})
+ llSetParcelMusicURL(${1:string url});
snippet llSetPayPrice
- llSetPayPrice(${1:integer price}, ${2:list quick_pay_buttons})
+ llSetPayPrice(${1:integer price}, [${2:integer price_button_a}, ${3:integer price_button_b}, ${4:integer price_button_c}, ${5:integer price_button_d}]);
snippet llSetPhysicsMaterial
- llSetPhysicsMaterial(${1:integer mask}, ${2:float gravity_multiplier}, ${3:float restitution}, ${4:float friction}, ${5:float density})
+ llSetPhysicsMaterial(${1:integer mask}, ${2:float gravity_multiplier}, ${3:float restitution}, ${4:float friction}, ${5:float density});
snippet llSetPos
- llSetPos(${1:vector pos})
+ llSetPos(${1:vector pos});
snippet llSetPrimitiveParams
- llSetPrimitiveParams(${1:list rules})
+ llSetPrimitiveParams(${1:list rules});
snippet llSetPrimMediaParams
- llSetPrimMediaParams(${1:integer face}, ${2:list params})
+ llSetPrimMediaParams(${1:integer face}, ${2:list params});
snippet llSetRegionPos
- llSetRegionPos(${1:vector position})
+ llSetRegionPos(${1:vector position})
snippet llSetRemoteScriptAccessPin
- llSetRemoteScriptAccessPin(${1:integer pin})
+ llSetRemoteScriptAccessPin(${1:integer pin});
snippet llSetRot
- llSetRot(${1:rotation rot})
+ llSetRot(${1:rotation rot});
snippet llSetScale
- llSetScale(${1:vector size})
+ llSetScale(${1:vector size});
snippet llSetScriptState
- llSetScriptState(${1:string name}, ${2:integer run})
+ llSetScriptState(${1:string name}, ${2:integer run});
snippet llSetSitText
- llSetSitText(${1:string text})
+ llSetSitText(${1:string text});
snippet llSetSoundQueueing
- llSetSoundQueueing(${1:integer queue})
+ llSetSoundQueueing(${1:integer queue});
snippet llSetSoundRadius
- llSetSoundRadius(${1:float radius})
+ llSetSoundRadius(${1:float radius});
snippet llSetStatus
- llSetStatus(${1:integer status}, ${2:integer value})
+ llSetStatus(${1:integer status}, ${2:integer value});
snippet llSetText
- llSetText(${1:string text}, ${2:vector color}, ${3:float alpha})
+ llSetText(${1:string text}, ${2:vector color}, ${3:float alpha});
snippet llSetTexture
- llSetTexture(${1:string texture}, ${2:integer face})
+ llSetTexture(${1:string texture}, ${2:integer face});
snippet llSetTextureAnim
- llSetTextureAnim(${1:integer mode}, ${2:integer face}, ${3:integer sizex}, ${4:integer sizey}, ${5:float start}, ${6:float length}, ${7:float rate})
+ llSetTextureAnim(${1:integer mode}, ${2:integer face}, ${3:integer sizex}, ${4:integer sizey}, ${5:float start}, ${6:float length}, ${7:float rate});
snippet llSetTimerEvent
- llSetTimerEvent(${1:float sec})
+ llSetTimerEvent(${1:float sec});
snippet llSetTorque
- llSetTorque(${1:vector torque}, ${2:integer local})
+ llSetTorque(${1:vector torque}, ${2:integer local});
snippet llSetTouchText
- llSetTouchText(${1:string text})
+ llSetTouchText(${1:string text});
snippet llSetVehicleFlags
- llSetVehicleFlags(${1:integer flags})
+ llSetVehicleFlags(${1:integer flags});
snippet llSetVehicleFloatParam
- llSetVehicleFloatParam(${1:integer param}, ${2:float value})
+ llSetVehicleFloatParam(${1:integer param}, ${2:float value});
snippet llSetVehicleRotationParam
- llSetVehicleRotationParam(${1:integer param}, ${2:rotation rot})
+ llSetVehicleRotationParam(${1:integer param}, ${2:rotation rot});
snippet llSetVehicleType
- llSetVehicleType(${1:integer type})
+ llSetVehicleType(${1:integer type});
snippet llSetVehicleVectorParam
- llSetVehicleVectorParam(${1:integer param}, ${2:vector vec})
+ llSetVehicleVectorParam(${1:integer param}, ${2:vector vec});
snippet llSetVelocity
- llSetVelocity(${1:vector force}, ${2:integer local})
+ llSetVelocity(${1:vector force}, ${2:integer local});
snippet llSHA1String
- llSHA1String(${1:string src})
+ llSHA1String(${1:string src})
snippet llShout
- llShout(${1:integer channel}, ${2:string msg})
+ llShout(${1:integer channel}, ${2:string msg});
snippet llSin
- llSin(${1:float theta})
+ llSin(${1:float theta})
snippet llSitTarget
- llSitTarget(${1:vector offset}, ${2:rotation rot})
+ llSitTarget(${1:vector offset}, ${2:rotation rot});
snippet llSleep
- llSleep(${1:float sec})
+ llSleep(${1:float sec});
snippet llSqrt
- llSqrt(${1:float val})
+ llSqrt(${1:float val})
snippet llStartAnimation
- llStartAnimation(${1:string anim})
+ llStartAnimation(${1:string anim});
snippet llStopAnimation
- llStopAnimation(${1:string anim})
+ llStopAnimation(${1:string anim});
+snippet llStopHover
+ llStopHover();
+snippet llStopLookAt
+ llStopLookAt();
+snippet llStopMoveToTarget
+ llStopMoveToTarget();
+snippet llStopSound
+ llStopSound();
snippet llStringLength
- llStringLength(${1:string str})
+ llStringLength(${1:string str})
snippet llStringToBase64
- llStringToBase64(${1:string str})
+ llStringToBase64(${1:string str})
snippet llStringTrim
- llStringTrim(${1:string src}, ${2:integer type})
+ llStringTrim(${1:string src}, ${2:integer type})
snippet llSubStringIndex
- llSubStringIndex(${1:string source}, ${2:string pattern})
+ llSubStringIndex(${1:string source}, ${2:string pattern})
snippet llTakeControls
- llTakeControls(${1:integer controls}, ${2:integer accept}, ${3:integer pass_on})
+ llTakeControls(${1:integer controls}, ${2:integer accept}, ${3:integer pass_on});
snippet llTan
- llTan(${1:float theta})
+ llTan(${1:float theta})
snippet llTarget
- llTarget(${1:vector position}, ${2:float range})
+ llTarget(${1:vector position}, ${2:float range})
snippet llTargetOmega
- llTargetOmega(${1:vector axis}, ${2:float spinrate}, ${3:float gain})
+ llTargetOmega(${1:vector axis}, ${2:float spinrate}, ${3:float gain});
snippet llTargetRemove
- llTargetRemove(${1:integer handle})
+ llTargetRemove(${1:integer handle});
snippet llTeleportAgent
- llTeleportAgent(${1:key avatar}, ${2:string landmark}, ${3:vector position}, ${4:vector look_at})
+ llTeleportAgent(${1:key agent}, ${2:string landmark}, ${3:vector position}, ${4:vector look_at});
snippet llTeleportAgentGlobalCoords
- llTeleportAgentGlobalCoords(${1:key agent}, ${2:vector global_coordinates}, ${3:vector region_coordinates}, ${4:vector look_at})
+ llTeleportAgentGlobalCoords(${1:key agent}, ${2:vector global_coordinates}, ${3:vector region_coordinates}, ${4:vector look_at});
snippet llTeleportAgentHome
- llTeleportAgentHome(${1:key avatar})
+ llTeleportAgentHome(${1:key agent});
snippet llTextBox
- llTextBox(${1:key avatar}, ${2:string message}, ${3:integer channel})
+ llTextBox(${1:key agent}, ${2:string message}, ${3:integer channel});
snippet llToLower
- llToLower(${1:string src})
+ llToLower(${1:string src})
snippet llToUpper
- llToUpper(${1:string src})
+ llToUpper(${1:string src})
snippet llTransferLindenDollars
- llTransferLindenDollars(${1:key destination}, ${2:integer amount})
+ llTransferLindenDollars(${1:key destination}, ${2:integer amount})
snippet llTriggerSound
- llTriggerSound(${1:string sound}, ${2:float volume})
+ llTriggerSound(${1:string sound}, ${2:float volume});
snippet llTriggerSoundLimited
- llTriggerSoundLimited(${1:string sound}, ${2:float volume}, ${3:vector top_north_east}, ${4:vector bottom_south_west})
+ llTriggerSoundLimited(${1:string sound}, ${2:float volume}, ${3:vector top_north_east}, ${4:vector bottom_south_west});
snippet llUnescapeURL
- llUnescapeURL(${1:string url})
+ llUnescapeURL(${1:string url})
snippet llUnSit
- llUnSit(${1:key id})
+ llUnSit(${1:key id});
snippet llUpdateCharacter
- llUpdateCharacter(${1:list options})
+ llUpdateCharacter(${1:list options})
snippet llVecDist
- llVecDist(${1:vector vec_a}, ${2:vector vec_b})
+ llVecDist(${1:vector vec_a}, ${2:vector vec_b})
snippet llVecMag
- llVecMag(${1:vector vec})
+ llVecMag(${1:vector vec})
snippet llVecNorm
- llVecNorm(${1:vector vec})
+ llVecNorm(${1:vector vec})
snippet llVolumeDetect
- llVolumeDetect(${1:integer detect})
+ llVolumeDetect(${1:integer detect});
snippet llWanderWithin
- llWanderWithin(${1:vector origin}, ${2:vector dist}, ${3:list options})
+ llWanderWithin(${1:vector origin}, ${2:vector dist}, ${3:list options});
snippet llWater
- llWater(${1:vector offset})
+ llWater(${1:vector offset});
snippet llWhisper
- llWhisper(${1:integer channel}, ${2:string msg})
+ llWhisper(${1:integer channel}, ${2:string msg});
snippet llWind
- llWind(${1:vector offset})
+ llWind(${1:vector offset});
snippet llXorBase64
- llXorBase64(${1:string str1}, ${2:string str2}
+ llXorBase64(${1:string str1}, ${2:string str2})
snippet money
- money(${1:key id}, ${2:integer amount})
- {
- $0
- }
+ money(${1:key id}, ${2:integer amount})
+ {
+ $0
+ }
snippet object_rez
- object_rez(${1:key id})
- {
- $0
- }
+ object_rez(${1:key id})
+ {
+ $0
+ }
snippet on_rez
- on_rez(${1:integer start_param})
- {
- $0
- }
+ on_rez(${1:integer start_param})
+ {
+ $0
+ }
snippet path_update
- path_update(${1:integer type}, ${2:list reserved})
- {
- $0
- }
+ path_update(${1:integer type}, ${2:list reserved})
+ {
+ $0
+ }
snippet remote_data
- remote_data(${1:integer event_type}, ${2:key channel}, ${3:key message_id}, ${4:string sender}, ${5:integer idata}, ${6:string sdata})
- {
- $0
- }
+ remote_data(${1:integer event_type}, ${2:key channel}, ${3:key message_id}, ${4:string sender}, ${5:integer idata}, ${6:string sdata})
+ {
+ $0
+ }
snippet run_time_permissions
- run_time_permissions(${1:integer perm})
- {
- $0
- }
+ run_time_permissions(${1:integer perm})
+ {
+ $0
+ }
snippet sensor
- sensor(${1:integer index})
- {
- $0
- }
+ sensor(${1:integer index})
+ {
+ $0
+ }
snippet state
- state ${1:name}
+ state ${1:name}
snippet touch
- touch(${1:integer index})
- {
- $0
- }
+ touch(${1:integer index})
+ {
+ $0
+ }
snippet touch_end
- touch_end(${1:integer index})
- {
- $0
- }
+ touch_end(${1:integer index})
+ {
+ $0
+ }
snippet touch_start
- touch_start(${1:integer index})
- {
- $0
- }
+ touch_start(${1:integer index})
+ {
+ $0
+ }
snippet transaction_result
- transaction_result(${1:key id}, ${2:integer success}, ${3:string data})
- {
- $0
- }
+ transaction_result(${1:key id}, ${2:integer success}, ${3:string data})
+ {
+ $0
+ }
snippet while
- while (${1:condition})
- {
- $0
- }
+ while (${1:condition})
+ {
+ $0
+ }
diff --git a/lib/ace/tokenizer.js b/lib/ace/tokenizer.js
index 6711152e..72989766 100644
--- a/lib/ace/tokenizer.js
+++ b/lib/ace/tokenizer.js
@@ -114,7 +114,6 @@ var Tokenizer = function(rules) {
// makes property access faster
if (!rule.onMatch)
rule.onMatch = null;
- rule.__proto__ = null;
}
splitterRurles.forEach(function(rule) {
diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js
index f1757d92..6f6ab177 100644
--- a/lib/ace/virtual_renderer.js
+++ b/lib/ace/virtual_renderer.js
@@ -33,7 +33,6 @@ define(function(require, exports, module) {
var oop = require("./lib/oop");
var dom = require("./lib/dom");
-var useragent = require("./lib/useragent");
var config = require("./config");
var GutterLayer = require("./layer/gutter").Gutter;
var MarkerLayer = require("./layer/marker").Marker;
@@ -42,6 +41,7 @@ var CursorLayer = require("./layer/cursor").Cursor;
var HScrollBar = require("./scrollbar").HScrollBar;
var VScrollBar = require("./scrollbar").VScrollBar;
var RenderLoop = require("./renderloop").RenderLoop;
+var FontMetrics = require("./layer/font_metrics").FontMetrics;
var EventEmitter = require("./lib/event_emitter").EventEmitter;
var editorCss = require("./requirejs/text!./css/editor.css");
@@ -125,10 +125,12 @@ var VirtualRenderer = function(container, theme) {
column : 0
};
- this.$textLayer.addEventListener("changeCharacterSize", function() {
+ this.$fontMetrics = new FontMetrics(this.container, 500);
+ this.$textLayer.$setFontMetrics(this.$fontMetrics);
+ this.$textLayer.addEventListener("changeCharacterSize", function(e) {
_self.updateCharacterSize();
_self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height);
- _self._signal("changeCharacterSize");
+ _self._signal("changeCharacterSize", e);
});
this.$size = {
@@ -150,7 +152,8 @@ var VirtualRenderer = function(container, theme) {
minHeight : 1,
maxHeight : 1,
offset : 0,
- height : 1
+ height : 1,
+ gutterOffset: 1
};
this.scrollMargin = {
@@ -224,8 +227,13 @@ var VirtualRenderer = function(container, theme) {
* Associates the renderer with an [[EditSession `EditSession`]].
**/
this.setSession = function(session) {
+ if (this.session)
+ this.session.doc.off("changeNewLineMode", this.onChangeNewLineMode);
+
this.session = session;
-
+ if (!session)
+ return;
+
if (this.scrollMargin.top && session.getScrollTop() <= 0)
session.setScrollTop(-this.scrollMargin.top);
@@ -235,6 +243,11 @@ var VirtualRenderer = function(container, theme) {
this.$gutterLayer.setSession(session);
this.$textLayer.setSession(session);
this.$loop.schedule(this.CHANGE_FULL);
+ this.session.$setFontMetrics(this.$fontMetrics);
+
+ this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this);
+ this.onChangeNewLineMode()
+ this.session.doc.on("changeNewLineMode", this.onChangeNewLineMode);
};
/**
@@ -268,6 +281,11 @@ var VirtualRenderer = function(container, theme) {
this.$loop.schedule(this.CHANGE_LINES);
};
+ this.onChangeNewLineMode = function() {
+ this.$loop.schedule(this.CHANGE_TEXT);
+ this.$textLayer.$updateEolChar();
+ };
+
this.onChangeTabSize = function() {
this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER);
this.$textLayer.onChangeTabSize();
@@ -702,7 +720,7 @@ var VirtualRenderer = function(container, theme) {
sm.v = sm.top + sm.bottom;
sm.h = sm.left + sm.right;
if (sm.top && this.scrollTop <= 0 && this.session)
- this.session.setScrollTop(sm.top);
+ this.session.setScrollTop(-sm.top);
this.updateFull();
};
@@ -984,7 +1002,7 @@ var VirtualRenderer = function(container, theme) {
minHeight : minHeight,
maxHeight : maxHeight,
offset : offset,
- gutterOffset : Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight),
+ gutterOffset : Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)),
height : this.$size.scrollerHeight
};
@@ -1605,6 +1623,7 @@ config.defineOptions(VirtualRenderer.prototype, "renderer", {
showGutter: {
set: function(show){
this.$gutter.style.display = show ? "block" : "none";
+ this.$loop.schedule(this.CHANGE_FULL);
this.onGutterResize();
},
initialValue: true
diff --git a/lib/ace/worker/worker.js b/lib/ace/worker/worker.js
index 2646ed17..e642a6ae 100644
--- a/lib/ace/worker/worker.js
+++ b/lib/ace/worker/worker.js
@@ -42,7 +42,7 @@ window.normalizeModule = function(parentId, moduleName) {
window.require = function(parentId, id) {
if (!id) {
- id = parentId
+ id = parentId;
parentId = null;
}
if (!id.charAt)
@@ -81,14 +81,14 @@ window.define = function(id, deps, factory) {
}
} else if (arguments.length == 1) {
factory = id;
- deps = []
+ deps = [];
id = window.require.id;
}
if (!deps.length)
// If there is no dependencies, we inject 'require', 'exports' and
// 'module' as dependencies, to provide CommonJS compatibility.
- deps = ['require', 'exports', 'module']
+ deps = ['require', 'exports', 'module'];
if (id.indexOf("text!") === 0)
return;
@@ -105,12 +105,12 @@ window.define = function(id, deps, factory) {
switch(dep) {
// Because 'require', 'exports' and 'module' aren't actual
// dependencies, we must handle them seperately.
- case 'require': return req
- case 'exports': return module.exports
- case 'module': return module
+ case 'require': return req;
+ case 'exports': return module.exports;
+ case 'module': return module;
// But for all other dependencies, we can just go ahead and
// require them.
- default: return req(dep)
+ default: return req(dep);
}
}));
if (returnExports)
@@ -119,11 +119,11 @@ window.define = function(id, deps, factory) {
}
};
};
-window.define.amd = {}
+window.define.amd = {};
window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
require.tlns = topLevelNamespaces;
-}
+};
window.initSender = function initSender() {
@@ -155,10 +155,10 @@ window.initSender = function initSender() {
}).call(Sender.prototype);
return new Sender();
-}
+};
-window.main = null;
-window.sender = null;
+var main = window.main = null;
+var sender = window.sender = null;
window.onmessage = function(e) {
var msg = e.data;
@@ -171,9 +171,9 @@ window.onmessage = function(e) {
else if (msg.init) {
initBaseUrls(msg.tlns);
require("ace/lib/es5-shim");
- sender = initSender();
+ sender = window.sender = initSender();
var clazz = require(msg.module)[msg.classname];
- main = new clazz(sender);
+ main = window.main = new clazz(sender);
}
else if (msg.event && sender) {
sender._signal(msg.event, msg.data);
diff --git a/lib/ace/worker/worker_client.js b/lib/ace/worker/worker_client.js
index f5902f90..7ae380dc 100644
--- a/lib/ace/worker/worker_client.js
+++ b/lib/ace/worker/worker_client.js
@@ -32,6 +32,7 @@ define(function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
+var net = require("../lib/net");
var EventEmitter = require("../lib/event_emitter").EventEmitter;
var config = require("../config");
@@ -183,16 +184,17 @@ var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl) {
};
this.$workerBlob = function(workerUrl) {
- var script = 'importScripts("' + workerUrl + '");';
+ // workerUrl can be protocol relative
+ // importScripts only takes fully qualified urls
+ var script = "importScripts('" + net.qualifyURL( workerUrl ) + "');";
try {
- var blob = new Blob([script], {'type': 'application/javascript'});
+ return new Blob([script], {"type": "application/javascript"});
} catch (e) { // Backwards-compatibility
var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;
var blobBuilder = new BlobBuilder();
blobBuilder.append(script);
- blob = blobBuilder.getBlob('application/javascript');
+ return blobBuilder.getBlob("application/javascript");
}
- return blob;
};
}).call(WorkerClient.prototype);
@@ -206,6 +208,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) {
this.messageBuffer = [];
var main = null;
+ var emitSync = false;
var sender = Object.create(EventEmitter);
var _self = this;
@@ -213,8 +216,14 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) {
this.$worker.terminate = function() {};
this.$worker.postMessage = function(e) {
_self.messageBuffer.push(e);
- main && setTimeout(processNext);
+ if (main) {
+ if (emitSync)
+ setTimeout(processNext);
+ else
+ processNext();
+ }
};
+ this.setEmitSync = function(val) { emitSync = val };
var processNext = function() {
var msg = _self.messageBuffer.shift();