{"action":"created","comment":{"url":"https://api.github.com/repos/apiaryio/drafter/pulls/comments/37085130","id":37085130,"diff_hunk":"@@ -38,6 +38,26 @@ namespace drafter {\n             return ptr == NULL;\n         }\n \n+        void RemoveEmptyElements(RefractElements& elements)\n+        {\n+            elements.erase(std::remove_if(elements.begin(), elements.end(), IsNull<refract::IElement>), elements.end());\n+        }\n+\n+        refract::IElement* DataStructureToRefractAST(const snowcrash::DataStructure& dataStructure)\n+        {\n+            refract::IElement* ds = DataStructureToRefract(dataStructure);","path":"src/RefractAPI.cc","position":11,"original_position":11,"commit_id":"06425f93f311b64b2b34ce1826fa1914cb474753","original_commit_id":"265cf411c2c2a4775d2eb5b7460f2b5652a3bdb9","user":{"login":"pksunkara","id":174703,"avatar_url":"https://avatars.githubusercontent.com/u/174703?v=3","gravatar_id":"","url":"https://api.github.com/users/pksunkara","html_url":"https://github.com/pksunkara","followers_url":"https://api.github.com/users/pksunkara/followers","following_url":"https://api.github.com/users/pksunkara/following{/other_user}","gists_url":"https://api.github.com/users/pksunkara/gists{/gist_id}","starred_url":"https://api.github.com/users/pksunkara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pksunkara/subscriptions","organizations_url":"https://api.github.com/users/pksunkara/orgs","repos_url":"https://api.github.com/users/pksunkara/repos","events_url":"https://api.github.com/users/pksunkara/events{/privacy}","received_events_url":"https://api.github.com/users/pksunkara/received_events","type":"User","site_admin":false},"body":"Please use the name `dataStructure` instead of `ds` for the variable.","created_at":"2015-08-14T15:05:19Z","updated_at":"2015-08-14T15:05:19Z","html_url":"https://github.com/apiaryio/drafter/pull/79#discussion_r37085130","pull_request_url":"https://api.github.com/repos/apiaryio/drafter/pulls/79","_links":{"self":{"href":"https://api.github.com/repos/apiaryio/drafter/pulls/comments/37085130"},"html":{"href":"https://github.com/apiaryio/drafter/pull/79#discussion_r37085130"},"pull_request":{"href":"https://api.github.com/repos/apiaryio/drafter/pulls/79"}}},"pull_request":{"url":"https://api.github.com/repos/apiaryio/drafter/pulls/79","id":42464364,"html_url":"https://github.com/apiaryio/drafter/pull/79","diff_url":"https://github.com/apiaryio/drafter/pull/79.diff","patch_url":"https://github.com/apiaryio/drafter/pull/79.patch","issue_url":"https://api.github.com/repos/apiaryio/drafter/issues/79","number":79,"state":"open","locked":false,"title":"Add enveloping element for data structures","user":{"login":"klokane","id":489973,"avatar_url":"https://avatars.githubusercontent.com/u/489973?v=3","gravatar_id":"","url":"https://api.github.com/users/klokane","html_url":"https://github.com/klokane","followers_url":"https://api.github.com/users/klokane/followers","following_url":"https://api.github.com/users/klokane/following{/other_user}","gists_url":"https://api.github.com/users/klokane/gists{/gist_id}","starred_url":"https://api.github.com/users/klokane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klokane/subscriptions","organizations_url":"https://api.github.com/users/klokane/orgs","repos_url":"https://api.github.com/users/klokane/repos","events_url":"https://api.github.com/users/klokane/events{/privacy}","received_events_url":"https://api.github.com/users/klokane/received_events","type":"User","site_admin":false},"body":"This change add \"enveloping\" element for \"dataStuctures\" into both kind of AST.\r\nWARN: there is too many changes in fixtures (but just added element)","created_at":"2015-08-14T14:57:59Z","updated_at":"2015-08-14T15:05:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5f1e30f7acd28c0a96fda57751106fc7d362940c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apiaryio/drafter/pulls/79/commits","review_comments_url":"https://api.github.com/repos/apiaryio/drafter/pulls/79/comments","review_comment_url":"https://api.github.com/repos/apiaryio/drafter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apiaryio/drafter/issues/79/comments","statuses_url":"https://api.github.com/repos/apiaryio/drafter/statuses/06425f93f311b64b2b34ce1826fa1914cb474753","head":{"label":"apiaryio:klokane/add-enveloping-element-for-data-structures","ref":"klokane/add-enveloping-element-for-data-structures","sha":"06425f93f311b64b2b34ce1826fa1914cb474753","user":{"login":"apiaryio","id":765943,"avatar_url":"https://avatars.githubusercontent.com/u/765943?v=3","gravatar_id":"","url":"https://api.github.com/users/apiaryio","html_url":"https://github.com/apiaryio","followers_url":"https://api.github.com/users/apiaryio/followers","following_url":"https://api.github.com/users/apiaryio/following{/other_user}","gists_url":"https://api.github.com/users/apiaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/apiaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apiaryio/subscriptions","organizations_url":"https://api.github.com/users/apiaryio/orgs","repos_url":"https://api.github.com/users/apiaryio/repos","events_url":"https://api.github.com/users/apiaryio/events{/privacy}","received_events_url":"https://api.github.com/users/apiaryio/received_events","type":"Organization","site_admin":false},"repo":{"id":30541396,"name":"drafter","full_name":"apiaryio/drafter","owner":{"login":"apiaryio","id":765943,"avatar_url":"https://avatars.githubusercontent.com/u/765943?v=3","gravatar_id":"","url":"https://api.github.com/users/apiaryio","html_url":"https://github.com/apiaryio","followers_url":"https://api.github.com/users/apiaryio/followers","following_url":"https://api.github.com/users/apiaryio/following{/other_user}","gists_url":"https://api.github.com/users/apiaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/apiaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apiaryio/subscriptions","organizations_url":"https://api.github.com/users/apiaryio/orgs","repos_url":"https://api.github.com/users/apiaryio/repos","events_url":"https://api.github.com/users/apiaryio/events{/privacy}","received_events_url":"https://api.github.com/users/apiaryio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apiaryio/drafter","description":"Snow Crash parser harness","fork":false,"url":"https://api.github.com/repos/apiaryio/drafter","forks_url":"https://api.github.com/repos/apiaryio/drafter/forks","keys_url":"https://api.github.com/repos/apiaryio/drafter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apiaryio/drafter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apiaryio/drafter/teams","hooks_url":"https://api.github.com/repos/apiaryio/drafter/hooks","issue_events_url":"https://api.github.com/repos/apiaryio/drafter/issues/events{/number}","events_url":"https://api.github.com/repos/apiaryio/drafter/events","assignees_url":"https://api.github.com/repos/apiaryio/drafter/assignees{/user}","branches_url":"https://api.github.com/repos/apiaryio/drafter/branches{/branch}","tags_url":"https://api.github.com/repos/apiaryio/drafter/tags","blobs_url":"https://api.github.com/repos/apiaryio/drafter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apiaryio/drafter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apiaryio/drafter/git/refs{/sha}","trees_url":"https://api.github.com/repos/apiaryio/drafter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apiaryio/drafter/statuses/{sha}","languages_url":"https://api.github.com/repos/apiaryio/drafter/languages","stargazers_url":"https://api.github.com/repos/apiaryio/drafter/stargazers","contributors_url":"https://api.github.com/repos/apiaryio/drafter/contributors","subscribers_url":"https://api.github.com/repos/apiaryio/drafter/subscribers","subscription_url":"https://api.github.com/repos/apiaryio/drafter/subscription","commits_url":"https://api.github.com/repos/apiaryio/drafter/commits{/sha}","git_commits_url":"https://api.github.com/repos/apiaryio/drafter/git/commits{/sha}","comments_url":"https://api.github.com/repos/apiaryio/drafter/comments{/number}","issue_comment_url":"https://api.github.com/repos/apiaryio/drafter/issues/comments{/number}","contents_url":"https://api.github.com/repos/apiaryio/drafter/contents/{+path}","compare_url":"https://api.github.com/repos/apiaryio/drafter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apiaryio/drafter/merges","archive_url":"https://api.github.com/repos/apiaryio/drafter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apiaryio/drafter/downloads","issues_url":"https://api.github.com/repos/apiaryio/drafter/issues{/number}","pulls_url":"https://api.github.com/repos/apiaryio/drafter/pulls{/number}","milestones_url":"https://api.github.com/repos/apiaryio/drafter/milestones{/number}","notifications_url":"https://api.github.com/repos/apiaryio/drafter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apiaryio/drafter/labels{/name}","releases_url":"https://api.github.com/repos/apiaryio/drafter/releases{/id}","created_at":"2015-02-09T15:05:57Z","updated_at":"2015-07-30T17:27:23Z","pushed_at":"2015-08-14T15:04:48Z","git_url":"git://github.com/apiaryio/drafter.git","ssh_url":"git@github.com:apiaryio/drafter.git","clone_url":"https://github.com/apiaryio/drafter.git","svn_url":"https://github.com/apiaryio/drafter","homepage":"","size":1733,"stargazers_count":46,"watchers_count":46,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":12,"forks":11,"open_issues":12,"watchers":46,"default_branch":"master"}},"base":{"label":"apiaryio:pksunkara/conversion","ref":"pksunkara/conversion","sha":"a440745fd35e45c6d5b2a4f225a6774430db4f79","user":{"login":"apiaryio","id":765943,"avatar_url":"https://avatars.githubusercontent.com/u/765943?v=3","gravatar_id":"","url":"https://api.github.com/users/apiaryio","html_url":"https://github.com/apiaryio","followers_url":"https://api.github.com/users/apiaryio/followers","following_url":"https://api.github.com/users/apiaryio/following{/other_user}","gists_url":"https://api.github.com/users/apiaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/apiaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apiaryio/subscriptions","organizations_url":"https://api.github.com/users/apiaryio/orgs","repos_url":"https://api.github.com/users/apiaryio/repos","events_url":"https://api.github.com/users/apiaryio/events{/privacy}","received_events_url":"https://api.github.com/users/apiaryio/received_events","type":"Organization","site_admin":false},"repo":{"id":30541396,"name":"drafter","full_name":"apiaryio/drafter","owner":{"login":"apiaryio","id":765943,"avatar_url":"https://avatars.githubusercontent.com/u/765943?v=3","gravatar_id":"","url":"https://api.github.com/users/apiaryio","html_url":"https://github.com/apiaryio","followers_url":"https://api.github.com/users/apiaryio/followers","following_url":"https://api.github.com/users/apiaryio/following{/other_user}","gists_url":"https://api.github.com/users/apiaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/apiaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apiaryio/subscriptions","organizations_url":"https://api.github.com/users/apiaryio/orgs","repos_url":"https://api.github.com/users/apiaryio/repos","events_url":"https://api.github.com/users/apiaryio/events{/privacy}","received_events_url":"https://api.github.com/users/apiaryio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apiaryio/drafter","description":"Snow Crash parser harness","fork":false,"url":"https://api.github.com/repos/apiaryio/drafter","forks_url":"https://api.github.com/repos/apiaryio/drafter/forks","keys_url":"https://api.github.com/repos/apiaryio/drafter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apiaryio/drafter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apiaryio/drafter/teams","hooks_url":"https://api.github.com/repos/apiaryio/drafter/hooks","issue_events_url":"https://api.github.com/repos/apiaryio/drafter/issues/events{/number}","events_url":"https://api.github.com/repos/apiaryio/drafter/events","assignees_url":"https://api.github.com/repos/apiaryio/drafter/assignees{/user}","branches_url":"https://api.github.com/repos/apiaryio/drafter/branches{/branch}","tags_url":"https://api.github.com/repos/apiaryio/drafter/tags","blobs_url":"https://api.github.com/repos/apiaryio/drafter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apiaryio/drafter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apiaryio/drafter/git/refs{/sha}","trees_url":"https://api.github.com/repos/apiaryio/drafter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apiaryio/drafter/statuses/{sha}","languages_url":"https://api.github.com/repos/apiaryio/drafter/languages","stargazers_url":"https://api.github.com/repos/apiaryio/drafter/stargazers","contributors_url":"https://api.github.com/repos/apiaryio/drafter/contributors","subscribers_url":"https://api.github.com/repos/apiaryio/drafter/subscribers","subscription_url":"https://api.github.com/repos/apiaryio/drafter/subscription","commits_url":"https://api.github.com/repos/apiaryio/drafter/commits{/sha}","git_commits_url":"https://api.github.com/repos/apiaryio/drafter/git/commits{/sha}","comments_url":"https://api.github.com/repos/apiaryio/drafter/comments{/number}","issue_comment_url":"https://api.github.com/repos/apiaryio/drafter/issues/comments{/number}","contents_url":"https://api.github.com/repos/apiaryio/drafter/contents/{+path}","compare_url":"https://api.github.com/repos/apiaryio/drafter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apiaryio/drafter/merges","archive_url":"https://api.github.com/repos/apiaryio/drafter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apiaryio/drafter/downloads","issues_url":"https://api.github.com/repos/apiaryio/drafter/issues{/number}","pulls_url":"https://api.github.com/repos/apiaryio/drafter/pulls{/number}","milestones_url":"https://api.github.com/repos/apiaryio/drafter/milestones{/number}","notifications_url":"https://api.github.com/repos/apiaryio/drafter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apiaryio/drafter/labels{/name}","releases_url":"https://api.github.com/repos/apiaryio/drafter/releases{/id}","created_at":"2015-02-09T15:05:57Z","updated_at":"2015-07-30T17:27:23Z","pushed_at":"2015-08-14T15:04:48Z","git_url":"git://github.com/apiaryio/drafter.git","ssh_url":"git@github.com:apiaryio/drafter.git","clone_url":"https://github.com/apiaryio/drafter.git","svn_url":"https://github.com/apiaryio/drafter","homepage":"","size":1733,"stargazers_count":46,"watchers_count":46,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":12,"forks":11,"open_issues":12,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apiaryio/drafter/pulls/79"},"html":{"href":"https://github.com/apiaryio/drafter/pull/79"},"issue":{"href":"https://api.github.com/repos/apiaryio/drafter/issues/79"},"comments":{"href":"https://api.github.com/repos/apiaryio/drafter/issues/79/comments"},"review_comments":{"href":"https://api.github.com/repos/apiaryio/drafter/pulls/79/comments"},"review_comment":{"href":"https://api.github.com/repos/apiaryio/drafter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apiaryio/drafter/pulls/79/commits"},"statuses":{"href":"https://api.github.com/repos/apiaryio/drafter/statuses/06425f93f311b64b2b34ce1826fa1914cb474753"}}}}