function createObjectLiteralForDescriptor(descr) {
  let propertyNameAndValues = Object.keys(descr).map(function(name) {
    let value = descr[name];
    if (!(value instanceof ParseTree))
      value = createBooleanLiteral(!!value);
    return createPropertyNameAssignment(name, value);
  });
  return createObjectLiteral(propertyNameAndValues);
}
Creates an object literal tree representing a property descriptor.
@param {Object} descr This is a normal js object. The values in the descr
    may be true, false or a ParseTree.
@return {ObjectLiteral}