From c5f58503fea090230a113ad069d29dd358aaa2a0 Mon Sep 17 00:00:00 2001
From: Patrick Nevels
Date: Sat, 25 Jan 2014 19:19:57 -0600
Subject: [PATCH 01/83] added Gherkin highlighting support
---
demo/kitchen-sink/docs/gherkin.feature | 10 +++
lib/ace/ext/modelist.js | 1 +
lib/ace/mode/gherkin.js | 58 +++++++++++++++++
lib/ace/mode/gherkin_highlight_rules.js | 83 +++++++++++++++++++++++++
4 files changed, 152 insertions(+)
create mode 100644 demo/kitchen-sink/docs/gherkin.feature
create mode 100644 lib/ace/mode/gherkin.js
create mode 100644 lib/ace/mode/gherkin_highlight_rules.js
diff --git a/demo/kitchen-sink/docs/gherkin.feature b/demo/kitchen-sink/docs/gherkin.feature
new file mode 100644
index 00000000..ab31cdf1
--- /dev/null
+++ b/demo/kitchen-sink/docs/gherkin.feature
@@ -0,0 +1,10 @@
+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: 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
\ No newline at end of file
diff --git a/lib/ace/ext/modelist.js b/lib/ace/ext/modelist.js
index e3b8862a..67c80ef0 100644
--- a/lib/ace/ext/modelist.js
+++ b/lib/ace/ext/modelist.js
@@ -67,6 +67,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/mode/gherkin.js b/lib/ace/mode/gherkin.js
new file mode 100644
index 00000000..8b9b58a5
--- /dev/null
+++ b/lib/ace/mode/gherkin.js
@@ -0,0 +1,58 @@
+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.$tokenizer = new Tokenizer(new GherkinHighlightRules().getRules());
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.$id = "ace/mode/gherkin";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ console.log(state)
+
+ if(line.match("[ ]*\\|")) {
+ console.log(line.match("\|"));
+ indent += "| ";
+ }
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+
+ if (state == "start") {
+ if (line.match("Scenario:|Feature:")) {
+ indent = tab;
+ } else if(line.match("Given.+(:)$|Examples:")) {
+ indent += tab;
+ } else if(line.match("\\*.+")) {
+ indent += "* ";
+ }
+ }
+
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if(line.match("Feature:")) {
+
+ }
+ }
+ // Extra logic goes here. (see below)
+}).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..a902703d
--- /dev/null
+++ b/lib/ace/mode/gherkin_highlight_rules.js
@@ -0,0 +1,83 @@
+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|\\*|Scenario\ Outline",
+ }, {
+ 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
From 2428de10edb19ca8dfbe2ad8eed935773923c5a1 Mon Sep 17 00:00:00 2001
From: Patrick Nevels
Date: Sat, 25 Jan 2014 19:32:40 -0600
Subject: [PATCH 02/83] add Gherkin highlighting
---
lib/ace/mode/gherkin.js | 19 ++++++-------------
lib/ace/mode/gherkin_highlight_rules.js | 2 +-
2 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/lib/ace/mode/gherkin.js b/lib/ace/mode/gherkin.js
index 8b9b58a5..4a29f971 100644
--- a/lib/ace/mode/gherkin.js
+++ b/lib/ace/mode/gherkin.js
@@ -16,14 +16,14 @@ oop.inherits(Mode, TextMode);
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("[ ]*\\|")) {
- console.log(line.match("\|"));
+ if(line.match("[ ]*\\|")) {
indent += "| ";
}
@@ -33,10 +33,10 @@ oop.inherits(Mode, TextMode);
if (state == "start") {
- if (line.match("Scenario:|Feature:")) {
- indent = tab;
- } else if(line.match("Given.+(:)$|Examples:")) {
- indent += tab;
+ if (line.match("Scenario:|Feature:|Scenario\ Outline:")) {
+ indent += space2;
+ } else if(line.match("(Given|Then).+(:)$|Examples:")) {
+ indent += space2;
} else if(line.match("\\*.+")) {
indent += "* ";
}
@@ -45,13 +45,6 @@ oop.inherits(Mode, TextMode);
return indent;
};
-
- this.checkOutdent = function(state, line, input) {
- if(line.match("Feature:")) {
-
- }
- }
- // Extra logic goes here. (see below)
}).call(Mode.prototype);
exports.Mode = Mode;
diff --git a/lib/ace/mode/gherkin_highlight_rules.js b/lib/ace/mode/gherkin_highlight_rules.js
index a902703d..13416d5b 100644
--- a/lib/ace/mode/gherkin_highlight_rules.js
+++ b/lib/ace/mode/gherkin_highlight_rules.js
@@ -16,7 +16,7 @@ var GherkinHighlightRules = function() {
regex : "#.*$"
}, {
token : "keyword",
- regex : "Feature:|Background:|Scenario:|Scenario Outline:|Examples:|Given|When|Then|And|But|\\*|Scenario\ Outline",
+ regex : "Feature:|Background:|Scenario:|Scenario\ Outline:|Examples:|Given|When|Then|And|But|\\*",
}, {
token : "string", // multi line """ string start
regex : '"{3}',
From d44c8080bf4d82541f1cd46c319fcc288f9b5e47 Mon Sep 17 00:00:00 2001
From: Patrick Nevels
Date: Sat, 25 Jan 2014 20:03:49 -0600
Subject: [PATCH 03/83] make demo more expressive
---
demo/kitchen-sink/docs/gherkin.feature | 27 +++++++++++++++++++++-----
lib/ace/mode/gherkin.js | 2 +-
2 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/demo/kitchen-sink/docs/gherkin.feature b/demo/kitchen-sink/docs/gherkin.feature
index ab31cdf1..6f8d0df4 100644
--- a/demo/kitchen-sink/docs/gherkin.feature
+++ b/demo/kitchen-sink/docs/gherkin.feature
@@ -1,10 +1,27 @@
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
+ 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$
+ And I have deposited 1$
When I press the coffee button
- Then I should be served a coffee
\ No newline at end of file
+ Then I should be served a "coffee"
+
+ # this a comment
+
+ """
+ this is a
+ pystring
+ """
\ No newline at end of file
diff --git a/lib/ace/mode/gherkin.js b/lib/ace/mode/gherkin.js
index 4a29f971..94dba209 100644
--- a/lib/ace/mode/gherkin.js
+++ b/lib/ace/mode/gherkin.js
@@ -33,7 +33,7 @@ oop.inherits(Mode, TextMode);
if (state == "start") {
- if (line.match("Scenario:|Feature:|Scenario\ Outline:")) {
+ if (line.match("Scenario:|Feature:|Scenario\ Outline:|Background:")) {
indent += space2;
} else if(line.match("(Given|Then).+(:)$|Examples:")) {
indent += space2;
From 68f46ff7efa8088095a66d81214a056b43a87320 Mon Sep 17 00:00:00 2001
From: Patrick Nevels
Date: Sat, 25 Jan 2014 20:06:40 -0600
Subject: [PATCH 04/83] add tags to the demo
---
demo/kitchen-sink/docs/gherkin.feature | 1 +
1 file changed, 1 insertion(+)
diff --git a/demo/kitchen-sink/docs/gherkin.feature b/demo/kitchen-sink/docs/gherkin.feature
index 6f8d0df4..52cd811e 100644
--- a/demo/kitchen-sink/docs/gherkin.feature
+++ b/demo/kitchen-sink/docs/gherkin.feature
@@ -1,3 +1,4 @@
+@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
From 2bf673c41de533f4a0a616c23c1a3289b4218df5 Mon Sep 17 00:00:00 2001
From: Aaron O'Mullan
Date: Mon, 27 Jan 2014 18:21:42 +0100
Subject: [PATCH 05/83] Add auto magic complete (complete while typing)
---
lib/ace/ext/language_tools.js | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js
index e0ed0ec7..e7cb1fba 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,30 @@ var loadSnippetFile = function(id) {
});
};
+var onChangeAutocomplete = function(e, editor) {
+ var session = editor.getSession();
+ var pos = editor.getCursorPosition();
+ var line = session.getLine(pos.row);
+
+ // Append added text to the line
+ if(e.data.action === 'insertText') {
+ line += e.data.text;
+ pos.column += e.data.text.length;
+ }
+
+ // 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 !== '') {
+ Autocomplete.startCommand.exec(editor);
+ } else if(editor.completer && editor.completer.activated) {
+ // When the prefix is empty
+ // close the autocomplete dialog
+ editor.completer.detach();
+ }
+};
+
var Editor = require("../editor").Editor;
require("../config").defineOptions(Editor.prototype, "editor", {
enableBasicAutocompletion: {
@@ -121,7 +146,11 @@ require("../config").defineOptions(Editor.prototype, "editor", {
if (val) {
this.completers = completers;
this.commands.addCommand(Autocomplete.startCommand);
+
+ // On each change automatically trigger the autocomplete
+ this.on('change', onChangeAutocomplete);
} else {
+ this.removeListener('change', onChangeAutocomplete);
this.commands.removeCommand(Autocomplete.startCommand);
}
},
From 07c99e05414698373349116780fd15e2cd955d93 Mon Sep 17 00:00:00 2001
From: Aaron O'Mullan
Date: Tue, 28 Jan 2014 00:52:55 +0100
Subject: [PATCH 06/83] Fix: skip auto magic completion when pasting
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This can some times cause confusing behavior.
A paste is any text insertion of more than one character at a time …
---
lib/ace/ext/language_tools.js | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js
index e7cb1fba..0e12e4df 100644
--- a/lib/ace/ext/language_tools.js
+++ b/lib/ace/ext/language_tools.js
@@ -120,6 +120,20 @@ var onChangeAutocomplete = function(e, editor) {
var pos = editor.getCursorPosition();
var line = session.getLine(pos.row);
+ // Detect paste (poor man's paste detection)
+ var pasting = (
+ (
+ e.data.action === 'insertText' &&
+ e.data.text.length > 1
+ ) ||
+ e.data.action === 'insertLines'
+ );
+
+ // we don't want to autocomplete on paste events
+ if(pasting) {
+ return;
+ }
+
// Append added text to the line
if(e.data.action === 'insertText') {
line += e.data.text;
From afd9c99da25f224006b19e67f19dacf47ddd1ae0 Mon Sep 17 00:00:00 2001
From: Aaron O'Mullan
Date: Tue, 28 Jan 2014 01:24:08 +0100
Subject: [PATCH 07/83] Don't attach/detach autocomplete on change if already
attached/detached
---
lib/ace/ext/language_tools.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js
index 0e12e4df..d0d31a01 100644
--- a/lib/ace/ext/language_tools.js
+++ b/lib/ace/ext/language_tools.js
@@ -143,10 +143,12 @@ var onChangeAutocomplete = function(e, editor) {
// The prefix to autocomplete for
var prefix = util.retrievePrecedingIdentifier(line, pos.column);
+ var hasCompleter = (editor.completer && editor.completer.activated);
+
// Only autocomplete if there's a prefix that can be matched
- if(prefix !== '') {
+ if(prefix !== '' && !(hasCompleter)) {
Autocomplete.startCommand.exec(editor);
- } else if(editor.completer && editor.completer.activated) {
+ } else if(prefix === '' && hasCompleter) {
// When the prefix is empty
// close the autocomplete dialog
editor.completer.detach();
From af1aab40f52aa536b5aa6785a571b40320c8bb91 Mon Sep 17 00:00:00 2001
From: Aaron O'Mullan
Date: Tue, 28 Jan 2014 01:43:12 +0100
Subject: [PATCH 08/83] Enable auto magic complete only when typing
We only want to auto magically complete when the user is typing text,
not when text is pasted or being removed.
---
lib/ace/ext/language_tools.js | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js
index d0d31a01..b739eabe 100644
--- a/lib/ace/ext/language_tools.js
+++ b/lib/ace/ext/language_tools.js
@@ -121,24 +121,22 @@ var onChangeAutocomplete = function(e, editor) {
var line = session.getLine(pos.row);
// Detect paste (poor man's paste detection)
- var pasting = (
+ var typing = !(
(
e.data.action === 'insertText' &&
e.data.text.length > 1
) ||
- e.data.action === 'insertLines'
+ e.data.action !== 'insertText'
);
// we don't want to autocomplete on paste events
- if(pasting) {
+ if(!typing) {
return;
}
// Append added text to the line
- if(e.data.action === 'insertText') {
- line += e.data.text;
- pos.column += e.data.text.length;
- }
+ line += e.data.text;
+ pos.column += e.data.text.length;
// The prefix to autocomplete for
var prefix = util.retrievePrecedingIdentifier(line, pos.column);
From c4012ebd461b5809f50273eaa7da7e59776438e1 Mon Sep 17 00:00:00 2001
From: Aaron O'Mullan
Date: Tue, 28 Jan 2014 02:14:23 +0100
Subject: [PATCH 09/83] Don't autoInsert with auto magic completer
This caused completions to be inserted without ever being shown, if
they were the only completion for the prefix entered.
---
lib/ace/ext/language_tools.js | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js
index b739eabe..b505fcfa 100644
--- a/lib/ace/ext/language_tools.js
+++ b/lib/ace/ext/language_tools.js
@@ -145,7 +145,18 @@ var onChangeAutocomplete = function(e, editor) {
// Only autocomplete if there's a prefix that can be matched
if(prefix !== '' && !(hasCompleter)) {
- Autocomplete.startCommand.exec(editor);
+ 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
From 98dc63cce4606b517bd64edb623b3f2a11659cec Mon Sep 17 00:00:00 2001
From: Aaron O'Mullan
Date: Tue, 28 Jan 2014 11:37:43 +0100
Subject: [PATCH 10/83] Close auto magic complete when prefix is empty
While removing text
---
lib/ace/ext/language_tools.js | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js
index b505fcfa..67e35dc7 100644
--- a/lib/ace/ext/language_tools.js
+++ b/lib/ace/ext/language_tools.js
@@ -119,6 +119,7 @@ var onChangeAutocomplete = function(e, editor) {
var session = editor.getSession();
var pos = editor.getCursorPosition();
var line = session.getLine(pos.row);
+ var hasCompleter = (editor.completer && editor.completer.activated);
// Detect paste (poor man's paste detection)
var typing = !(
@@ -129,6 +130,15 @@ var onChangeAutocomplete = function(e, editor) {
e.data.action !== 'insertText'
);
+ // We don't want to autocomplete with no prefix
+ if(
+ e.data.action === 'removeText' &&
+ util.retrievePrecedingIdentifier(line, pos.column) === ''
+ ) {
+ if(hasCompleter) editor.completer.detach();
+ return;
+ }
+
// we don't want to autocomplete on paste events
if(!typing) {
return;
@@ -141,8 +151,6 @@ var onChangeAutocomplete = function(e, editor) {
// The prefix to autocomplete for
var prefix = util.retrievePrecedingIdentifier(line, pos.column);
- var hasCompleter = (editor.completer && editor.completer.activated);
-
// Only autocomplete if there's a prefix that can be matched
if(prefix !== '' && !(hasCompleter)) {
if (!editor.completer) {
From f9fcf49c66642fc52087a07db1a87612c62c4ab0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Samy=20Pess=C3=A9?=
Date: Tue, 28 Jan 2014 15:47:12 +0100
Subject: [PATCH 11/83] Apply editor theme to autocomplete popup
---
lib/ace/autocomplete.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/ace/autocomplete.js b/lib/ace/autocomplete.js
index 50154c01..d4491f6f 100644
--- a/lib/ace/autocomplete.js
+++ b/lib/ace/autocomplete.js
@@ -71,6 +71,7 @@ var Autocomplete = function() {
var renderer = editor.renderer;
if (!keepPopupPosition) {
this.popup.setRow(0);
+ this.popup.setTheme(editor.getTheme());
this.popup.setFontSize(editor.getFontSize());
var lineHeight = renderer.layerConfig.lineHeight;
From df99195544b897dfd49786259bc444ada615e081 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Samy=20Pess=C3=A9?=
Date: Tue, 28 Jan 2014 15:49:53 +0100
Subject: [PATCH 12/83] Set default theme for autocomplete popup
---
lib/ace/autocomplete/popup.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/ace/autocomplete/popup.js b/lib/ace/autocomplete/popup.js
index ca40cad1..cc4618b6 100644
--- a/lib/ace/autocomplete/popup.js
+++ b/lib/ace/autocomplete/popup.js
@@ -291,16 +291,16 @@ 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;\
}\
@@ -312,11 +312,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;\
From 7d3fdc00b074eaf08aba677c6a5e84cb89a629a4 Mon Sep 17 00:00:00 2001
From: Patrick Nevels
Date: Tue, 28 Jan 2014 21:27:26 -0600
Subject: [PATCH 13/83] replaced tokenizer with highlightrules
---
lib/ace/mode/gherkin.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ace/mode/gherkin.js b/lib/ace/mode/gherkin.js
index 94dba209..78ee8a08 100644
--- a/lib/ace/mode/gherkin.js
+++ b/lib/ace/mode/gherkin.js
@@ -6,7 +6,7 @@ var Tokenizer = require("../tokenizer").Tokenizer;
var GherkinHighlightRules = require("./gherkin_highlight_rules").GherkinHighlightRules;
var Mode = function() {
- this.$tokenizer = new Tokenizer(new GherkinHighlightRules().getRules());
+ this.HighlightRules = GherkinHighlightRules;
};
oop.inherits(Mode, TextMode);
From 5223d19e3f0ebc6afa07dc7994db5e6c4b8c076e Mon Sep 17 00:00:00 2001
From: Patrick Nevels
Date: Tue, 28 Jan 2014 21:45:28 -0600
Subject: [PATCH 14/83] added license to files
---
lib/ace/mode/gherkin.js | 30 +++++++++++++++++++++++++
lib/ace/mode/gherkin_highlight_rules.js | 30 +++++++++++++++++++++++++
2 files changed, 60 insertions(+)
diff --git a/lib/ace/mode/gherkin.js b/lib/ace/mode/gherkin.js
index 78ee8a08..557ce9fc 100644
--- a/lib/ace/mode/gherkin.js
+++ b/lib/ace/mode/gherkin.js
@@ -1,3 +1,33 @@
+/* ***** 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");
diff --git a/lib/ace/mode/gherkin_highlight_rules.js b/lib/ace/mode/gherkin_highlight_rules.js
index 13416d5b..d54db204 100644
--- a/lib/ace/mode/gherkin_highlight_rules.js
+++ b/lib/ace/mode/gherkin_highlight_rules.js
@@ -1,3 +1,33 @@
+/* ***** 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");
From 110eb26f96fa865ccd5cfbd9bbf92086572c29df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Samy=20Pess=C3=A9?=
Date: Fri, 31 Jan 2014 15:18:45 +0100
Subject: [PATCH 15/83] Use event afterExec instead of change for live
autocomplete
---
lib/ace/ext/language_tools.js | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js
index 67e35dc7..deb1973d 100644
--- a/lib/ace/ext/language_tools.js
+++ b/lib/ace/ext/language_tools.js
@@ -115,24 +115,27 @@ var loadSnippetFile = function(id) {
});
};
-var onChangeAutocomplete = function(e, editor) {
+var onChangeAutocomplete = 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 || "";
+
// Detect paste (poor man's paste detection)
var typing = !(
(
- e.data.action === 'insertText' &&
- e.data.text.length > 1
+ e.command.name === "insertstring" &&
+ text.length > 1
) ||
- e.data.action !== 'insertText'
+ e.command.name !== "insertstring"
);
// We don't want to autocomplete with no prefix
if(
- e.data.action === 'removeText' &&
+ e.command.name === 'backspace' &&
util.retrievePrecedingIdentifier(line, pos.column) === ''
) {
if(hasCompleter) editor.completer.detach();
@@ -145,8 +148,8 @@ var onChangeAutocomplete = function(e, editor) {
}
// Append added text to the line
- line += e.data.text;
- pos.column += e.data.text.length;
+ line += text;
+ pos.column += text.length;
// The prefix to autocomplete for
var prefix = util.retrievePrecedingIdentifier(line, pos.column);
@@ -181,7 +184,7 @@ require("../config").defineOptions(Editor.prototype, "editor", {
this.commands.addCommand(Autocomplete.startCommand);
// On each change automatically trigger the autocomplete
- this.on('change', onChangeAutocomplete);
+ this.commands.on('afterExec', onChangeAutocomplete);
} else {
this.removeListener('change', onChangeAutocomplete);
this.commands.removeCommand(Autocomplete.startCommand);
From 09b9348852de8d0fe010639a1a4834657b740465 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Samy=20Pess=C3=A9?=
Date: Fri, 31 Jan 2014 22:19:32 +0100
Subject: [PATCH 16/83] Improve autocomplete support for async completers
---
lib/ace/autocomplete.js | 41 ++++++++++++++++++++++++++++++-----------
1 file changed, 30 insertions(+), 11 deletions(-)
diff --git a/lib/ace/autocomplete.js b/lib/ace/autocomplete.js
index d4491f6f..de30a740 100644
--- a/lib/ace/autocomplete.js
+++ b/lib/ace/autocomplete.js
@@ -60,6 +60,7 @@ var Autocomplete = function() {
this.insertMatch();
e.stop();
}.bind(this));
+ this.gatherCompletionsId = 0;
};
this.openPopup = function(editor, prefix, keepPopupPosition) {
@@ -146,6 +147,8 @@ var Autocomplete = function() {
data = this.popup.getData(this.popup.getRow());
if (!data)
return false;
+ this.gatherCompletionsId = this.gatherCompletionsId + 1;
+
if (data.completer && data.completer.insertMatch) {
data.completer.insertMatch(this.editor);
} else {
@@ -191,16 +194,14 @@ var Autocomplete = function() {
this.base.column -= prefix.length;
var matches = [];
- util.parForEach(editor.completers, function(completer, next) {
+ editor.completers.forEach(function(completer) {
completer.getCompletions(editor, session, pos, prefix, function(err, results) {
if (!err)
matches = matches.concat(results);
- next();
- });
- }, function() {
- callback(null, {
- prefix: prefix,
- matches: matches
+ callback(null, {
+ prefix: prefix,
+ matches: matches
+ });
});
});
return true;
@@ -229,6 +230,7 @@ var Autocomplete = function() {
};
this.updateCompletions = function(keepPopupPosition) {
+ var that = this;
if (keepPopupPosition && this.base && this.completions) {
var pos = this.editor.getCursorPosition();
var prefix = this.editor.session.getTextRange({start: this.base, end: pos});
@@ -240,22 +242,39 @@ var Autocomplete = function() {
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) {
+ // Calcul prefix
+ var session = that.editor.getSession();
+ var pos = that.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
// if (matches.length == 1)
// return this.insertMatch(matches[0]);
+ // No prefix or no results -> close
+ if (!prefix || !prefix.length || !matches || !matches.length)
+ return this.detach();
+
+ // Wrong prefx 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;
if (!filtered.length)
return this.detach();
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));
};
From c36fac3a941a68a99e54f6d04877815d4ab9864d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Samy=20Pess=C3=A9?=
Date: Sun, 2 Feb 2014 20:52:57 +0100
Subject: [PATCH 17/83] Improve autocomplete results display and filtering
Autocomplete: Display unique results when it's a snippet
Fix autocomplete popup display
Remove listener for afterExec when enableBasicAutocompletion change
Fix autocomplete detach when no results are ready from the first completer
Remove condition from detach
---
lib/ace/autocomplete.js | 38 ++++++++++++++++++++++++++++-------
lib/ace/ext/language_tools.js | 6 +-----
2 files changed, 32 insertions(+), 12 deletions(-)
diff --git a/lib/ace/autocomplete.js b/lib/ace/autocomplete.js
index de30a740..34462894 100644
--- a/lib/ace/autocomplete.js
+++ b/lib/ace/autocomplete.js
@@ -54,13 +54,14 @@ var Autocomplete = function() {
};
(function() {
+ this.gatherCompletionsId = 0;
+
this.$init = function() {
this.popup = new AcePopup(document.body || document.documentElement);
this.popup.on("click", function(e) {
this.insertMatch();
e.stop();
}.bind(this));
- this.gatherCompletionsId = 0;
};
this.openPopup = function(editor, prefix, keepPopupPosition) {
@@ -96,6 +97,10 @@ 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();
@@ -147,7 +152,6 @@ var Autocomplete = function() {
data = this.popup.getData(this.popup.getRow());
if (!data)
return false;
- this.gatherCompletionsId = this.gatherCompletionsId + 1;
if (data.completer && data.completer.insertMatch) {
data.completer.insertMatch(this.editor);
@@ -194,13 +198,15 @@ var Autocomplete = function() {
this.base.column -= prefix.length;
var matches = [];
- editor.completers.forEach(function(completer) {
+ 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);
callback(null, {
prefix: prefix,
- matches: matches
+ matches: matches,
+ left: total - (i + 1)
});
});
});
@@ -239,6 +245,10 @@ 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;
}
@@ -246,6 +256,11 @@ var Autocomplete = function() {
// Save current gatherCompletions session, session is close when a match is insert
var _id = this.gatherCompletionsId;
this.gatherCompletions(this.editor, function(err, results) {
+ var doDetach = function() {
+ if (results.left > 0) return;
+ return this.detach();
+ }.bind(this);
+
// Calcul prefix
var session = that.editor.getSession();
var pos = that.editor.getCursorPosition();
@@ -260,9 +275,9 @@ var Autocomplete = function() {
// No prefix or no results -> close
if (!prefix || !prefix.length || !matches || !matches.length)
- return this.detach();
+ return doDetach();
- // Wrong prefx or wrong session -> ignore
+ // Wrong prefix or wrong session -> ignore
if (prefix.indexOf(results.prefix) != 0
|| _id != this.gatherCompletionsId)
return;
@@ -270,10 +285,19 @@ var Autocomplete = function() {
this.completions = new FilteredList(matches);
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, prefix, keepPopupPosition);
}.bind(this));
};
diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js
index deb1973d..fa913e5b 100644
--- a/lib/ace/ext/language_tools.js
+++ b/lib/ace/ext/language_tools.js
@@ -147,10 +147,6 @@ var onChangeAutocomplete = function(e) {
return;
}
- // Append added text to the line
- line += text;
- pos.column += text.length;
-
// The prefix to autocomplete for
var prefix = util.retrievePrecedingIdentifier(line, pos.column);
@@ -186,7 +182,7 @@ require("../config").defineOptions(Editor.prototype, "editor", {
// On each change automatically trigger the autocomplete
this.commands.on('afterExec', onChangeAutocomplete);
} else {
- this.removeListener('change', onChangeAutocomplete);
+ this.removeListener('afterExec', onChangeAutocomplete);
this.commands.removeCommand(Autocomplete.startCommand);
}
},
From e76a389e88d5d0837cb39e19164a04c11672c9f3 Mon Sep 17 00:00:00 2001
From: Aaron O'Mullan
Date: Wed, 5 Feb 2014 20:10:20 +0100
Subject: [PATCH 18/83] Clarify typing condition in live autocomplete
---
lib/ace/ext/language_tools.js | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js
index fa913e5b..9bb5da6a 100644
--- a/lib/ace/ext/language_tools.js
+++ b/lib/ace/ext/language_tools.js
@@ -124,14 +124,10 @@ var onChangeAutocomplete = function(e) {
var text = e.args || "";
- // Detect paste (poor man's paste detection)
- var typing = !(
- (
- e.command.name === "insertstring" &&
- text.length > 1
- ) ||
- e.command.name !== "insertstring"
- );
+ // 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(
From 0e256ce80d9faf66a764c52d527d38d0c9b94636 Mon Sep 17 00:00:00 2001
From: Aaron O'Mullan
Date: Wed, 5 Feb 2014 20:26:40 +0100
Subject: [PATCH 19/83] Remove autocomplete shadow from ambiance theme
This fixes a regression caused by the newly introduced feature allowing
autocomplete theming
---
lib/ace/theme/ambiance.css | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/ace/theme/ambiance.css b/lib/ace/theme/ambiance.css
index c2ac69cf..f45e1d0e 100644
--- a/lib/ace/theme/ambiance.css
+++ b/lib/ace/theme/ambiance.css
@@ -26,7 +26,8 @@
.ace-ambiance .ace_fold-widget.ace_start,
.ace-ambiance .ace_fold-widget.ace_end,
-.ace-ambiance .ace_fold-widget.ace_closed{
+.ace-ambiance .ace_fold-widget.ace_closed,
+.ace-ambiance.ace_autocomplete .ace_scroller {
background: none;
border: none;
box-shadow: none;
@@ -74,7 +75,7 @@
.ace-ambiance.normal-mode .ace_cursor-layer {
z-index: 0;
}
-
+
.ace-ambiance .ace_marker-layer .ace_selection {
background: rgba(221, 240, 255, 0.20);
}
@@ -134,7 +135,7 @@
}
.ace-ambiance .ace_constant.ace_library {
-
+
}
.ace-ambiance .ace_constant.ace_numeric {
@@ -214,4 +215,4 @@
.ace-ambiance .ace_indent-guide {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC") right repeat-y;
-}
\ No newline at end of file
+}
From c52278a64e712b3492e02d14172624fd7c03a1d6 Mon Sep 17 00:00:00 2001
From: Aaron O'Mullan
Date: Sat, 8 Feb 2014 00:32:16 +0100
Subject: [PATCH 20/83] Cleanup autocomplete.js
Consistently use .bind(this) instead of that = this
---
lib/ace/autocomplete.js | 33 ++++++++++++++++-----------------
1 file changed, 16 insertions(+), 17 deletions(-)
diff --git a/lib/ace/autocomplete.js b/lib/ace/autocomplete.js
index 34462894..c5109ae1 100644
--- a/lib/ace/autocomplete.js
+++ b/lib/ace/autocomplete.js
@@ -47,7 +47,7 @@ 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))
@@ -77,10 +77,10 @@ var Autocomplete = function() {
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;
@@ -101,7 +101,7 @@ var Autocomplete = function() {
if (this.popup && this.popup.isOpen) {
this.gatherCompletionsId = this.gatherCompletionsId + 1;
}
-
+
if (this.popup)
this.popup.hide();
@@ -190,10 +190,10 @@ 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;
@@ -216,7 +216,7 @@ var Autocomplete = function() {
this.showPopup = function(editor) {
if (this.editor)
this.detach();
-
+
this.activated = true;
this.editor = editor;
@@ -231,12 +231,11 @@ var Autocomplete = function() {
editor.on("blur", this.blurListener);
editor.on("mousedown", this.mousedownListener);
editor.on("mousewheel", this.mousewheelListener);
-
+
this.updateCompletions();
};
-
+
this.updateCompletions = function(keepPopupPosition) {
- var that = this;
if (keepPopupPosition && this.base && this.completions) {
var pos = this.editor.getCursorPosition();
var prefix = this.editor.session.getTextRange({start: this.base, end: pos});
@@ -262,14 +261,14 @@ var Autocomplete = function() {
}.bind(this);
// Calcul prefix
- var session = that.editor.getSession();
- var pos = that.editor.getCursorPosition();
+ 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;
- // 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]);
@@ -343,16 +342,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) {
From cbbbf1c539ee84abf499c3601369545fd37b680f Mon Sep 17 00:00:00 2001
From: Aaron O'Mullan
Date: Sat, 8 Feb 2014 00:50:50 +0100
Subject: [PATCH 21/83] Fix bug and clarify async autocomplete result gathering
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@SamyPesse’s “left: total - (i + 1)” was flawed because it only would
work if all completers were async
---
lib/ace/autocomplete.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/ace/autocomplete.js b/lib/ace/autocomplete.js
index c5109ae1..8bf3a401 100644
--- a/lib/ace/autocomplete.js
+++ b/lib/ace/autocomplete.js
@@ -206,7 +206,7 @@ var Autocomplete = function() {
callback(null, {
prefix: prefix,
matches: matches,
- left: total - (i + 1)
+ finished: (--total === 0)
});
});
});
@@ -255,8 +255,9 @@ var Autocomplete = function() {
// 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.left > 0) return;
+ if (!results.finished) return;
return this.detach();
}.bind(this);
From f7be399bd23aa8b35f91aa6dfc1653dbb94b50eb Mon Sep 17 00:00:00 2001
From: Aaron O'Mullan
Date: Sat, 8 Feb 2014 01:01:30 +0100
Subject: [PATCH 22/83] Add "enableLiveAutocomplete" option
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This makes live autocomplete optional and is not tied to
“enableBasicAutocomplete” anymore
This also renames “onChangeAutocomplete” to “doLiveAutocomplete”
---
demo/kitchen-sink/demo.js | 7 ++++---
lib/ace/ext/language_tools.js | 17 ++++++++++++-----
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/demo/kitchen-sink/demo.js b/demo/kitchen-sink/demo.js
index 9880d33e..52f71d20 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,6 +592,7 @@ env.editSnippets = function() {
require("ace/ext/language_tools");
env.editor.setOptions({
enableBasicAutocompletion: true,
+ enableLiveAutocomplete: true,
enableSnippets: true
});
diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js
index 9bb5da6a..80c6973a 100644
--- a/lib/ace/ext/language_tools.js
+++ b/lib/ace/ext/language_tools.js
@@ -115,7 +115,7 @@ var loadSnippetFile = function(id) {
});
};
-var onChangeAutocomplete = function(e) {
+var doLiveAutocomplete = function(e) {
var editor = e.editor;
var session = editor.getSession();
var pos = editor.getCursorPosition();
@@ -174,16 +174,23 @@ require("../config").defineOptions(Editor.prototype, "editor", {
if (val) {
this.completers = completers;
this.commands.addCommand(Autocomplete.startCommand);
-
- // On each change automatically trigger the autocomplete
- this.commands.on('afterExec', onChangeAutocomplete);
} else {
- this.removeListener('afterExec', onChangeAutocomplete);
this.commands.removeCommand(Autocomplete.startCommand);
}
},
value: false
},
+ enableLiveAutocomplete: {
+ set: function(val) {
+ if (val) {
+ // On each change automatically trigger the autocomplete
+ this.commands.on('afterExec', doLiveAutocomplete);
+ } else {
+ this.removeListener('afterExec', doLiveAutocomplete);
+ }
+ },
+ value: false
+ },
enableSnippets: {
set: function(val) {
if (val) {
From e06a14ab92a7ab1aecbf0d23651629e40e005357 Mon Sep 17 00:00:00 2001
From: Aaron O'Mullan
Date: Sat, 8 Feb 2014 01:38:24 +0100
Subject: [PATCH 23/83] Revert "Remove autocomplete shadow from ambiance theme"
This reverts commit 0e256ce80d9faf66a764c52d527d38d0c9b94636.
---
lib/ace/theme/ambiance.css | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/lib/ace/theme/ambiance.css b/lib/ace/theme/ambiance.css
index f45e1d0e..c2ac69cf 100644
--- a/lib/ace/theme/ambiance.css
+++ b/lib/ace/theme/ambiance.css
@@ -26,8 +26,7 @@
.ace-ambiance .ace_fold-widget.ace_start,
.ace-ambiance .ace_fold-widget.ace_end,
-.ace-ambiance .ace_fold-widget.ace_closed,
-.ace-ambiance.ace_autocomplete .ace_scroller {
+.ace-ambiance .ace_fold-widget.ace_closed{
background: none;
border: none;
box-shadow: none;
@@ -75,7 +74,7 @@
.ace-ambiance.normal-mode .ace_cursor-layer {
z-index: 0;
}
-
+
.ace-ambiance .ace_marker-layer .ace_selection {
background: rgba(221, 240, 255, 0.20);
}
@@ -135,7 +134,7 @@
}
.ace-ambiance .ace_constant.ace_library {
-
+
}
.ace-ambiance .ace_constant.ace_numeric {
@@ -215,4 +214,4 @@
.ace-ambiance .ace_indent-guide {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC") right repeat-y;
-}
+}
\ No newline at end of file
From 889e9248f81f10ce9f9ddd50c5a123bcebd24a6c Mon Sep 17 00:00:00 2001
From: Aaron O'Mullan
Date: Sat, 8 Feb 2014 01:47:01 +0100
Subject: [PATCH 24/83] Cancel out unwanted editor's css for autocomplete
dialog
---
lib/ace/autocomplete/popup.js | 31 ++++++++++++++++++-------------
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/lib/ace/autocomplete/popup.js b/lib/ace/autocomplete/popup.js
index cc4618b6..d27b904f 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(){};
@@ -155,11 +155,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 +203,7 @@ var AcePopup = function(parentNode) {
};
bgTokenizer.$updateOnChange = noop;
bgTokenizer.start = noop;
-
+
popup.session.$computeWidth = function() {
return this.screenWidth = 0;
}
@@ -211,7 +211,7 @@ var AcePopup = function(parentNode) {
// public
popup.isOpen = false;
popup.isTopdown = false;
-
+
popup.data = [];
popup.setData = function(list) {
popup.data = list || [];
@@ -236,7 +236,7 @@ var AcePopup = function(parentNode) {
popup._signal("select");
}
};
-
+
popup.on("changeSelection", function() {
if (popup.isOpen)
popup.setRow(popup.selection.lead.row);
@@ -268,22 +268,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;
@@ -304,6 +304,11 @@ dom.importCssString("\
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;\
From 297c05831e5949e1c4363972e126d2b1cd197ffd Mon Sep 17 00:00:00 2001
From: Aaron O'Mullan
Date: Sat, 8 Feb 2014 02:18:52 +0100
Subject: [PATCH 25/83] Fix minor typo in enableLiveAutocomplete
---
lib/ace/ext/language_tools.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js
index 80c6973a..0f9be6b9 100644
--- a/lib/ace/ext/language_tools.js
+++ b/lib/ace/ext/language_tools.js
@@ -186,7 +186,7 @@ require("../config").defineOptions(Editor.prototype, "editor", {
// On each change automatically trigger the autocomplete
this.commands.on('afterExec', doLiveAutocomplete);
} else {
- this.removeListener('afterExec', doLiveAutocomplete);
+ this.commands.removeListener('afterExec', doLiveAutocomplete);
}
},
value: false
From 7a8a799c264a54c4297f374453f54cd7caaa6ba1 Mon Sep 17 00:00:00 2001
From: Jean-Francois Brazeau
Date: Wed, 12 Feb 2014 15:05:53 +0100
Subject: [PATCH 26/83] Update useragent.js
Patch proposal for https://github.com/ajaxorg/ace/issues/1814 (IE11 compatibility issue)
---
lib/ace/lib/useragent.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ace/lib/useragent.js b/lib/ace/lib/useragent.js
index b6989a8c..e5263e5a 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(/(?:rv:|MSIE )([0-9]+[\.0-9]+)/)[1]);
exports.isOldIE = exports.isIE && exports.isIE < 9;
From 8ba0cd91be84a2bff9335a074bc9babcab8d2e29 Mon Sep 17 00:00:00 2001
From: jbrazeau
Date: Wed, 12 Feb 2014 15:31:43 +0100
Subject: [PATCH 27/83] Fix : for UIE11, regexp must also consider Trident
string
---
lib/ace/lib/useragent.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ace/lib/useragent.js b/lib/ace/lib/useragent.js
index e5263e5a..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(/(?:rv:|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;
From 080596e6a16cc574a4515678fcf01006ffddf2dd Mon Sep 17 00:00:00 2001
From: jiyinyiyong
Date: Sun, 16 Feb 2014 23:49:54 +0800
Subject: [PATCH 28/83] fix dollar; add comma syntax
---
demo/kitchen-sink/docs/cirru.cirru | 8 +++++++-
lib/ace/mode/cirru_highlight_rules.js | 12 ++++++++----
2 files changed, 15 insertions(+), 5 deletions(-)
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/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: /"/,
From 7439993b1aff1cf9b8cbb68815a86993d8a099ec Mon Sep 17 00:00:00 2001
From: Benjamin Wheeler
Date: Mon, 17 Feb 2014 16:33:05 -0500
Subject: [PATCH 29/83] Allowed . in markdown language blocks
Updated markdown highlighter to allow stuff like ```python.run
---
lib/ace/mode/markdown_highlight_rules.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ace/mode/markdown_highlight_rules.js b/lib/ace/mode/markdown_highlight_rules.js
index e5146ae0..6c2a5319 100644
--- a/lib/ace/mode/markdown_highlight_rules.js
+++ b/lib/ace/mode/markdown_highlight_rules.js
@@ -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*[a-zA-Z\.]*(?:{.*?\\})?\\s*$",
next : "githubblock"
}, { // block quote
token : "string.blockquote",
From e672469923623eb97af7b39d886615d0ad116f61 Mon Sep 17 00:00:00 2001
From: Benjamin Wheeler
Date: Mon, 17 Feb 2014 22:36:44 -0500
Subject: [PATCH 30/83] Updated markdown fenced blocks to allow more liberal
language names
---
lib/ace/mode/markdown_highlight_rules.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ace/mode/markdown_highlight_rules.js b/lib/ace/mode/markdown_highlight_rules.js
index 6c2a5319..ad153788 100644
--- a/lib/ace/mode/markdown_highlight_rules.js
+++ b/lib/ace/mode/markdown_highlight_rules.js
@@ -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*$",
next : "githubblock"
}, { // block quote
token : "string.blockquote",
From f53156982410ff65888ac98a083417f5fd4dbcf0 Mon Sep 17 00:00:00 2001
From: Ben Wheeler
Date: Tue, 18 Feb 2014 09:36:54 -0500
Subject: [PATCH 31/83] add missing backslash
escape the backslash in the fenced code block regexp
---
lib/ace/mode/markdown_highlight_rules.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ace/mode/markdown_highlight_rules.js b/lib/ace/mode/markdown_highlight_rules.js
index ad153788..a7e5a105 100644
--- a/lib/ace/mode/markdown_highlight_rules.js
+++ b/lib/ace/mode/markdown_highlight_rules.js
@@ -79,7 +79,7 @@ var MarkdownHighlightRules = function() {
github_embed("css", "csscode-"),
{ // Github style block
token : "support.function",
- regex : "^```\\s*\S*(?:{.*?\\})?\\s*$",
+ regex : "^```\\s*\\S*(?:{.*?\\})?\\s*$",
next : "githubblock"
}, { // block quote
token : "string.blockquote",
From 2b77b9ec8be7ec8a730f8fad00ad7d258a14c173 Mon Sep 17 00:00:00 2001
From: Builders Brewery
Date: Tue, 18 Feb 2014 16:04:54 +0100
Subject: [PATCH 32/83] updated LSL syntax
---
demo/kitchen-sink/docs/lsl.lsl | 6 +-
lib/ace/mode/_test/tokens_lsl.json | 26 +-
lib/ace/mode/lsl_highlight_rules.js | 278 +------
lib/ace/snippets/lsl.snippets | 1141 +++++++++++++++------------
4 files changed, 686 insertions(+), 765 deletions(-)
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/lib/ace/mode/_test/tokens_lsl.json b/lib/ace/mode/_test/tokens_lsl.json
index 83b7352b..6c8a7eee 100644
--- a/lib/ace/mode/_test/tokens_lsl.json
+++ b/lib/ace/mode/_test/tokens_lsl.json
@@ -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"
],[
@@ -492,4 +500,4 @@
["paren.rparen.lsl","}"]
],[
"start"
-]]
\ No newline at end of file
+]]
diff --git a/lib/ace/mode/lsl_highlight_rules.js b/lib/ace/mode/lsl_highlight_rules.js
index 752abc21..ecfd7118 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 = {
@@ -313,9 +69,16 @@ function LSLHighlightRules() {
token : "string.quoted.double.lsl",
start : '"',
end : '"',
- next : [{
- token : "constant.language.escape.lsl", regex : /\\[tn"\\]/
- }]
+ next : [
+ {
+ token : "constant.character.escape.lsl",
+ regex : /\\[tn"\\]/
+ },
+ {
+ token : "invalid.illegal.constant.character.escape.lsl",
+ regex : "\\."
+ }
+ ]
}, {
token : "constant.numeric.lsl",
regex : "(0[xX][0-9a-fA-F]+|[+-]?[0-9]+(?:(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?)?)\\b"
@@ -331,6 +94,9 @@ function LSLHighlightRules() {
}, {
token : "keyword.operator.lsl",
regex : "\\+\\+|\\-\\-|<<|>>|&&?|\\|\\|?|\\^|~|[!%<>=*+\\-\\/]=?"
+ }, {
+ token : "invalid.illegal.keyword.operator.lsl",
+ regex : ":=?"
}, {
token : "punctuation.operator.lsl",
regex : "\\,|\\;"
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
+ }
From a2cc97b34bf54974029a308fb3ec7defd25f341c Mon Sep 17 00:00:00 2001
From: Builder's Brewery
Date: Tue, 18 Feb 2014 16:24:35 +0100
Subject: [PATCH 33/83] fix lsl test
---
lib/ace/mode/_test/tokens_lsl.json | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/ace/mode/_test/tokens_lsl.json b/lib/ace/mode/_test/tokens_lsl.json
index 6c8a7eee..a76a181b 100644
--- a/lib/ace/mode/_test/tokens_lsl.json
+++ b/lib/ace/mode/_test/tokens_lsl.json
@@ -428,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",")"],
@@ -475,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",")"],
From 4e4d8a553bc5265464203ab0cf019a5433b58f5b Mon Sep 17 00:00:00 2001
From: Builder's Brewery
Date: Tue, 18 Feb 2014 17:22:47 +0100
Subject: [PATCH 34/83] fix lsl string - part one
---
lib/ace/mode/lsl_highlight_rules.js | 41 ++++++++++++++++++-----------
1 file changed, 25 insertions(+), 16 deletions(-)
diff --git a/lib/ace/mode/lsl_highlight_rules.js b/lib/ace/mode/lsl_highlight_rules.js
index ecfd7118..a58bd2bb 100644
--- a/lib/ace/mode/lsl_highlight_rules.js
+++ b/lib/ace/mode/lsl_highlight_rules.js
@@ -62,23 +62,13 @@ function LSLHighlightRules() {
token : "comment.line.double-slash.lsl",
regex : "\\/\\/.*$"
}, {
- token : "comment.block.lsl",
+ token : "comment.block.begin.lsl",
regex : "\\/\\*",
next : "comment"
}, {
- token : "string.quoted.double.lsl",
- start : '"',
- end : '"',
- next : [
- {
- token : "constant.character.escape.lsl",
- regex : /\\[tn"\\]/
- },
- {
- token : "invalid.illegal.constant.character.escape.lsl",
- regex : "\\."
- }
- ]
+ token : "string.quoted.double.begin.lsl",
+ regex : '"',
+ next : "string"
}, {
token : "constant.numeric.lsl",
regex : "(0[xX][0-9a-fA-F]+|[+-]?[0-9]+(?:(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?)?)\\b"
@@ -113,13 +103,32 @@ function LSLHighlightRules() {
],
"comment" : [
{
- token : "comment.block.lsl",
- regex : ".*?\\*\\/",
+ token : "comment.block.end.lsl",
+ regex : "\\*\\/",
next : "start"
}, {
token : "comment.block.lsl",
regex : ".+"
}
+ ],
+ "string" : [
+ {
+ token : "constant.character.escape.lsl",
+ regex : /\\[tn"\\]/
+ },
+ {
+ token : "invalid.illegal.constant.character.escape.lsl",
+ regex : /\\./
+ },
+ {
+ token : "string.quoted.double.end.lsl",
+ regex : /"/,
+ next : "start"
+ },
+ {
+ token : "string.quoted.double.lsl",
+ regex : ".+"
+ }
]
};
this.normalizeRules();
From b9d16078f79df397c7c7127abf221c04e06613b1 Mon Sep 17 00:00:00 2001
From: Builder's Brewery
Date: Tue, 18 Feb 2014 17:27:05 +0100
Subject: [PATCH 35/83] fix lsl string - part two
---
lib/ace/mode/_test/tokens_lsl.json | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/lib/ace/mode/_test/tokens_lsl.json b/lib/ace/mode/_test/tokens_lsl.json
index a76a181b..9ac15701 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"
],[
@@ -308,9 +308,9 @@
["constant.language.integer.lsl","PUBLIC_CHANNEL"],
["punctuation.operator.lsl",","],
["text.lsl"," "],
- ["string.quoted.double.lsl.start","\""],
+ ["string.quoted.double.begin.lsl","\""],
["string.quoted.double.lsl","Hello, Avatar!"],
- ["string.quoted.double.lsl.end","\""],
+ ["string.quoted.double.end.lsl","\""],
["paren.rparen.lsl",")"],
["punctuation.operator.lsl",";"]
],[
@@ -403,9 +403,9 @@
["text.lsl"," "],
["reserved.godmode.lsl","llSetInventoryPermMask"],
["paren.lparen.lsl","("],
- ["string.quoted.double.lsl.start","\""],
+ ["string.quoted.double.begin.lsl","\""],
["string.quoted.double.lsl","some item"],
- ["string.quoted.double.lsl.end","\""],
+ ["string.quoted.double.end.lsl","\""],
["punctuation.operator.lsl",","],
["text.lsl"," "],
["constant.language.integer.lsl","MASK_NEXT"],
@@ -426,13 +426,13 @@
["constant.language.integer.lsl","PUBLIC_CHANNEL"],
["punctuation.operator.lsl",","],
["text.lsl"," "],
- ["string.quoted.double.lsl.start","\""],
+ ["string.quoted.double.begin.lsl","\""],
["string.quoted.double.lsl","Leaving "],
["constant.character.escape.lsl","\\\""],
["string.quoted.double.lsl","default"],
["constant.character.escape.lsl","\\\""],
["string.quoted.double.lsl"," now..."],
- ["string.quoted.double.lsl.end","\""],
+ ["string.quoted.double.end.lsl","\""],
["paren.rparen.lsl",")"],
["punctuation.operator.lsl",";"]
],[
@@ -473,7 +473,7 @@
["constant.language.integer.lsl","PUBLIC_CHANNEL"],
["punctuation.operator.lsl",","],
["text.lsl"," "],
- ["string.quoted.double.lsl.start","\""],
+ ["string.quoted.double.begin.lsl","\""],
["string.quoted.double.lsl","Entered "],
["constant.character.escape.lsl","\\\""],
["string.quoted.double.lsl","state other"],
@@ -483,7 +483,7 @@
["string.quoted.double.lsl","default"],
["constant.character.escape.lsl","\\\""],
["string.quoted.double.lsl"," again..."],
- ["string.quoted.double.lsl.end","\""],
+ ["string.quoted.double.end.lsl","\""],
["paren.rparen.lsl",")"],
["punctuation.operator.lsl",";"]
],[
From 102de76b6832d9fbff5e7b7767d143c0fafea263 Mon Sep 17 00:00:00 2001
From: Builder's Brewery
Date: Tue, 18 Feb 2014 17:33:52 +0100
Subject: [PATCH 36/83] changed regex order
---
lib/ace/mode/lsl_highlight_rules.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/ace/mode/lsl_highlight_rules.js b/lib/ace/mode/lsl_highlight_rules.js
index a58bd2bb..08d6f2df 100644
--- a/lib/ace/mode/lsl_highlight_rules.js
+++ b/lib/ace/mode/lsl_highlight_rules.js
@@ -116,15 +116,15 @@ function LSLHighlightRules() {
token : "constant.character.escape.lsl",
regex : /\\[tn"\\]/
},
- {
- token : "invalid.illegal.constant.character.escape.lsl",
- regex : /\\./
- },
{
token : "string.quoted.double.end.lsl",
regex : /"/,
next : "start"
},
+ {
+ token : "invalid.illegal.constant.character.escape.lsl",
+ regex : /\\./
+ },
{
token : "string.quoted.double.lsl",
regex : ".+"
From 2be1a5a3d381b851186ef584dc83817db42f7c9e Mon Sep 17 00:00:00 2001
From: Builder's Brewery
Date: Thu, 20 Feb 2014 08:47:18 +0100
Subject: [PATCH 37/83] trying to fix regex for invalid escape chars
---
lib/ace/mode/lsl_highlight_rules.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ace/mode/lsl_highlight_rules.js b/lib/ace/mode/lsl_highlight_rules.js
index 08d6f2df..865da271 100644
--- a/lib/ace/mode/lsl_highlight_rules.js
+++ b/lib/ace/mode/lsl_highlight_rules.js
@@ -123,7 +123,7 @@ function LSLHighlightRules() {
},
{
token : "invalid.illegal.constant.character.escape.lsl",
- regex : /\\./
+ regex : /\\\./
},
{
token : "string.quoted.double.lsl",
From 32191f128b8daeb883b0372736085041d5c02dc0 Mon Sep 17 00:00:00 2001
From: Builder's Brewery
Date: Thu, 20 Feb 2014 08:56:39 +0100
Subject: [PATCH 38/83] working on invalid escape chars
---
lib/ace/mode/lsl_highlight_rules.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/ace/mode/lsl_highlight_rules.js b/lib/ace/mode/lsl_highlight_rules.js
index 865da271..16938b3c 100644
--- a/lib/ace/mode/lsl_highlight_rules.js
+++ b/lib/ace/mode/lsl_highlight_rules.js
@@ -116,15 +116,15 @@ function LSLHighlightRules() {
token : "constant.character.escape.lsl",
regex : /\\[tn"\\]/
},
+ {
+ token : "invalid.illegal.constant.character.escape.lsl",
+ regex : "\\."
+ },
{
token : "string.quoted.double.end.lsl",
regex : /"/,
next : "start"
},
- {
- token : "invalid.illegal.constant.character.escape.lsl",
- regex : /\\\./
- },
{
token : "string.quoted.double.lsl",
regex : ".+"
From 316bb55f17a325deb091834cd4a60bcda17fabd1 Mon Sep 17 00:00:00 2001
From: nightwing
Date: Sat, 15 Feb 2014 12:12:26 +0400
Subject: [PATCH 39/83] fix inserting long text
---
lib/ace/document.js | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/lib/ace/document.js b/lib/ace/document.js
index 24d82cc3..14e04ff9 100644
--- a/lib/ace/document.js
+++ b/lib/ace/document.js
@@ -56,7 +56,7 @@ var Document = function(text) {
// There has to be one line at least in the document. If you pass an empty
// string to the insert function, nothing will happen. Workaround.
- if (text.length == 0) {
+ if (text.length === 0) {
this.$lines = [""];
} else if (Array.isArray(text)) {
this._insertLines(0, text);
@@ -107,10 +107,10 @@ var Document = function(text) {
**/
// check for IE split bug
- if ("aaa".split(/a/).length == 0)
+ if ("aaa".split(/a/).length === 0)
this.$split = function(text) {
return text.replace(/\r\n|\r/g, "\n").split("\n");
- }
+ };
else
this.$split = function(text) {
return text.split(/\r\n|\r|\n/);
@@ -136,11 +136,11 @@ var Document = function(text) {
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}
@@ -311,9 +311,10 @@ var Document = function(text) {
// apply doesn't work for big arrays (smallest threshold is on safari 0xFFFF)
// to circumvent that we have to break huge inserts into smaller chunks here
- if (lines.length > 0xFFFF) {
- var end = this._insertLines(row, lines.slice(0xFFFF));
- lines = lines.slice(0, 0xFFFF);
+ while (lines.length > 0xF000) {
+ var end = this._insertLines(row, lines.slice(0, 0xF000));
+ lines = lines.slice(0xF000);
+ row = end.row;
}
var args = [row, 0];
@@ -327,7 +328,7 @@ var Document = function(text) {
lines: lines
};
this._signal("change", { data: delta });
- return end || range.end;
+ return range.end;
};
/**
From f4d1dc7c13dd28d9bf5d8268e1d984e2768de72a Mon Sep 17 00:00:00 2001
From: nightwing
Date: Fri, 1 Nov 2013 00:28:01 +0400
Subject: [PATCH 40/83] create wrap data lazily
---
lib/ace/edit_session.js | 44 ++++++++++++++++-------------------------
1 file changed, 17 insertions(+), 27 deletions(-)
diff --git a/lib/ace/edit_session.js b/lib/ace/edit_session.js
index 8f772db7..cc7d72b0 100644
--- a/lib/ace/edit_session.js
+++ b/lib/ace/edit_session.js
@@ -1556,10 +1556,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);
}
@@ -1719,16 +1716,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.
@@ -1833,8 +1824,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;
}
}
@@ -2023,9 +2013,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)
@@ -2326,14 +2313,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 {
@@ -2387,7 +2376,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;
From f352165725fd75539dc6093d551de92c61faf7ac Mon Sep 17 00:00:00 2001
From: nightwing
Date: Sat, 15 Feb 2014 12:30:30 +0400
Subject: [PATCH 41/83] move text measuring into separate module
---
lib/ace/edit_session.js | 11 ++-
lib/ace/layer/font_metrics.js | 158 ++++++++++++++++++++++++++++++++++
lib/ace/layer/text.js | 133 +++-------------------------
lib/ace/virtual_renderer.js | 8 +-
4 files changed, 183 insertions(+), 127 deletions(-)
create mode 100644 lib/ace/layer/font_metrics.js
diff --git a/lib/ace/edit_session.js b/lib/ace/edit_session.js
index cc7d72b0..e4b3d54c 100644
--- a/lib/ace/edit_session.js
+++ b/lib/ace/edit_session.js
@@ -2393,14 +2393,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/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/text.js b/lib/ace/layer/text.js
index 4290233d..50b00196 100644
--- a/lib/ace/layer/text.js
+++ b/lib/ace/layer/text.js
@@ -41,10 +41,6 @@ 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();
};
(function() {
@@ -63,132 +59,27 @@ var Text = function(parentEl) {
};
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();
diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js
index f1757d92..4559f79d 100644
--- a/lib/ace/virtual_renderer.js
+++ b/lib/ace/virtual_renderer.js
@@ -42,6 +42,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 +126,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 = {
@@ -235,6 +238,7 @@ var VirtualRenderer = function(container, theme) {
this.$gutterLayer.setSession(session);
this.$textLayer.setSession(session);
this.$loop.schedule(this.CHANGE_FULL);
+ this.session.$setFontMetrics(this.$fontMetrics);
};
/**
From 6e9c9417fc67f46f8748497d6ebe8a90941515da Mon Sep 17 00:00:00 2001
From: nightwing
Date: Sat, 15 Feb 2014 12:33:54 +0400
Subject: [PATCH 42/83] cleanup
---
lib/ace/edit_session.js | 22 ++++++++++-----------
lib/ace/ext/error_marker.js | 12 ++++++------
lib/ace/layer/gutter.js | 3 ++-
lib/ace/lib/event.js | 27 ++++++++++++--------------
lib/ace/mouse/multi_select_handler.js | 2 +-
lib/ace/multi_select.js | 4 +++-
lib/ace/virtual_renderer.js | 4 ++--
lib/ace/worker/worker.js | 28 +++++++++++++--------------
lib/ace/worker/worker_client.js | 16 ++++++++++-----
9 files changed, 62 insertions(+), 56 deletions(-)
diff --git a/lib/ace/edit_session.js b/lib/ace/edit_session.js
index e4b3d54c..ce526bd5 100644
--- a/lib/ace/edit_session.js
+++ b/lib/ace/edit_session.js
@@ -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;
@@ -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) {
@@ -1268,7 +1268,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;
}
diff --git a/lib/ace/ext/error_marker.js b/lib/ace/ext/error_marker.js
index 5e87529e..18de2b88 100644
--- a/lib/ace/ext/error_marker.js
+++ b/lib/ace/ext/error_marker.js
@@ -143,12 +143,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/layer/gutter.js b/lib/ace/layer/gutter.js
index 620a2690..7b206f61 100644
--- a/lib/ace/layer/gutter.js
+++ b/lib/ace/layer/gutter.js
@@ -120,7 +120,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/lib/event.js b/lib/ace/lib/event.js
index 6721b19c..8966f001 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,23 @@ 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);
+ };
+
+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 +267,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 +280,6 @@ function normalizeCommandKeys(callback, e, keyCode) {
return false;
}
-
-
return callback(e, hashId, keyCode);
}
diff --git a/lib/ace/mouse/multi_select_handler.js b/lib/ace/mouse/multi_select_handler.js
index dc01bd6c..f9c79c4a 100644
--- a/lib/ace/mouse/multi_select_handler.js
+++ b/lib/ace/mouse/multi_select_handler.js
@@ -51,7 +51,7 @@ function onMouseDown(e) {
}
if (!ctrl && !alt) {
- if (button == 0 && e.editor.inMultiSelectMode)
+ if (button === 0 && e.editor.inMultiSelectMode)
e.editor.exitMultiSelectMode();
return;
}
diff --git a/lib/ace/multi_select.js b/lib/ace/multi_select.js
index d2b3c474..0df59244 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/virtual_renderer.js b/lib/ace/virtual_renderer.js
index 4559f79d..c5eb42a9 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;
@@ -153,7 +152,8 @@ var VirtualRenderer = function(container, theme) {
minHeight : 1,
maxHeight : 1,
offset : 0,
- height : 1
+ height : 1,
+ gutterOffset: 1
};
this.scrollMargin = {
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 cb18998f..4aebe641 100644
--- a/lib/ace/worker/worker_client.js
+++ b/lib/ace/worker/worker_client.js
@@ -179,16 +179,15 @@ var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl) {
};
this.$workerBlob = function(workerUrl) {
- var script = 'importScripts("' + workerUrl + '");';
+ var script = "importScripts('" + 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);
@@ -202,6 +201,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) {
this.messageBuffer = [];
var main = null;
+ var emitSync = false;
var sender = Object.create(EventEmitter);
var _self = this;
@@ -209,8 +209,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();
From 4a80bd7b3ddffbb146cdc460da75efbd19156b27 Mon Sep 17 00:00:00 2001
From: nightwing
Date: Sat, 15 Feb 2014 13:26:52 +0400
Subject: [PATCH 43/83] fix cstyle behavior in multicursor mode
---
lib/ace/editor.js | 7 +-
lib/ace/mode/behaviour/cstyle.js | 206 ++++++++++++++++++-------------
2 files changed, 121 insertions(+), 92 deletions(-)
diff --git a/lib/ace/editor.js b/lib/ace/editor.js
index 06ce384b..cecec203 100644
--- a/lib/ace/editor.js
+++ b/lib/ace/editor.js
@@ -660,7 +660,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;
}
@@ -846,14 +846,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) {
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;
From 42a368ed029b745a5508db45e7eac215204aeeb9 Mon Sep 17 00:00:00 2001
From: nightwing
Date: Sat, 15 Feb 2014 13:46:07 +0400
Subject: [PATCH 44/83] add selection.moveTo
---
lib/ace/autocomplete/popup.js | 3 +--
lib/ace/edit_session.js | 8 ++++----
lib/ace/editor.js | 15 +++++----------
lib/ace/ext/emmet.js | 3 +--
lib/ace/ext/error_marker.js | 3 +--
lib/ace/keyboard/vim/commands.js | 9 +++------
lib/ace/keyboard/vim/maps/motions.js | 3 +--
lib/ace/keyboard/vim/maps/util.js | 6 ++----
lib/ace/mouse/default_handlers.js | 8 +++-----
lib/ace/mouse/multi_select_handler.js | 11 ++++-------
lib/ace/selection.js | 21 +++++++++++++++++++++
11 files changed, 46 insertions(+), 44 deletions(-)
diff --git a/lib/ace/autocomplete/popup.js b/lib/ace/autocomplete/popup.js
index ca40cad1..02ef21ee 100644
--- a/lib/ace/autocomplete/popup.js
+++ b/lib/ace/autocomplete/popup.js
@@ -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();
});
diff --git a/lib/ace/edit_session.js b/lib/ace/edit_session.js
index ce526bd5..9689ea5c 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);
}
};
@@ -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) {
diff --git a/lib/ace/editor.js b/lib/ace/editor.js
index cecec203..0efbdd93 100644
--- a/lib/ace/editor.js
+++ b/lib/ace/editor.js
@@ -1941,8 +1941,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);
}
}
};
@@ -1977,8 +1976,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);
};
/**
@@ -1993,8 +1991,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);
};
/**
@@ -2009,8 +2006,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);
};
/**
@@ -2154,8 +2150,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/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 18de2b88..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,
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/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 f9c79c4a..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;
@@ -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/selection.js b/lib/ace/selection.js
index adfb6518..712021ad 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.
From 5783bae0587406e6482c08490da4360e131a3263 Mon Sep 17 00:00:00 2001
From: nightwing
Date: Sat, 15 Feb 2014 13:49:42 +0400
Subject: [PATCH 45/83] add event.getModifierString to convert hash into
readable string
---
lib/ace/keyboard/vim.js | 4 ++--
lib/ace/lib/event.js | 4 ++++
lib/ace/lib/keys.js | 11 ++++++++++-
3 files changed, 16 insertions(+), 3 deletions(-)
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/lib/event.js b/lib/ace/lib/event.js
index 8966f001..9ad0c3ac 100644
--- a/lib/ace/lib/event.js
+++ b/lib/ace/lib/event.js
@@ -217,6 +217,10 @@ var getModifierHash = useragent.isMac && useragent.isOpera && !("KeyboardEvent"
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);
diff --git a/lib/ace/lib/keys.js b/lib/ace/lib/keys.js
index 916d9f00..78cede51 100644
--- a/lib/ace/lib/keys.js
+++ b/lib/ace/lib/keys.js
@@ -133,6 +133,15 @@ var Keys = (function() {
// 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;
})();
@@ -140,6 +149,6 @@ oop.mixin(exports, Keys);
exports.keyCodeToString = function(keyCode) {
return (Keys[keyCode] || String.fromCharCode(keyCode)).toLowerCase();
-}
+};
});
From 9c80485d919caf71252494009e6458ada851aa73 Mon Sep 17 00:00:00 2001
From: nightwing
Date: Sat, 15 Feb 2014 14:07:31 +0400
Subject: [PATCH 46/83] allow setting editor session to null
---
lib/ace/editor.js | 139 +++++++++++++++++++++++-----------------------
1 file changed, 71 insertions(+), 68 deletions(-)
diff --git a/lib/ace/editor.js b/lib/ace/editor.js
index 0efbdd93..300e4399 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});
};
/**
From 3694a025322696cc0dad9e3087cc849e065c3264 Mon Sep 17 00:00:00 2001
From: nightwing
Date: Wed, 12 Feb 2014 23:00:51 +0400
Subject: [PATCH 47/83] do not copy "ace/ace" when setting as global
---
Makefile.dryice.js | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/Makefile.dryice.js b/Makefile.dryice.js
index 49bf0b28..ee26328d 100755
--- a/Makefile.dryice.js
+++ b/Makefile.dryice.js
@@ -658,9 +658,7 @@ function exportAce(ns, module, requireBase, extModule) {
REQUIRE_NS.require(["MODULE"], function(a) {
a && a.config.init();
if (!window.NS)
- window.NS = {};
- for (var key in a) if (a.hasOwnProperty(key))
- NS[key] = a[key];
+ window.NS = a;
});
})();
};
From 45311cda459a3ae52405b578dcceb928cbf509d4 Mon Sep 17 00:00:00 2001
From: nightwing
Date: Fri, 21 Feb 2014 22:30:47 +0400
Subject: [PATCH 48/83] fix #1808 show different different indicators for LF
and CRLF
---
lib/ace/document.js | 2 ++
lib/ace/layer/text.js | 21 +++++++++++++++++----
lib/ace/virtual_renderer.js | 16 +++++++++++++++-
3 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/lib/ace/document.js b/lib/ace/document.js
index 14e04ff9..a2ca7210 100644
--- a/lib/ace/document.js
+++ b/lib/ace/document.js
@@ -120,6 +120,7 @@ var Document = function(text) {
this.$detectNewLine = function(text) {
var match = text.match(/^.*?(\r\n|\r|\n)/m);
this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
};
/**
@@ -152,6 +153,7 @@ var Document = function(text) {
return;
this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
};
/**
diff --git a/lib/ace/layer/text.js b/lib/ace/layer/text.js
index 50b00196..fd81f5ff 100644
--- a/lib/ace/layer/text.js
+++ b/lib/ace/layer/text.js
@@ -41,18 +41,31 @@ var Text = function(parentEl) {
this.element = dom.createElement("div");
this.element.className = "ace_layer ace_text-layer";
parentEl.appendChild(this.element);
+ 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";
diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js
index c5eb42a9..28cefde1 100644
--- a/lib/ace/virtual_renderer.js
+++ b/lib/ace/virtual_renderer.js
@@ -227,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);
@@ -239,6 +244,10 @@ var VirtualRenderer = function(container, theme) {
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);
};
/**
@@ -272,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();
From 306e918920fa9f1275ed16a479626d5b70106db6 Mon Sep 17 00:00:00 2001
From: nightwing
Date: Fri, 21 Feb 2014 22:38:42 +0400
Subject: [PATCH 49/83] fix #1825 editor created with showGutter=false cannot
later show gutters
---
lib/ace/virtual_renderer.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js
index 28cefde1..6034cc9c 100644
--- a/lib/ace/virtual_renderer.js
+++ b/lib/ace/virtual_renderer.js
@@ -1623,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
From 56a00f3fa0b946979bfb384cb51ffbe9fb5ef4cc Mon Sep 17 00:00:00 2001
From: "devoncarew@google.com"
Date: Sat, 22 Feb 2014 09:54:37 -0800
Subject: [PATCH 50/83] remove yaml comment syntax highlighting - it's too
aggressive
---
lib/ace/mode/yaml_highlight_rules.js | 3 ---
1 file changed, 3 deletions(-)
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 : "[[({]"
From 07c7c86944cd622041edf6e909ba31aa0fa7603d Mon Sep 17 00:00:00 2001
From: nightwing
Date: Sun, 23 Feb 2014 12:02:45 +0400
Subject: [PATCH 51/83] fix #1827 setScrollMargin Breaks Multiple Selection
When Margin is Greater Than 0
---
lib/ace/layer/cursor.js | 2 +-
lib/ace/virtual_renderer.js | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
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/virtual_renderer.js b/lib/ace/virtual_renderer.js
index 6034cc9c..6f6ab177 100644
--- a/lib/ace/virtual_renderer.js
+++ b/lib/ace/virtual_renderer.js
@@ -720,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();
};
@@ -1002,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
};
From a9117a4aee9c7dc377aaa2cdc8fcad72906697bf Mon Sep 17 00:00:00 2001
From: nightwing
Date: Sun, 23 Feb 2014 14:02:38 +0400
Subject: [PATCH 52/83] define('ace/ace') needs to be at the end of ace.js
fixes https://github.com/ajaxorg/ace-builds/issues/15
---
Makefile.dryice.js | 87 +++++++++++++++++++++++++++++-----------------
lib/ace/config.js | 6 ++--
2 files changed, 60 insertions(+), 33 deletions(-)
diff --git a/Makefile.dryice.js b/Makefile.dryice.js
index ee26328d..add81489 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-\x09\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,37 @@ 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;
+ return module;
+ }).sort(function(a, b) {
+ 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 +619,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 +665,14 @@ 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 = a;
+ for (var key in a) if (a.hasOwnProperty(key))
+ NS[key] = a[key];
});
})();
};
@@ -672,6 +686,8 @@ function exportAce(ns, module, requireBase, extModule) {
};
}
+ text = text.replace(/function init\(packaged\) {/, "init(true);$&\n");
+
return (text + ";" + template
.toString()
.replace(/MODULE/g, module)
@@ -694,6 +710,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/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(); });
}
From d8c05b5138d5f3b746ae7cc95d8b1c7e4d86eee6 Mon Sep 17 00:00:00 2001
From: Yury Korolev
Date: Mon, 24 Feb 2014 22:12:21 -0800
Subject: [PATCH 53/83] Indent after `module` keyword
---
lib/ace/mode/ruby.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) {
From c1011ca87520bf6f3638a3025c86460cbdff85a5 Mon Sep 17 00:00:00 2001
From: nightwing
Date: Wed, 26 Feb 2014 17:29:32 +0400
Subject: [PATCH 54/83] fix worker build
---
Makefile.dryice.js | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/Makefile.dryice.js b/Makefile.dryice.js
index add81489..f8e1383c 100755
--- a/Makefile.dryice.js
+++ b/Makefile.dryice.js
@@ -304,7 +304,7 @@ function getWriteFilters(options, projectType, main) {
// copy.filter.uglifyjs.options.ascii_only = true; doesn't work with some uglify.js versions
filters.push(function(text) {
- var text = text.replace(/[\x00-\x09\x0b\x0c\x0e\x19\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;
@@ -587,14 +587,15 @@ CommonJsProject.prototype.getCurrentModules = function() {
}
var depMap = {}, modules = this.currentModules;
return Object.keys(this.currentModules).map(function(moduleName) {
- module = modules[moduleName]
+ module = modules[moduleName];
module.id = moduleName;
+ module.isSpecial = !/define\(\'[^']*',/.test(module.source);
return module;
}).sort(function(a, b) {
- if (isDep(a.id, b.id))
- return -1;
- if (isDep(b.id, a.id))
- return 1;
+ 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)
});
};
From 96184bda232a2c1c0d82bc772cd988ce506aefcd Mon Sep 17 00:00:00 2001
From: nightwing
Date: Wed, 26 Feb 2014 23:45:33 +0400
Subject: [PATCH 55/83] fix zed icon
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index f116eb72..2249c2f8 100644
--- a/index.html
+++ b/index.html
@@ -793,7 +793,7 @@ if (match) {
Plunker
-
+
Zed
From 3166b3fb90bec07e1a28c605cb5f341495375f61 Mon Sep 17 00:00:00 2001
From: nightwing
Date: Mon, 3 Mar 2014 15:24:39 +0400
Subject: [PATCH 56/83] fix #1836 html worker logs a lot of `unable to load`
---
lib/ace/mode/html/saxparser.js | 102 ++++++++++++++++-----------------
1 file changed, 51 insertions(+), 51 deletions(-)
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
Date: Sat, 8 Mar 2014 15:54:13 +0400
Subject: [PATCH 57/83] release 1.1.3
---
ChangeLog.txt | 13 ++++++++++++-
Readme.md | 2 +-
build | 2 +-
index.html | 2 +-
lib/ace/editor.js | 7 +++----
5 files changed, 18 insertions(+), 8 deletions(-)
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/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/build b/build
index b2f8bf1e..fc9d2cae 160000
--- a/build
+++ b/build
@@ -1 +1 @@
-Subproject commit b2f8bf1e745250596afea5b39c70b94421af906d
+Subproject commit fc9d2cae9fe8e6e95e74c86a31d21caadd8f9f39
diff --git a/index.html b/index.html
index 2249c2f8..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
diff --git a/lib/ace/editor.js b/lib/ace/editor.js
index 300e4399..a7765e8c 100644
--- a/lib/ace/editor.js
+++ b/lib/ace/editor.js
@@ -455,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);
};
/**
From 6f8035f7106754f48a30c9b43d7c939265e8f96e Mon Sep 17 00:00:00 2001
From: Robert Krahn
Date: Thu, 28 Nov 2013 21:40:49 -0800
Subject: [PATCH 58/83] markdown mode comment fix
---
lib/ace/mode/markdown.js | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
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);
From 08d2ebb5b28447f94b8d608c65819c4110289b8d Mon Sep 17 00:00:00 2001
From: Robert Krahn
Date: Tue, 4 Mar 2014 12:26:11 -0800
Subject: [PATCH 59/83] occur: fix emacs line start
---
lib/ace/occur.js | 3 +++
1 file changed, 3 insertions(+)
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;
}
/**
From 3b7569542f01acd8cfa764719c31adac1c3152fd Mon Sep 17 00:00:00 2001
From: Robert Krahn
Date: Wed, 12 Mar 2014 04:56:49 -0700
Subject: [PATCH 60/83] fixing emacs key handler when key code == -1 (this can
happen with the change introduced in #5e2c5f4)
---
lib/ace/keyboard/emacs.js | 4 ++++
1 file changed, 4 insertions(+)
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) {
From 58404df3491c737918e55889228788cae52f3a14 Mon Sep 17 00:00:00 2001
From: Robert Krahn
Date: Tue, 4 Mar 2014 17:39:30 -0800
Subject: [PATCH 61/83] isearch: now supports yanking, and killing text from
edit buffer
---
.../commands/incremental_search_commands.js | 28 +++++++++++++++++--
lib/ace/incremental_search.js | 13 +++++++--
lib/ace/incremental_search_test.js | 28 +++++++++----------
lib/ace/selection.js | 21 ++++++++++++++
4 files changed, 72 insertions(+), 18 deletions(-)
diff --git a/lib/ace/commands/incremental_search_commands.js b/lib/ace/commands/incremental_search_commands.js
index ebe979ca..1c35a358 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,28 @@ 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
}];
function IncrementalSearchKeyboardHandler(iSearch) {
@@ -163,6 +185,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/incremental_search.js b/lib/ace/incremental_search.js
index e6fa8928..fc410b89 100644
--- a/lib/ace/incremental_search.js
+++ b/lib/ace/incremental_search.js
@@ -72,7 +72,11 @@ 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.$onPasteHandler = ed.addEventListener('paste', this.onPaste.bind(this));
this.selectionFix(ed);
this.statusMessage(true);
}
@@ -84,6 +88,7 @@ oop.inherits(IncrementalSearch, Search);
this.$editor.removeEventListener('mousedown', this.$mousedownHandler);
delete this.$mousedownHandler;
}
+ this.$editor.onPaste = this.$originalEditorOnPaste;
this.message('');
}
@@ -150,9 +155,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 +186,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/selection.js b/lib/ace/selection.js
index 712021ad..403b1e76 100644
--- a/lib/ace/selection.js
+++ b/lib/ace/selection.js
@@ -889,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) {
From c8b63ee977313fffeb3b657a3e10740b7b4cba81 Mon Sep 17 00:00:00 2001
From: Robert Krahn
Date: Wed, 5 Mar 2014 15:51:55 -0800
Subject: [PATCH 62/83] isearch: recenterTopBottom
---
lib/ace/commands/incremental_search_commands.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/ace/commands/incremental_search_commands.js b/lib/ace/commands/incremental_search_commands.js
index 1c35a358..8ef80303 100644
--- a/lib/ace/commands/incremental_search_commands.js
+++ b/lib/ace/commands/incremental_search_commands.js
@@ -156,6 +156,12 @@ exports.iSearchCommands = [{
},
readOnly: true,
isIncrementalSearchCommand: true
+}, {
+ name: 'recenterTopBottom',
+ bindKey: 'Ctrl-l',
+ exec: function(iSearch) { iSearch.$editor.execCommand('recenterTopBottom'); },
+ readOnly: true,
+ isIncrementalSearchCommand: true
}];
function IncrementalSearchKeyboardHandler(iSearch) {
From 12343e0e6f69f426e5032aea03de3b2c147ce12d Mon Sep 17 00:00:00 2001
From: Robert Krahn
Date: Wed, 5 Mar 2014 15:52:28 -0800
Subject: [PATCH 63/83] isearch: fixing isearch onpase
---
lib/ace/incremental_search.js | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/lib/ace/incremental_search.js b/lib/ace/incremental_search.js
index fc410b89..88615006 100644
--- a/lib/ace/incremental_search.js
+++ b/lib/ace/incremental_search.js
@@ -73,22 +73,21 @@ oop.inherits(IncrementalSearch, Search);
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.$originalEditorOnPaste = ed.onPaste; ed.onPaste = this.onPaste.bind(this);
this.$mousedownHandler = ed.addEventListener('mousedown', this.onMouseDown.bind(this));
- this.$onPasteHandler = ed.addEventListener('paste', this.onPaste.bind(this));
this.selectionFix(ed);
this.statusMessage(true);
}
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;
}
- this.$editor.onPaste = this.$originalEditorOnPaste;
+ ed.onPaste = this.$originalEditorOnPaste;
this.message('');
}
From dc874839361caa0e4804927b52e40d3513d8d1f2 Mon Sep 17 00:00:00 2001
From: Robert Bruce Park
Date: Fri, 14 Mar 2014 22:14:45 -0700
Subject: [PATCH 64/83] Increase granularity of invisible character classes.
---
lib/ace/layer/text.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/ace/layer/text.js b/lib/ace/layer/text.js
index fd81f5ff..0952577e 100644
--- a/lib/ace/layer/text.js
+++ b/lib/ace/layer/text.js
@@ -126,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)
+ "");
@@ -321,7 +321,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 "&";
@@ -333,14 +333,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,
""
);
From a4b27cbc3a8bcf60dbf8f406ba31ce205870643a Mon Sep 17 00:00:00 2001
From: Robert Bruce Park
Date: Fri, 14 Mar 2014 22:26:05 -0700
Subject: [PATCH 65/83] Resolve some CI failures.
---
lib/ace/layer/text_test.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/ace/layer/text_test.js b/lib/ace/layer/text_test.js
index a14a37e6..1aa1cae5 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)}
From 6594a3fe5511fd06e27074697a92bf7d4c7bb525 Mon Sep 17 00:00:00 2001
From: Robert Bruce Park
Date: Fri, 14 Mar 2014 22:32:31 -0700
Subject: [PATCH 66/83] Fix more CI failures.
---
lib/ace/layer/text.js | 4 ++--
lib/ace/layer/text_test.js | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/ace/layer/text.js b/lib/ace/layer/text.js
index 0952577e..8955ddc3 100644
--- a/lib/ace/layer/text.js
+++ b/lib/ace/layer/text.js
@@ -146,8 +146,8 @@ var Text = function(parentEl) {
var tabContent = spaceContent;
}
- this.$tabStrings[" "] = "" + spaceContent + "";
- this.$tabStrings["\t"] = "" + tabContent + "";
+ this.$tabStrings[" "] = "" + spaceContent + "";
+ this.$tabStrings["\t"] = "" + tabContent + "";
}
};
diff --git a/lib/ace/layer/text_test.js b/lib/ace/layer/text_test.js
index 1aa1cae5..57601207 100644
--- a/lib/ace/layer/text_test.js
+++ b/lib/ace/layer/text_test.js
@@ -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
]);
}
};
From 5705c067fe052a776aca7bcccdca0ac13c32c9fd Mon Sep 17 00:00:00 2001
From: Robert Bruce Park
Date: Fri, 14 Mar 2014 22:40:00 -0700
Subject: [PATCH 67/83] This should just about fix that.
---
lib/ace/layer/text.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/ace/layer/text.js b/lib/ace/layer/text.js
index 8955ddc3..140700aa 100644
--- a/lib/ace/layer/text.js
+++ b/lib/ace/layer/text.js
@@ -137,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{
@@ -146,8 +150,8 @@ var Text = function(parentEl) {
var tabContent = spaceContent;
}
- this.$tabStrings[" "] = "" + spaceContent + "";
- this.$tabStrings["\t"] = "" + tabContent + "";
+ this.$tabStrings[" "] = "" + spaceContent + "";
+ this.$tabStrings["\t"] = "" + tabContent + "";
}
};
From 1f72461adafeb5cafe08bec2e3e7ee3d2b4c05c1 Mon Sep 17 00:00:00 2001
From: DanyaPostfactum
Date: Sun, 16 Mar 2014 00:33:09 +1000
Subject: [PATCH 68/83] Modify xml highlight rules (add "xml" suffix to tokens)
---
lib/ace/mode/_test/tokens_coldfusion.json | 30 +-
lib/ace/mode/_test/tokens_curly.json | 66 +-
lib/ace/mode/_test/tokens_ejs.json | 318 +++++-----
lib/ace/mode/_test/tokens_ftl.json | 228 +++----
lib/ace/mode/_test/tokens_handlebars.json | 76 +--
lib/ace/mode/_test/tokens_html.json | 70 +--
lib/ace/mode/_test/tokens_html_ruby.json | 220 +++----
lib/ace/mode/_test/tokens_jsp.json | 344 +++++-----
lib/ace/mode/_test/tokens_liquid.json | 326 +++++-----
lib/ace/mode/_test/tokens_luapage.json | 662 ++++++++++----------
lib/ace/mode/_test/tokens_markdown.json | 36 +-
lib/ace/mode/_test/tokens_rhtml.json | 94 +--
lib/ace/mode/_test/tokens_soy_template.json | 52 +-
lib/ace/mode/_test/tokens_svg.json | 394 ++++++------
lib/ace/mode/_test/tokens_twig.json | 176 +++---
lib/ace/mode/_test/tokens_velocity.json | 62 +-
lib/ace/mode/_test/tokens_xml.json | 60 +-
lib/ace/mode/behaviour/coldfusion.js | 95 ---
lib/ace/mode/behaviour/html.js | 48 +-
lib/ace/mode/behaviour/xml.js | 124 +++-
lib/ace/mode/coldfusion.js | 21 +-
lib/ace/mode/folding/html.js | 35 +-
lib/ace/mode/folding/xml.js | 188 +++---
lib/ace/mode/html.js | 13 +-
lib/ace/mode/html_completions.js | 44 +-
lib/ace/mode/html_highlight_rules.js | 36 +-
lib/ace/mode/luapage.js | 2 +-
lib/ace/mode/rhtml.js | 1 +
lib/ace/mode/smarty.js | 6 -
lib/ace/mode/smarty_highlight_rules.js | 6 +-
lib/ace/mode/svg.js | 2 +-
lib/ace/mode/twig.js | 18 +-
lib/ace/mode/velocity.js | 7 +-
lib/ace/mode/xml.js | 5 +-
lib/ace/mode/xml_highlight_rules.js | 187 +++---
lib/ace/mode/xml_test.js | 2 +-
36 files changed, 1987 insertions(+), 2067 deletions(-)
delete mode 100644 lib/ace/mode/behaviour/coldfusion.js
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_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/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/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/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_completions.js b/lib/ace/mode/html_completions.js
index 283b7137..12adb320 100644
--- a/lib/ace/mode/html_completions.js
+++ b/lib/ace/mode/html_completions.js
@@ -43,6 +43,12 @@ var commonAttributes = [
"dropzone",
"hidden",
"id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
"lang",
"spellcheck",
"style",
@@ -226,24 +232,19 @@ var attributeMap = {
"dialog": ["open"]
};
-var allElements = Object.keys(attributeMap);
+var elements = Object.keys(attributeMap);
-function hasType(token, type) {
- var tokenTypes = token.type.split('.');
- return type.split('.').every(function(type){
- return (tokenTypes.indexOf(type) !== -1);
- });
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -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/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/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/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() {
From a0bf93679d835c4947341f09832a0ed08556e9aa Mon Sep 17 00:00:00 2001
From: DanyaPostfactum
Date: Sun, 16 Mar 2014 00:33:26 +1000
Subject: [PATCH 69/83] Fix handing in highlight_rules_test.js
---
lib/ace/mode/_test/highlight_rules_test.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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));
From 21ee784ca1cc5158103671d838ddc3f94d934e00 Mon Sep 17 00:00:00 2001
From: Zef Hemel
Date: Mon, 17 Mar 2014 11:38:16 +0100
Subject: [PATCH 70/83] Add autoSelect option to auto completion By setting
this to `false` no completion will be selected by default and pressing
`Return` will simply insert a new line, rather than the first match.
---
lib/ace/autocomplete.js | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/lib/ace/autocomplete.js b/lib/ace/autocomplete.js
index b243727f..155ffd0d 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);
@@ -69,8 +70,8 @@ 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.setFontSize(editor.getFontSize());
var lineHeight = renderer.layerConfig.lineHeight;
@@ -171,7 +172,13 @@ 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) {
+ editor.completer.insertMatch();
+ } else {
+ editor.insert("\n");
+ }
+ },
"Shift-Return": function(editor) { editor.completer.insertMatch(true); },
"Tab": function(editor) { editor.completer.insertMatch(); },
From 46da3132a2a63a8947a411134e99e87926230fbf Mon Sep 17 00:00:00 2001
From: Derk-Jan Hartman
Date: Mon, 17 Mar 2014 23:10:24 +0100
Subject: [PATCH 71/83] Make sure the CORS blobworker loads absolute URLs
The only situation where this is really needed, is if the workerURL is
protocol relative, since we only end up in this situation if workerurl
is on a different server to begin with.
---
lib/ace/lib/net.js | 10 ++++++++++
lib/ace/worker/worker_client.js | 5 ++++-
2 files changed, 14 insertions(+), 1 deletion(-)
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/worker/worker_client.js b/lib/ace/worker/worker_client.js
index 4aebe641..409b7202 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");
@@ -179,7 +180,9 @@ 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 {
return new Blob([script], {"type": "application/javascript"});
} catch (e) { // Backwards-compatibility
From de51e72a3c6a84301baf82620cea625bbd570fa6 Mon Sep 17 00:00:00 2001
From: Adam Jimenez
Date: Tue, 18 Mar 2014 16:01:33 +0000
Subject: [PATCH 72/83] missing bitwise xor function
Fixes error:
```
[object Object] has no method 'Node_Expr_BitwiseXor'
```
Which results from using xor e.g:
```
error_reporting(E_ALL ^ E_NOTICE);
also reported to phpjs project:
https://github.com/niklasvh/php.js/pull/48
---
lib/ace/mode/php/php.js | 10 ++++++++++
1 file changed, 10 insertions(+)
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",
From f4613206be4f88213b1173bb2b982b4376fc3162 Mon Sep 17 00:00:00 2001
From: Builders Brewery
Date: Wed, 19 Mar 2014 16:39:00 +0100
Subject: [PATCH 73/83] revert to old string regex
---
lib/ace/mode/_test/tokens_lsl.json | 16 +++++++-------
lib/ace/mode/lsl_highlight_rules.js | 34 ++++++++++-------------------
2 files changed, 20 insertions(+), 30 deletions(-)
diff --git a/lib/ace/mode/_test/tokens_lsl.json b/lib/ace/mode/_test/tokens_lsl.json
index 9ac15701..93575a2c 100644
--- a/lib/ace/mode/_test/tokens_lsl.json
+++ b/lib/ace/mode/_test/tokens_lsl.json
@@ -308,9 +308,9 @@
["constant.language.integer.lsl","PUBLIC_CHANNEL"],
["punctuation.operator.lsl",","],
["text.lsl"," "],
- ["string.quoted.double.begin.lsl","\""],
+ ["string.quoted.double.lsl.start","\""],
["string.quoted.double.lsl","Hello, Avatar!"],
- ["string.quoted.double.end.lsl","\""],
+ ["string.quoted.double.lsl.end","\""],
["paren.rparen.lsl",")"],
["punctuation.operator.lsl",";"]
],[
@@ -403,9 +403,9 @@
["text.lsl"," "],
["reserved.godmode.lsl","llSetInventoryPermMask"],
["paren.lparen.lsl","("],
- ["string.quoted.double.begin.lsl","\""],
+ ["string.quoted.double.lsl.start","\""],
["string.quoted.double.lsl","some item"],
- ["string.quoted.double.end.lsl","\""],
+ ["string.quoted.double.lsl.end","\""],
["punctuation.operator.lsl",","],
["text.lsl"," "],
["constant.language.integer.lsl","MASK_NEXT"],
@@ -426,13 +426,13 @@
["constant.language.integer.lsl","PUBLIC_CHANNEL"],
["punctuation.operator.lsl",","],
["text.lsl"," "],
- ["string.quoted.double.begin.lsl","\""],
+ ["string.quoted.double.lsl.start","\""],
["string.quoted.double.lsl","Leaving "],
["constant.character.escape.lsl","\\\""],
["string.quoted.double.lsl","default"],
["constant.character.escape.lsl","\\\""],
["string.quoted.double.lsl"," now..."],
- ["string.quoted.double.end.lsl","\""],
+ ["string.quoted.double.lsl.end","\""],
["paren.rparen.lsl",")"],
["punctuation.operator.lsl",";"]
],[
@@ -473,7 +473,7 @@
["constant.language.integer.lsl","PUBLIC_CHANNEL"],
["punctuation.operator.lsl",","],
["text.lsl"," "],
- ["string.quoted.double.begin.lsl","\""],
+ ["string.quoted.double.lsl.start","\""],
["string.quoted.double.lsl","Entered "],
["constant.character.escape.lsl","\\\""],
["string.quoted.double.lsl","state other"],
@@ -483,7 +483,7 @@
["string.quoted.double.lsl","default"],
["constant.character.escape.lsl","\\\""],
["string.quoted.double.lsl"," again..."],
- ["string.quoted.double.end.lsl","\""],
+ ["string.quoted.double.lsl.end","\""],
["paren.rparen.lsl",")"],
["punctuation.operator.lsl",";"]
],[
diff --git a/lib/ace/mode/lsl_highlight_rules.js b/lib/ace/mode/lsl_highlight_rules.js
index 16938b3c..45ac1696 100644
--- a/lib/ace/mode/lsl_highlight_rules.js
+++ b/lib/ace/mode/lsl_highlight_rules.js
@@ -66,9 +66,18 @@ function LSLHighlightRules() {
regex : "\\/\\*",
next : "comment"
}, {
- token : "string.quoted.double.begin.lsl",
- regex : '"',
- next : "string"
+ token : "string.quoted.double.lsl",
+ start : '"',
+ end : '"',
+ next : [
+ {
+ token : "constant.language.escape.lsl",
+ regex : /\\[tn"\\]/
+ }, {
+ token : "invalid.illegal.constant.character.escape.lsl",
+ regex : "\\."
+ }
+ ]
}, {
token : "constant.numeric.lsl",
regex : "(0[xX][0-9a-fA-F]+|[+-]?[0-9]+(?:(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?)?)\\b"
@@ -110,25 +119,6 @@ function LSLHighlightRules() {
token : "comment.block.lsl",
regex : ".+"
}
- ],
- "string" : [
- {
- token : "constant.character.escape.lsl",
- regex : /\\[tn"\\]/
- },
- {
- token : "invalid.illegal.constant.character.escape.lsl",
- regex : "\\."
- },
- {
- token : "string.quoted.double.end.lsl",
- regex : /"/,
- next : "start"
- },
- {
- token : "string.quoted.double.lsl",
- regex : ".+"
- }
]
};
this.normalizeRules();
From d03c0957b4518e9de4639a23876882afba152fe5 Mon Sep 17 00:00:00 2001
From: Builders Brewery
Date: Wed, 19 Mar 2014 17:03:03 +0100
Subject: [PATCH 74/83] fix character escapes
---
lib/ace/mode/lsl_highlight_rules.js | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/lib/ace/mode/lsl_highlight_rules.js b/lib/ace/mode/lsl_highlight_rules.js
index 45ac1696..5de4d017 100644
--- a/lib/ace/mode/lsl_highlight_rules.js
+++ b/lib/ace/mode/lsl_highlight_rules.js
@@ -69,15 +69,10 @@ function LSLHighlightRules() {
token : "string.quoted.double.lsl",
start : '"',
end : '"',
- next : [
- {
- token : "constant.language.escape.lsl",
- regex : /\\[tn"\\]/
- }, {
- token : "invalid.illegal.constant.character.escape.lsl",
- regex : "\\."
- }
- ]
+ next : [{
+ token : "constant.character.escape.lsl",
+ regex : /\\[tn"\\]/
+ }]
}, {
token : "constant.numeric.lsl",
regex : "(0[xX][0-9a-fA-F]+|[+-]?[0-9]+(?:(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?)?)\\b"
From 31a32f2659d6e3fab85135d8993876e593174c1d Mon Sep 17 00:00:00 2001
From: Zef Hemel
Date: Thu, 20 Mar 2014 15:27:51 +0100
Subject: [PATCH 75/83] Fixes asynchronous autocompleter prefix updating Before
it could happen (if an async autocompleter returned late) that the prefix
used in the autocomplete was out of date. This fixes that.
---
lib/ace/autocomplete.js | 33 ++++++++++++++++++---------------
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/lib/ace/autocomplete.js b/lib/ace/autocomplete.js
index b243727f..e14b1da7 100644
--- a/lib/ace/autocomplete.js
+++ b/lib/ace/autocomplete.js
@@ -47,7 +47,7 @@ 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))
@@ -74,10 +74,10 @@ var Autocomplete = function() {
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 +94,7 @@ var Autocomplete = function() {
this.editor.off("mousedown", this.mousedownListener);
this.editor.off("mousewheel", this.mousewheelListener);
this.changeTimer.cancel();
-
+
if (this.popup)
this.popup.hide();
@@ -182,10 +182,10 @@ 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;
@@ -197,8 +197,11 @@ var Autocomplete = function() {
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,
+ prefix: util.retrievePrecedingIdentifier(line, pos.column),
matches: matches
});
});
@@ -208,7 +211,7 @@ var Autocomplete = function() {
this.showPopup = function(editor) {
if (this.editor)
this.detach();
-
+
this.activated = true;
this.editor = editor;
@@ -223,10 +226,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();
@@ -243,7 +246,7 @@ var Autocomplete = function() {
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]);
@@ -299,16 +302,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) {
From 750e53fab237fabc6e45a1597dc6dcb6b643e859 Mon Sep 17 00:00:00 2001
From: Zef Hemel
Date: Thu, 20 Mar 2014 15:31:02 +0100
Subject: [PATCH 76/83] Now with space after the if
---
lib/ace/autocomplete.js | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/lib/ace/autocomplete.js b/lib/ace/autocomplete.js
index 155ffd0d..1086c3d9 100644
--- a/lib/ace/autocomplete.js
+++ b/lib/ace/autocomplete.js
@@ -48,7 +48,7 @@ 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))
@@ -75,10 +75,10 @@ var Autocomplete = function() {
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;
@@ -95,7 +95,7 @@ var Autocomplete = function() {
this.editor.off("mousedown", this.mousedownListener);
this.editor.off("mousewheel", this.mousewheelListener);
this.changeTimer.cancel();
-
+
if (this.popup)
this.popup.hide();
@@ -173,7 +173,7 @@ var Autocomplete = function() {
"Esc": function(editor) { editor.completer.detach(); },
"Space": function(editor) { editor.completer.detach(); editor.insert(" ");},
"Return": function(editor) {
- if(editor.completer.popup.getRow() > -1) {
+ if (editor.completer.popup.getRow() > -1) {
editor.completer.insertMatch();
} else {
editor.insert("\n");
@@ -189,10 +189,10 @@ 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;
@@ -215,7 +215,7 @@ var Autocomplete = function() {
this.showPopup = function(editor) {
if (this.editor)
this.detach();
-
+
this.activated = true;
this.editor = editor;
@@ -230,10 +230,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();
@@ -250,7 +250,7 @@ var Autocomplete = function() {
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]);
@@ -306,16 +306,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) {
From 00305167a2d1702155135417a44acb330d57bc1a Mon Sep 17 00:00:00 2001
From: Zef Hemel
Date: Sat, 22 Mar 2014 17:46:26 +0100
Subject: [PATCH 77/83] Make they Ctrl/Alt/Command-= and - key combos work (on
Chrome).
---
lib/ace/lib/keys.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/ace/lib/keys.js b/lib/ace/lib/keys.js
index 78cede51..bd68b4c1 100644
--- a/lib/ace/lib/keys.js
+++ b/lib/ace/lib/keys.js
@@ -103,7 +103,7 @@ var Keys = (function() {
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: '\''
+ 221: ']', 222: '\'', 187: '=', 189: '-'
}
};
@@ -130,10 +130,10 @@ 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--;) {
From 372b5409faa34378380f01f57353eedbfd904d03 Mon Sep 17 00:00:00 2001
From: Zef Hemel
Date: Sat, 22 Mar 2014 17:51:02 +0100
Subject: [PATCH 78/83] Reordered keys
---
lib/ace/lib/keys.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/ace/lib/keys.js b/lib/ace/lib/keys.js
index bd68b4c1..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: '=', 189: '-'
+ 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`', 219: '[',
+ 220: '\\',221: ']', 222: '\'',
}
};
From 79f619364a15b230e1d2afbfae84ce7bdbd04d9a Mon Sep 17 00:00:00 2001
From: nightwing
Date: Sun, 23 Mar 2014 15:19:24 +0400
Subject: [PATCH 79/83] clenup
---
lib/ace/autocomplete.js | 11 ++++-------
lib/ace/tokenizer.js | 1 -
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/lib/ace/autocomplete.js b/lib/ace/autocomplete.js
index 35c5aaa8..f3800c16 100644
--- a/lib/ace/autocomplete.js
+++ b/lib/ace/autocomplete.js
@@ -181,11 +181,9 @@ var Autocomplete = function() {
"Esc": function(editor) { editor.completer.detach(); },
"Space": function(editor) { editor.completer.detach(); editor.insert(" ");},
"Return": function(editor) {
- if (editor.completer.popup.getRow() > -1) {
- editor.completer.insertMatch();
- } else {
- editor.insert("\n");
- }
+ 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(); },
@@ -290,8 +288,7 @@ var Autocomplete = function() {
return doDetach();
// Wrong prefix or wrong session -> ignore
- if (prefix.indexOf(results.prefix) != 0
- || _id != this.gatherCompletionsId)
+ if (prefix.indexOf(results.prefix) != 0 || _id != this.gatherCompletionsId)
return;
this.completions = new FilteredList(matches);
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) {
From 180fa0c4cb12344e5f4c8155671f1227d3f166fb Mon Sep 17 00:00:00 2001
From: Adam Jimenez
Date: Mon, 5 Aug 2013 14:33:49 +0100
Subject: [PATCH 80/83] Beautify
Beautify based on Ace tokenizer
---
demo/kitchen-sink/demo.js | 3 +
lib/ace/ext/beautify.js | 376 ++++++++++++++++++++++++++++++++++++++
2 files changed, 379 insertions(+)
create mode 100644 lib/ace/ext/beautify.js
diff --git a/demo/kitchen-sink/demo.js b/demo/kitchen-sink/demo.js
index 52f71d20..cf680b53 100644
--- a/demo/kitchen-sink/demo.js
+++ b/demo/kitchen-sink/demo.js
@@ -596,4 +596,7 @@ env.editor.setOptions({
enableSnippets: true
});
+var beautify = require("ace/ext/beautify");
+env.editor.commands.addCommands(beautify.commands);
+
});
diff --git a/lib/ace/ext/beautify.js b/lib/ace/ext/beautify.js
new file mode 100644
index 00000000..e44f1758
--- /dev/null
+++ b/lib/ace/ext/beautify.js
@@ -0,0 +1,376 @@
+/* ***** 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.beautify = function(editor) {
+ var session = editor.session;
+
+ var iterator = new TokenIterator(session, 0, 0);
+ var token = iterator.getCurrentToken();
+
+ var context = session.$modeId.split("/").pop();
+
+ //console.log(token);
+
+ var code = '';
+
+ var 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: ';'
+ }];
+
+ var 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
+ }];
+
+ var single_tags = ['!doctype','area','base','br','hr','input','img','link','meta'];
+ 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 ||
+ single_tags.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 ||
+ single_tags.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;
+ }
+ }
+
+ session.getDocument().setValue(code);
+};
+
+exports.commands = [{
+ name: "beautify",
+ exec: function(editor) {
+ exports.beautify(editor);
+ },
+ bindKey: "Alt-Shift-F"
+}]
+
+});
\ No newline at end of file
From ef3262143a00a9fa265a305a5a6a88cc45bc733e Mon Sep 17 00:00:00 2001
From: nightwing
Date: Fri, 16 Aug 2013 00:28:14 +0400
Subject: [PATCH 81/83] reorganize beautifier addon
---
lib/ace/ext/beautify.js | 341 +---------------------------
lib/ace/ext/beautify/php_rules.js | 366 ++++++++++++++++++++++++++++++
2 files changed, 377 insertions(+), 330 deletions(-)
create mode 100644 lib/ace/ext/beautify/php_rules.js
diff --git a/lib/ace/ext/beautify.js b/lib/ace/ext/beautify.js
index e44f1758..d0fa1799 100644
--- a/lib/ace/ext/beautify.js
+++ b/lib/ace/ext/beautify.js
@@ -28,349 +28,30 @@
*
* ***** END LICENSE BLOCK ***** */
+// [WIP]
+
define(function(require, exports, module) {
"use strict";
var TokenIterator = require("ace/token_iterator").TokenIterator;
-exports.beautify = function(editor) {
- var session = editor.session;
-
- var iterator = new TokenIterator(session, 0, 0);
+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();
- //console.log(token);
+ var context = session.$modeId.split("/").pop();
- var code = '';
-
- var 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: ';'
- }];
-
- var 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
- }];
-
- var single_tags = ['!doctype','area','base','br','hr','input','img','link','meta'];
- 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 ||
- single_tags.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 ||
- single_tags.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;
- }
- }
-
- session.getDocument().setValue(code);
+ var code = phpTransform(iterator, context);
+ session.doc.setValue(code);
};
exports.commands = [{
name: "beautify",
exec: function(editor) {
- exports.beautify(editor);
+ exports.beautify(editor.session);
},
- bindKey: "Alt-Shift-F"
+ 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
From a4921fe7ceb3c484804ab287d75b9f77cf8a13f7 Mon Sep 17 00:00:00 2001
From: Garen Torikian
Date: Mon, 30 Sep 2013 15:41:21 -0700
Subject: [PATCH 82/83] Fix GFM blocks within lists
---
lib/ace/mode/markdown_highlight_rules.js | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/lib/ace/mode/markdown_highlight_rules.js b/lib/ace/mode/markdown_highlight_rules.js
index a7e5a105..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*\\S*(?:{.*?\\})?\\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"
}]);
From 02cf4850552a4fd81c8ccfd367e35ca0ce69b133 Mon Sep 17 00:00:00 2001
From: William Candillon
Date: Sun, 30 Mar 2014 00:55:22 +0100
Subject: [PATCH 83/83] Fix Range resolution
---
lib/ace/autocomplete/text_completer.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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
+});