add highlight rules for operators

This commit is contained in:
Fabian Jakobs 2010-10-05 12:44:24 +02:00
commit abe2ee869b
2 changed files with 7 additions and 0 deletions

View file

@ -88,6 +88,9 @@ JavaScriptHighlightRules = function() {
}
},
regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b"
}, {
token : "operator",
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(in|instanceof|new|delete|typeof|void)"
}, {
token : "lparen",
regex : "[\\[\\(\\{]"

View file

@ -58,6 +58,10 @@
color: rgb(60, 76, 114);
}
.ace-tm .ace_line .ace_operator {
color: rgb(104, 118, 135);
}
.ace-tm .ace_line .ace_string {
color: rgb(3, 106, 7);
}