Always quote property names that contain non-ASCII characters.

Fix #328
This commit is contained in:
Mihai Bazon
2014-04-18 10:47:38 +03:00
parent 1a34a13e33
commit 8fbe200012

View File

@@ -168,14 +168,7 @@ function is_identifier_char(ch) {
};
function is_identifier_string(str){
var i = str.length;
if (i == 0) return false;
if (!is_identifier_start(str.charCodeAt(0))) return false;
while (--i >= 0) {
if (!is_identifier_char(str.charAt(i)))
return false;
}
return true;
return /^[a-z_$][a-z0-9_$]*$/i.test(str);
};
function parse_js_number(num) {