add more future reserved words to the JS highlighter

This commit is contained in:
Fabian Jakobs 2010-11-04 16:19:46 +01:00
commit 761209c4dd

View file

@ -27,10 +27,19 @@ JavaScriptHighlightRules = function() {
("true|false|null|undefined|Infinity|NaN|undefined").split("|")
);
// ES3 future reserved
var futureReserved = lang.arrayToMap(
("class|enum|extends|super|const|export|import|implements|let|private|" +
"public|yield|interface|package|protected|static").split("|")
("abstract|boolean|byte|char|class|const|enum|export|extends|final|" +
"float|goto|implements|int|interface|long|native|package|private|" +
"protected|short|static|super|synchronized|throws|transient|volatile" +
"double|import|public").split("|")
);
// ES5 future reserved
// var futureReserved = lang.arrayToMap(
// ("class|enum|extends|super|const|export|import|implements|let|private|" +
// "public|yield|interface|package|protected|static").split("|")
// );
// regexp must not have capturing parentheses. Use (?:) instead.
// regexps are ordered -> the first match is used