From 2d7326f1c90ae8ab8ad191b422796da9fae8dc0f Mon Sep 17 00:00:00 2001 From: Mihai Sucan Date: Fri, 18 Mar 2011 13:25:32 +0200 Subject: [PATCH] fix for a few of the es5 keywords --- lib/ace/mode/javascript_highlight_rules.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/ace/mode/javascript_highlight_rules.js b/lib/ace/mode/javascript_highlight_rules.js index e9737bd9..f5998deb 100644 --- a/lib/ace/mode/javascript_highlight_rules.js +++ b/lib/ace/mode/javascript_highlight_rules.js @@ -20,6 +20,7 @@ * * Contributor(s): * Fabian Jakobs + * Mihai Sucan * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or @@ -48,7 +49,8 @@ var JavaScriptHighlightRules = function() { var keywords = lang.arrayToMap( ("break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|var|while|with").split("|") + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" + + "const|yield|import|get|set").split("|") ); var buildinConstants = lang.arrayToMap( @@ -56,8 +58,8 @@ var JavaScriptHighlightRules = function() { ); var futureReserved = lang.arrayToMap( - ("class|enum|extends|super|const|export|import|implements|let|private|" + - "public|yield|interface|package|protected|static").split("|") + ("class|enum|extends|super|export|implements|private|" + + "public|interface|package|protected|static").split("|") ); // regexp must not have capturing parentheses. Use (?:) instead.