commit
34b2e292c7
25 changed files with 83 additions and 83 deletions
2
build
2
build
|
|
@ -1 +1 @@
|
||||||
Subproject commit c2f3abb2ecd3287f90225d804132f0fd26cfb639
|
Subproject commit 6149ca6b148e878d4c1341d4675ca3597d78dbdd
|
||||||
|
|
@ -683,6 +683,7 @@ function Folding() {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.onFoldWidgetClick = function(row, e) {
|
this.onFoldWidgetClick = function(row, e) {
|
||||||
|
e = e.domEvent;
|
||||||
var type = this.getFoldWidget(row);
|
var type = this.getFoldWidget(row);
|
||||||
var line = this.getLine(row);
|
var line = this.getLine(row);
|
||||||
var onlySubfolds = e.shiftKey;
|
var onlySubfolds = e.shiftKey;
|
||||||
|
|
|
||||||
|
|
@ -304,76 +304,76 @@ var inputBuffer = exports.inputBuffer = {
|
||||||
|
|
||||||
lastInsertCommands: [],
|
lastInsertCommands: [],
|
||||||
|
|
||||||
push: function(editor, char, keyId) {
|
push: function(editor, ch, keyId) {
|
||||||
this.idle = false;
|
this.idle = false;
|
||||||
var wObj = this.waitingForParam;
|
var wObj = this.waitingForParam;
|
||||||
if (wObj) {
|
if (wObj) {
|
||||||
this.exec(editor, wObj, char);
|
this.exec(editor, wObj, ch);
|
||||||
}
|
}
|
||||||
// If input is a number (that doesn't start with 0)
|
// If input is a number (that doesn't start with 0)
|
||||||
else if (!(char === "0" && !this.currentCount.length) &&
|
else if (!(ch === "0" && !this.currentCount.length) &&
|
||||||
(char.match(/^\d+$/) && this.isAccepting(NUMBER))) {
|
(ch.match(/^\d+$/) && this.isAccepting(NUMBER))) {
|
||||||
// Assuming that char is always of type String, and not Number
|
// Assuming that ch is always of type String, and not Number
|
||||||
this.currentCount += char;
|
this.currentCount += ch;
|
||||||
this.currentCmd = NUMBER;
|
this.currentCmd = NUMBER;
|
||||||
this.accepting = [NUMBER, OPERATOR, MOTION, ACTION];
|
this.accepting = [NUMBER, OPERATOR, MOTION, ACTION];
|
||||||
}
|
}
|
||||||
else if (!this.operator && this.isAccepting(OPERATOR) && operators[char]) {
|
else if (!this.operator && this.isAccepting(OPERATOR) && operators[ch]) {
|
||||||
this.operator = {
|
this.operator = {
|
||||||
char: char,
|
ch: ch,
|
||||||
count: this.getCount()
|
count: this.getCount()
|
||||||
};
|
};
|
||||||
this.currentCmd = OPERATOR;
|
this.currentCmd = OPERATOR;
|
||||||
this.accepting = [NUMBER, MOTION, ACTION];
|
this.accepting = [NUMBER, MOTION, ACTION];
|
||||||
this.exec(editor, { operator: this.operator });
|
this.exec(editor, { operator: this.operator });
|
||||||
}
|
}
|
||||||
else if (motions[char] && this.isAccepting(MOTION)) {
|
else if (motions[ch] && this.isAccepting(MOTION)) {
|
||||||
this.currentCmd = MOTION;
|
this.currentCmd = MOTION;
|
||||||
|
|
||||||
var ctx = {
|
var ctx = {
|
||||||
operator: this.operator,
|
operator: this.operator,
|
||||||
motion: {
|
motion: {
|
||||||
char: char,
|
ch: ch,
|
||||||
count: this.getCount()
|
count: this.getCount()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (motions[char].param)
|
if (motions[ch].param)
|
||||||
this.waitForParam(ctx);
|
this.waitForParam(ctx);
|
||||||
else
|
else
|
||||||
this.exec(editor, ctx);
|
this.exec(editor, ctx);
|
||||||
}
|
}
|
||||||
else if (alias[char] && this.isAccepting(MOTION)) {
|
else if (alias[ch] && this.isAccepting(MOTION)) {
|
||||||
alias[char].operator.count = this.getCount();
|
alias[ch].operator.count = this.getCount();
|
||||||
this.exec(editor, alias[char]);
|
this.exec(editor, alias[ch]);
|
||||||
}
|
}
|
||||||
else if (actions[char] && this.isAccepting(ACTION)) {
|
else if (actions[ch] && this.isAccepting(ACTION)) {
|
||||||
var actionObj = {
|
var actionObj = {
|
||||||
action: {
|
action: {
|
||||||
fn: actions[char].fn,
|
fn: actions[ch].fn,
|
||||||
count: this.getCount()
|
count: this.getCount()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (actions[char].param) {
|
if (actions[ch].param) {
|
||||||
this.waitForParam(actionObj);
|
this.waitForParam(actionObj);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.exec(editor, actionObj);
|
this.exec(editor, actionObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actions[char].acceptsMotion)
|
if (actions[ch].acceptsMotion)
|
||||||
this.idle = false;
|
this.idle = false;
|
||||||
}
|
}
|
||||||
else if (this.operator) {
|
else if (this.operator) {
|
||||||
this.exec(editor, { operator: this.operator }, char);
|
this.exec(editor, { operator: this.operator }, ch);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.reset();
|
this.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.waitingForParam || this.motion || this.operator) {
|
if (this.waitingForParam || this.motion || this.operator) {
|
||||||
this.status += char;
|
this.status += ch;
|
||||||
} else if (this.currentCount) {
|
} else if (this.currentCount) {
|
||||||
this.status = this.currentCount;
|
this.status = this.currentCount;
|
||||||
} else if (this.status) {
|
} else if (this.status) {
|
||||||
|
|
@ -410,18 +410,18 @@ var inputBuffer = exports.inputBuffer = {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (o && !editor.selection.isEmpty()) {
|
if (o && !editor.selection.isEmpty()) {
|
||||||
if (operators[o.char].selFn) {
|
if (operators[o.ch].selFn) {
|
||||||
operators[o.char].selFn(editor, editor.getSelectionRange(), o.count, param);
|
operators[o.ch].selFn(editor, editor.getSelectionRange(), o.count, param);
|
||||||
this.reset();
|
this.reset();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// There is an operator, but no motion or action. We try to pass the
|
// There is an operator, but no motion or action. We try to pass the
|
||||||
// current char to the operator to see if it responds to it (an example
|
// current ch to the operator to see if it responds to it (an example
|
||||||
// of this is the 'dd' operator).
|
// of this is the 'dd' operator).
|
||||||
else if (!m && !a && o && param) {
|
else if (!m && !a && o && param) {
|
||||||
operators[o.char].fn(editor, null, o.count, param);
|
operators[o.ch].fn(editor, null, o.count, param);
|
||||||
this.reset();
|
this.reset();
|
||||||
}
|
}
|
||||||
else if (m) {
|
else if (m) {
|
||||||
|
|
@ -434,7 +434,7 @@ var inputBuffer = exports.inputBuffer = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var motionObj = motions[m.char];
|
var motionObj = motions[m.ch];
|
||||||
var selectable = motionObj.sel;
|
var selectable = motionObj.sel;
|
||||||
|
|
||||||
if (!o) {
|
if (!o) {
|
||||||
|
|
@ -446,7 +446,7 @@ var inputBuffer = exports.inputBuffer = {
|
||||||
else if (selectable) {
|
else if (selectable) {
|
||||||
repeat(function() {
|
repeat(function() {
|
||||||
run(motionObj.sel);
|
run(motionObj.sel);
|
||||||
operators[o.char].fn(editor, editor.getSelectionRange(), o.count, param);
|
operators[o.ch].fn(editor, editor.getSelectionRange(), o.count, param);
|
||||||
}, o.count || 1);
|
}, o.count || 1);
|
||||||
}
|
}
|
||||||
this.reset();
|
this.reset();
|
||||||
|
|
|
||||||
|
|
@ -34,57 +34,57 @@ define(function(require, exports, module) {
|
||||||
module.exports = {
|
module.exports = {
|
||||||
"x": {
|
"x": {
|
||||||
operator: {
|
operator: {
|
||||||
char: "d",
|
ch: "d",
|
||||||
count: 1
|
count: 1
|
||||||
},
|
},
|
||||||
motion: {
|
motion: {
|
||||||
char: "l",
|
ch: "l",
|
||||||
count: 1
|
count: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"X": {
|
"X": {
|
||||||
operator: {
|
operator: {
|
||||||
char: "d",
|
ch: "d",
|
||||||
count: 1
|
count: 1
|
||||||
},
|
},
|
||||||
motion: {
|
motion: {
|
||||||
char: "h",
|
ch: "h",
|
||||||
count: 1
|
count: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"D": {
|
"D": {
|
||||||
operator: {
|
operator: {
|
||||||
char: "d",
|
ch: "d",
|
||||||
count: 1
|
count: 1
|
||||||
},
|
},
|
||||||
motion: {
|
motion: {
|
||||||
char: "$",
|
ch: "$",
|
||||||
count: 1
|
count: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"C": {
|
"C": {
|
||||||
operator: {
|
operator: {
|
||||||
char: "c",
|
ch: "c",
|
||||||
count: 1
|
count: 1
|
||||||
},
|
},
|
||||||
motion: {
|
motion: {
|
||||||
char: "$",
|
ch: "$",
|
||||||
count: 1
|
count: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"s": {
|
"s": {
|
||||||
operator: {
|
operator: {
|
||||||
char: "c",
|
ch: "c",
|
||||||
count: 1
|
count: 1
|
||||||
},
|
},
|
||||||
motion: {
|
motion: {
|
||||||
char: "l",
|
ch: "l",
|
||||||
count: 1
|
count: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"S": {
|
"S": {
|
||||||
operator: {
|
operator: {
|
||||||
char: "c",
|
ch: "c",
|
||||||
count: 1
|
count: 1
|
||||||
},
|
},
|
||||||
param: "c"
|
param: "c"
|
||||||
|
|
|
||||||
|
|
@ -580,7 +580,7 @@ module.exports = {
|
||||||
sel: function(editor, range, count, param) {
|
sel: function(editor, range, count, param) {
|
||||||
keepScrollPosition(editor, editor.selectPageUp);
|
keepScrollPosition(editor, editor.selectPageUp);
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports.backspace = module.exports.left = module.exports.h;
|
module.exports.backspace = module.exports.left = module.exports.h;
|
||||||
|
|
|
||||||
|
|
@ -99,24 +99,24 @@ module.exports = {
|
||||||
this.onVisualLineMode = false;
|
this.onVisualLineMode = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getRightNthChar: function(editor, cursor, char, n) {
|
getRightNthChar: function(editor, cursor, ch, n) {
|
||||||
var line = editor.getSession().getLine(cursor.row);
|
var line = editor.getSession().getLine(cursor.row);
|
||||||
var matches = line.substr(cursor.column + 1).split(char);
|
var matches = line.substr(cursor.column + 1).split(ch);
|
||||||
|
|
||||||
return n < matches.length ? matches.slice(0, n).join(char).length : null;
|
return n < matches.length ? matches.slice(0, n).join(ch).length : null;
|
||||||
},
|
},
|
||||||
getLeftNthChar: function(editor, cursor, char, n) {
|
getLeftNthChar: function(editor, cursor, ch, n) {
|
||||||
var line = editor.getSession().getLine(cursor.row);
|
var line = editor.getSession().getLine(cursor.row);
|
||||||
var matches = line.substr(0, cursor.column).split(char);
|
var matches = line.substr(0, cursor.column).split(ch);
|
||||||
|
|
||||||
return n < matches.length ? matches.slice(-1 * n).join(char).length : null;
|
return n < matches.length ? matches.slice(-1 * n).join(ch).length : null;
|
||||||
},
|
},
|
||||||
toRealChar: function(char) {
|
toRealChar: function(ch) {
|
||||||
if (char.length === 1)
|
if (ch.length === 1)
|
||||||
return char;
|
return ch;
|
||||||
|
|
||||||
if (/^shift-./.test(char))
|
if (/^shift-./.test(ch))
|
||||||
return char[char.length - 1].toUpperCase();
|
return ch[ch.length - 1].toUpperCase();
|
||||||
else
|
else
|
||||||
return "";
|
return "";
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -58,11 +58,11 @@ var ColdfusionHighlightRules = function() {
|
||||||
next : "comment"
|
next : "comment"
|
||||||
}, {
|
}, {
|
||||||
token : "meta.tag",
|
token : "meta.tag",
|
||||||
regex : "<(?=\s*script)",
|
regex : "<(?=script)",
|
||||||
next : "script"
|
next : "script"
|
||||||
}, {
|
}, {
|
||||||
token : "meta.tag",
|
token : "meta.tag",
|
||||||
regex : "<(?=\s*style)",
|
regex : "<(?=style)",
|
||||||
next : "style"
|
next : "style"
|
||||||
}, {
|
}, {
|
||||||
token : "meta.tag", // opening tag
|
token : "meta.tag", // opening tag
|
||||||
|
|
|
||||||
|
|
@ -74,14 +74,14 @@ var DiffHighlightRules = function() {
|
||||||
"support.constant",
|
"support.constant",
|
||||||
"text",
|
"text",
|
||||||
"invalid"
|
"invalid"
|
||||||
],
|
]
|
||||||
}, { // removed
|
}, { // removed
|
||||||
"regex": "^([<\\-])(.*?)(\\s*)$",
|
"regex": "^([<\\-])(.*?)(\\s*)$",
|
||||||
"token": [
|
"token": [
|
||||||
"support.function",
|
"support.function",
|
||||||
"string",
|
"string",
|
||||||
"invalid"
|
"invalid"
|
||||||
],
|
]
|
||||||
}, {
|
}, {
|
||||||
"regex": "^(diff)(\\s+--\\w+)?(.+?)( .+)?$",
|
"regex": "^(diff)(\\s+--\\w+)?(.+?)( .+)?$",
|
||||||
"token": ["variable", "variable", "keyword", "variable"]
|
"token": ["variable", "variable", "keyword", "variable"]
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ module.exports = {
|
||||||
']',
|
']',
|
||||||
'[ ',
|
'[ ',
|
||||||
'{ ',
|
'{ ',
|
||||||
'[ #-',
|
'[ #-'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
var mode = new PythonMode();
|
var mode = new PythonMode();
|
||||||
|
|
|
||||||
|
|
@ -80,11 +80,11 @@ var HtmlHighlightRules = function() {
|
||||||
regex : "<\\!.*?>"
|
regex : "<\\!.*?>"
|
||||||
}, {
|
}, {
|
||||||
token : "meta.tag",
|
token : "meta.tag",
|
||||||
regex : "<(?=\s*script\\b)",
|
regex : "<(?=script\\b)",
|
||||||
next : "script"
|
next : "script"
|
||||||
}, {
|
}, {
|
||||||
token : "meta.tag",
|
token : "meta.tag",
|
||||||
regex : "<(?=\s*style\\b)",
|
regex : "<(?=style\\b)",
|
||||||
next : "style"
|
next : "style"
|
||||||
}, {
|
}, {
|
||||||
token : "meta.tag", // opening tag
|
token : "meta.tag", // opening tag
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ var JadeHighlightRules = function() {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"token" : "punctuation.section.comment",
|
"token" : "punctuation.section.comment",
|
||||||
"regex" : "^\\s*\/\/(?:\\s*[^-\\s]|\\s+\\S)(?:.*$)",
|
"regex" : "^\\s*\/\/(?:\\s*[^-\\s]|\\s+\\S)(?:.*$)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"token" : function(space, text) {
|
"token" : function(space, text) {
|
||||||
|
|
|
||||||
|
|
@ -55,8 +55,7 @@ var JavaHighlightRules = function() {
|
||||||
"variable.language": "this",
|
"variable.language": "this",
|
||||||
"keyword": keywords,
|
"keyword": keywords,
|
||||||
"constant.language": buildinConstants,
|
"constant.language": buildinConstants,
|
||||||
"support.function": langClasses,
|
"support.function": langClasses
|
||||||
|
|
||||||
}, "identifier");
|
}, "identifier");
|
||||||
|
|
||||||
// regexp must not have capturing parentheses. Use (?:) instead.
|
// regexp must not have capturing parentheses. Use (?:) instead.
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,7 @@ var JavaScriptHighlightRules = function() {
|
||||||
merge: true
|
merge: true
|
||||||
}, {
|
}, {
|
||||||
token: "constant.language.escape",
|
token: "constant.language.escape",
|
||||||
regex: "-",
|
regex: "-"
|
||||||
}, {
|
}, {
|
||||||
token: "string.regexp.charachterclass",
|
token: "string.regexp.charachterclass",
|
||||||
regex: /[^\]\-\\]+/,
|
regex: /[^\]\-\\]+/,
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ var LatexHighlightRules = function() {
|
||||||
"start" : [{
|
"start" : [{
|
||||||
// A tex command e.g. \foo
|
// A tex command e.g. \foo
|
||||||
token : "keyword",
|
token : "keyword",
|
||||||
regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)",
|
regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
|
||||||
}, {
|
}, {
|
||||||
// Curly and square braces
|
// Curly and square braces
|
||||||
token : "lparen",
|
token : "lparen",
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ oop.inherits(Mode, TextMode);
|
||||||
"elseif": 1,
|
"elseif": 1,
|
||||||
"repeat": 1,
|
"repeat": 1,
|
||||||
"end": -1,
|
"end": -1,
|
||||||
"until": -1,
|
"until": -1
|
||||||
};
|
};
|
||||||
var outdentKeywords = [
|
var outdentKeywords = [
|
||||||
"else",
|
"else",
|
||||||
|
|
|
||||||
|
|
@ -404,7 +404,7 @@ var PgsqlHighlightRules = function() {
|
||||||
|
|
||||||
var keywordMapper = this.createKeywordMapper({
|
var keywordMapper = this.createKeywordMapper({
|
||||||
"support.function": builtinFunctions,
|
"support.function": builtinFunctions,
|
||||||
"keyword": keywords,
|
"keyword": keywords
|
||||||
}, "identifier", true);
|
}, "identifier", true);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -122,11 +122,11 @@ var RubyHighlightRules = function() {
|
||||||
token : "text", // namespaces aren't symbols
|
token : "text", // namespaces aren't symbols
|
||||||
regex : "::"
|
regex : "::"
|
||||||
}, {
|
}, {
|
||||||
token : "variable.instancce", // instance variable
|
token : "variable.instance", // instance variable
|
||||||
regex : "@{1,2}(?:[a-zA-Z_]|\d)+"
|
regex : "@{1,2}[a-zA-Z_\\d]+"
|
||||||
}, {
|
}, {
|
||||||
token : "variable.class", // class name
|
token : "variable.class", // class name
|
||||||
regex : "[A-Z](?:[a-zA-Z_]|\d)+"
|
regex : "[A-Z][a-zA-Z_\\d]+"
|
||||||
}, {
|
}, {
|
||||||
token : "string", // symbol
|
token : "string", // symbol
|
||||||
regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
|
regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ var scadHighlightRules = function() {
|
||||||
var keywordMapper = this.createKeywordMapper({
|
var keywordMapper = this.createKeywordMapper({
|
||||||
"variable.language": "this",
|
"variable.language": "this",
|
||||||
"keyword": "module|if|else|for",
|
"keyword": "module|if|else|for",
|
||||||
"constant.language": "NULL",
|
"constant.language": "NULL"
|
||||||
}, "identifier");
|
}, "identifier");
|
||||||
|
|
||||||
// regexp must not have capturing parentheses. Use (?:) instead.
|
// regexp must not have capturing parentheses. Use (?:) instead.
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ var ScalaHighlightRules = function() {
|
||||||
"string" : [
|
"string" : [
|
||||||
{
|
{
|
||||||
token : "escape",
|
token : "escape",
|
||||||
regex : '\\\\"',
|
regex : '\\\\"'
|
||||||
}, {
|
}, {
|
||||||
token : "string",
|
token : "string",
|
||||||
merge : true,
|
merge : true,
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ var ShHighlightRules = function() {
|
||||||
regex : variable
|
regex : variable
|
||||||
}, {
|
}, {
|
||||||
token : "support.function",
|
token : "support.function",
|
||||||
regex : func,
|
regex : func
|
||||||
}, {
|
}, {
|
||||||
token : "support.function",
|
token : "support.function",
|
||||||
regex : fileDescriptor
|
regex : fileDescriptor
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ var SvgHighlightRules = function() {
|
||||||
|
|
||||||
this.$rules.start.splice(3, 0, {
|
this.$rules.start.splice(3, 0, {
|
||||||
token : "meta.tag",
|
token : "meta.tag",
|
||||||
regex : "<(?=\s*script)",
|
regex : "<(?=script)",
|
||||||
next : "script"
|
next : "script"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -150,16 +150,16 @@ var TclHighlightRules = function() {
|
||||||
}],
|
}],
|
||||||
"variable" : [
|
"variable" : [
|
||||||
{
|
{
|
||||||
token : "variable.instancce", // variable xotcl with braces
|
token : "variable.instance", // variable xotcl with braces
|
||||||
regex : "(?:[:][:])?(?:[a-zA-Z_]|\d)+(?:(?:[:][:])?(?:[a-zA-Z_]|\d)+)?(?:[(](?:[a-zA-Z_]|\d)+[)])?",
|
regex : "(?:[:][:])?[a-zA-Z_\\d]+(?:(?:[:][:])?[a-zA-Z_\\d]+)?(?:[(][a-zA-Z_\\d]+[)])?",
|
||||||
next : "start"
|
next : "start"
|
||||||
}, {
|
}, {
|
||||||
token : "variable.instancce", // variable tcl
|
token : "variable.instance", // variable tcl
|
||||||
regex : "(?:[a-zA-Z_]|\d)+(?:[(](?:[a-zA-Z_]|\d)+[)])?",
|
regex : "[a-zA-Z_\\d]+(?:[(][a-zA-Z_\\d]+[)])?",
|
||||||
next : "start"
|
next : "start"
|
||||||
}, {
|
}, {
|
||||||
token : "variable.instancce", // variable tcl with braces
|
token : "variable.instance", // variable tcl with braces
|
||||||
regex : "{?(?:[a-zA-Z_]|\d)+}?",
|
regex : "{?[a-zA-Z_\\d]+}?",
|
||||||
next : "start"
|
next : "start"
|
||||||
}],
|
}],
|
||||||
"qqstring" : [ {
|
"qqstring" : [ {
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ module.exports = {
|
||||||
"test: configure the search object" : function() {
|
"test: configure the search object" : function() {
|
||||||
var search = new Search();
|
var search = new Search();
|
||||||
search.set({
|
search.set({
|
||||||
needle: "juhu",
|
needle: "juhu"
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -397,7 +397,7 @@ module.exports = {
|
||||||
var search = new Search().set({
|
var search = new Search().set({
|
||||||
needle: "[ ]+$",
|
needle: "[ ]+$",
|
||||||
regExp: true,
|
regExp: true,
|
||||||
wrap: true,
|
wrap: true
|
||||||
});
|
});
|
||||||
|
|
||||||
session.getSelection().moveCursorTo(1, 2);
|
session.getSelection().moveCursorTo(1, 2);
|
||||||
|
|
@ -414,7 +414,7 @@ module.exports = {
|
||||||
var search = new Search().set({
|
var search = new Search().set({
|
||||||
needle: "foo",
|
needle: "foo",
|
||||||
wrap: true,
|
wrap: true,
|
||||||
wholeWord: true,
|
wholeWord: true
|
||||||
});
|
});
|
||||||
|
|
||||||
session.getSelection().moveCursorTo(0, 4);
|
session.getSelection().moveCursorTo(0, 4);
|
||||||
|
|
@ -437,7 +437,7 @@ module.exports = {
|
||||||
needle: "foo",
|
needle: "foo",
|
||||||
wrap: true,
|
wrap: true,
|
||||||
wholeWord: true,
|
wholeWord: true,
|
||||||
backwards: true,
|
backwards: true
|
||||||
});
|
});
|
||||||
|
|
||||||
session.getSelection().moveCursorTo(0, 13);
|
session.getSelection().moveCursorTo(0, 13);
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,7 @@ module.exports = {
|
||||||
assert.equal(iterator.getCurrentToken().value, "for");
|
assert.equal(iterator.getCurrentToken().value, "for");
|
||||||
assert.equal(iterator.getCurrentTokenRow(), 1);
|
assert.equal(iterator.getCurrentTokenRow(), 1);
|
||||||
assert.equal(iterator.getCurrentTokenColumn(), 4);
|
assert.equal(iterator.getCurrentTokenColumn(), 4);
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ var Tokenizer = function(rules, flag) {
|
||||||
var token = {
|
var token = {
|
||||||
type: null,
|
type: null,
|
||||||
value: "",
|
value: "",
|
||||||
state: currentState,
|
state: currentState
|
||||||
};
|
};
|
||||||
initState();
|
initState();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue