diff --git a/lib/ace/mode/JavaScriptHighlightRules.js b/lib/ace/mode/JavaScriptHighlightRules.js index 7274715a..5552f7f9 100644 --- a/lib/ace/mode/JavaScriptHighlightRules.js +++ b/lib/ace/mode/JavaScriptHighlightRules.js @@ -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