code: function createPropertyMap(node, defaultKey) {
  
  	var result;
  
  	if ( node != null ) {
  
  		// if, instead of an object literal only a literal is given and there is a defaultKey, then wrap the literal in a map
  		if ( node.type === Syntax.Literal && defaultKey != null ) {
  			result = {};
  			result[defaultKey] = { type: Syntax.Property, value: node };
  			return result;
  		}
  
  		if ( node.type != Syntax.ObjectExpression ) {
  			// something went wrong, it's not an object literal
  			error("not an object literal:" + node.type + ":" + node.value);
  			// console.log(node.toSource());
  			return undefined;
  		}
  
  		// invariant: node.type == Syntax.ObjectExpression
  		result = {};
  		for (var i = 0; i < node.properties.length; i++) {
  			var prop = node.properties[i];
  			//console.log("objectproperty " + prop.type);
  			var name = getPropertyKey(prop);
  			//console.log("objectproperty " + prop.type + ":" + name);
  			result[name] = prop;
  		}
  	}
  	return result;
  }
docs: Creates a map of property values from an AST 'object literal' node.
  
  The values in the map are again AST 'property' nodes (representing key/value pairs).
  It would be more convenient to just return the values, but the property node is needed
  to find the corresponding (preceding) documentation comment.
  
  If a <code>defaultKey</code> is given and if the <code>node</code> is not an object literal
  but another simple type literal, the value is treated as a shortcut for
  <pre>
  {
  [defaultKey]: node.value
  }
  </pre>
  This is used in ManagedObjectMetadata to allow a simpler declaration of properties by
  specifying a type name only.
  
  @param {ASTNode} node AST node for an object literal or simple literal
  @param {string} [defaultKey=undefined] A default key to use for simple values
  @returns {Map<string,Property>} Map of AST nodes of type 'Property', keyed by their property name