From 9af2bbffde2653237b36a06b005209be9f6cc1e6 Mon Sep 17 00:00:00 2001 From: Justin Lau Date: Mon, 6 May 2013 02:45:41 +0800 Subject: Fixed dot properties not optimizing unicode identifiers. Signed-off-by: Justin Lau --- lib/parse.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/parse.js') diff --git a/lib/parse.js b/lib/parse.js index da39b5b1..b3687201 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -167,6 +167,14 @@ function is_identifier_char(ch) { ; }; +function is_identifier_string(str){ + for (var i = str.length; --i >= 0;) { + if (!is_identifier_char(str.charAt(i))) + return false; + } + return true; +}; + function parse_js_number(num) { if (RE_HEX_NUMBER.test(num)) { return parseInt(num.substr(2), 16); -- cgit v1.2.3