This commit is contained in:
Fabian Jakobs 2011-09-06 16:53:48 +02:00
commit 1041f1abe8
16 changed files with 22 additions and 15 deletions

View file

@ -16732,6 +16732,9 @@ var JavaScriptHighlightRules = function() {
"if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
"const|yield|import|get|set").split("|")
);
// keywords which can be followed by regular expressions
var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
var buildinConstants = lang.arrayToMap(
("null|Infinity|NaN|undefined").split("|")
@ -16792,6 +16795,10 @@ var JavaScriptHighlightRules = function() {
}, {
token : "constant.language.boolean",
regex : "(?:true|false)\\b"
}, {
token : "keyword",
regex : kwBeforeRe,
next : "regex_allowed"
}, {
token : function(value) {
if (value == "this")

File diff suppressed because one or more lines are too long