support "foo:function(){...}" block