preserve whether an object property is quoted in mozilla-ast.js
This commit is contained in:
parent
ea999b0e92
commit
452e9751ee
|
|
@ -137,7 +137,12 @@
|
|||
end : my_end_token(M),
|
||||
properties : M.properties.map(function(prop) {
|
||||
prop.type = "Property";
|
||||
return from_moz(prop)
|
||||
var ret = from_moz(prop);
|
||||
if (prop.key.type === "Literal" &&
|
||||
(prop.key.raw[0] === '"' || prop.key.raw[0] === "'")) {
|
||||
ret.quote = true;
|
||||
}
|
||||
return ret;
|
||||
})
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user