Added generative testing for AST conversions.

This commit is contained in:
Ingvar Stepanyan
2014-08-03 20:48:59 +03:00
parent 5e314bf3e9
commit b467a3c877
4 changed files with 123 additions and 9 deletions

View File

@@ -303,12 +303,11 @@
});
def_to_moz(AST_ObjectProperty, function To_Moz_Property(M) {
var key;
if (is_identifier_string(M.key) && !RESERVED_WORDS(M.key)) {
key = {type: "Identifier", name: M.key};
} else {
key = {type: "Literal", value: M.key};
}
var key = (
is_identifier(M.key)
? {type: "Identifier", name: M.key}
: {type: "Literal", value: M.key}
);
var kind;
if (M instanceof AST_ObjectKeyVal) {
kind = "init";