Allow highlighting parens with a diff color via .ace_paren style.

This commit is contained in:
Irakli Gozalishvili 2011-09-08 12:33:45 +02:00
commit 4f482437d7
14 changed files with 32 additions and 32 deletions

View file

@ -121,10 +121,10 @@ var c_cppHighlightRules = function() {
token : "keyword.operator",
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
}, {
token : "lparen",
token : "paren.lparen",
regex : "[[({]"
}, {
token : "rparen",
token : "paren.rparen",
regex : "[\\])}]"
}, {
token : "text",

View file

@ -127,10 +127,10 @@ define(function(require, exports, module) {
token : "comment",
regex : "#.*"
}, {
token : "lparen",
token : "paren.lparen",
regex : "[({[]"
}, {
token : "rparen",
token : "paren.rparen",
regex : "[\\]})]"
}, {
token : "keyword.operator",

View file

@ -67,10 +67,10 @@ var CSharpHighlightRules = function() {
token : "keyword.operator",
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
}, {
token : "lparen",
token : "paren.lparen",
regex : "[[({]"
}, {
token : "rparen",
token : "paren.rparen",
regex : "[\\])}]"
}, {
token : "text",

View file

@ -215,14 +215,14 @@ var CssHighlightRules = function() {
var ruleset = lang.copyArray(base_ruleset);
ruleset.unshift({
token : "rparen",
token : "paren.rparen",
regex : "\\}",
next: "start"
});
var media_ruleset = lang.copyArray( base_ruleset );
media_ruleset.unshift({
token : "rparen",
token : "paren.rparen",
regex : "\\}",
next: "media"
});
@ -261,7 +261,7 @@ var CssHighlightRules = function() {
regex : "\\/\\*",
next : "comment"
}, {
token: "lparen",
token: "paren.lparen",
regex: "\\{",
next: "ruleset"
}, {
@ -288,7 +288,7 @@ var CssHighlightRules = function() {
regex : "\\/\\*",
next : "media_comment"
}, {
token: "lparen",
token: "paren.lparen",
regex: "\\{",
next: "media_ruleset"
},{

View file

@ -139,11 +139,11 @@ var JavaScriptHighlightRules = function() {
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
next : "regex_allowed"
}, {
token : "lparen",
token : "paren.lparen",
regex : "[[({]",
next : "regex_allowed"
}, {
token : "rparen",
token : "paren.rparen",
regex : "[\\])}]"
}, {
token : "keyword.operator",

View file

@ -67,10 +67,10 @@ var JsonHighlightRules = function() {
token : "invalid.illegal", // comments are not allowed
regex : "\\/\\/.*$"
}, {
token : "lparen",
token : "paren.lparen",
regex : "[[({]"
}, {
token : "rparen",
token : "paren.rparen",
regex : "[\\])}]"
}, {
token : "text",
@ -84,4 +84,4 @@ var JsonHighlightRules = function() {
oop.inherits(JsonHighlightRules, TextHighlightRules);
exports.JsonHighlightRules = JsonHighlightRules;
});
});

View file

@ -279,10 +279,10 @@ var LuaHighlightRules = function() {
token : "keyword.operator",
regex : "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."
}, {
token : "lparen",
token : "paren.lparen",
regex : "[\\[\\(\\{]"
}, {
token : "rparen",
token : "paren.rparen",
regex : "[\\]\\)\\}]"
}, {
token : "text",

View file

@ -309,11 +309,11 @@ var OcamlHighlightRules = function() {
regex : "\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|="
},
{
token : "lparen",
token : "paren.lparen",
regex : "[[({]"
},
{
token : "rparen",
token : "paren.rparen",
regex : "[\\])}]"
},
{

View file

@ -1004,10 +1004,10 @@ var PhpHighlightRules = function() {
token : "keyword.operator",
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
}, {
token : "lparen",
token : "paren.lparen",
regex : "[[({]"
}, {
token : "rparen",
token : "paren.rparen",
regex : "[\\])}]"
}, {
token : "text",

View file

@ -145,10 +145,10 @@ var PythonHighlightRules = function() {
token : "keyword.operator",
regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="
}, {
token : "lparen",
token : "lparen.paren",
regex : "[\\[\\(\\{]"
}, {
token : "rparen",
token : "paren.rparen",
regex : "[\\]\\)\\}]"
}, {
token : "text",
@ -178,4 +178,4 @@ var PythonHighlightRules = function() {
oop.inherits(PythonHighlightRules, TextHighlightRules);
exports.PythonHighlightRules = PythonHighlightRules;
});
});

View file

@ -163,10 +163,10 @@ var RubyHighlightRules = function() {
token : "keyword.operator",
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
}, {
token : "lparen",
token : "paren.lparen",
regex : "[[({]"
}, {
token : "rparen",
token : "paren.rparen",
regex : "[\\])}]"
}, {
token : "text",

View file

@ -112,10 +112,10 @@ var scadHighlightRules = function() {
token : "keyword.operator",
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
}, {
token : "lparen",
token : "paren.lparen",
regex : "[[({]"
}, {
token : "rparen",
token : "paren.rparen",
regex : "[\\])}]"
}, {
token : "text",

View file

@ -110,10 +110,10 @@ var ScalaHighlightRules = function() {
token : "keyword.operator",
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
}, {
token : "lparen",
token : "paren.lparen",
regex : "[[({]"
}, {
token : "rparen",
token : "paren.rparen",
regex : "[\\])}]"
}, {
token : "text",

View file

@ -310,10 +310,10 @@ var ScssHighlightRules = function() {
token : "keyword.operator",
regex : "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"
}, {
token : "lparen",
token : "paren.lparen",
regex : "[[({]"
}, {
token : "rparen",
token : "paren.rparen",
regex : "[\\])}]"
}, {
token : "text",