From 761209c4dd57a990cd6ea9d0ea8309d32a8f7331 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Thu, 4 Nov 2010 16:19:46 +0100 Subject: [PATCH] add more future reserved words to the JS highlighter --- lib/ace/mode/JavaScriptHighlightRules.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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