improved parser for object literals