{"action":"created","comment":{"url":"https://api.github.com/repos/jacob-carlborg/dstep/pulls/comments/55927859","id":55927859,"diff_hunk":"@@ -0,0 +1,149 @@\n+/**\n+ * Copyright: Copyright (c) 2016 Wojciech Szęszoł. All rights reserved.\n+ * Authors: Wojciech Szęszoł\n+ * Version: Initial created: Mar 11, 2016\n+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)\n+ */\n+\n+module dstep.translator.CodeBlock;\n+\n+import std.array;\n+import std.string;\n+\n+enum EndlHint\n+{\n+    Empty, // does nothing\n+    Group,\n+    SingleLine,\n+    MultiLine, // indent children\n+    SubscopeWeak, // put braces if children takes more than single line\n+    SubscopeStrong, // always put braces\n+}\n+\n+struct CodeBlock\n+{\n+    string spelling;\n+    EndlHint endlHint;\n+    CodeBlock[] children;\n+\n+    this(string spelling, EndlHint endlHint, CodeBlock[] children = [])\n+    {\n+        this.spelling = spelling;\n+        this.endlHint = endlHint;\n+        this.children = children;\n+    }\n+\n+    this(EndlHint endlHint, CodeBlock[] children = [])\n+    {\n+        this.spelling = \"\";\n+        this.endlHint = endlHint;\n+        this.children = children;\n+    }\n+\n+    this(string spelling)\n+    {\n+        this.spelling = spelling;\n+        this.endlHint = EndlHint.SingleLine;\n+        this.children = [];   \n+    }\n+\n+    this(CodeBlock[] children)\n+    {\n+        this.spelling = null;\n+        this.endlHint = EndlHint.Group;\n+        this.children = children;\n+    }\n+}","path":"dstep/translator/CodeBlock.d","position":67,"original_position":56,"commit_id":"3990fc08b1ac4c2149c583008e89f9883092266a","original_commit_id":"3c89d581d99a4855ad0f7ae7a879dd6ba47be9e2","user":{"login":"ciechowoj","id":7858228,"avatar_url":"https://avatars.githubusercontent.com/u/7858228?v=3","gravatar_id":"","url":"https://api.github.com/users/ciechowoj","html_url":"https://github.com/ciechowoj","followers_url":"https://api.github.com/users/ciechowoj/followers","following_url":"https://api.github.com/users/ciechowoj/following{/other_user}","gists_url":"https://api.github.com/users/ciechowoj/gists{/gist_id}","starred_url":"https://api.github.com/users/ciechowoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciechowoj/subscriptions","organizations_url":"https://api.github.com/users/ciechowoj/orgs","repos_url":"https://api.github.com/users/ciechowoj/repos","events_url":"https://api.github.com/users/ciechowoj/events{/privacy}","received_events_url":"https://api.github.com/users/ciechowoj/received_events","type":"User","site_admin":false},"body":"So, I would leave it as is, at least for now.","created_at":"2016-03-12T21:20:28Z","updated_at":"2016-03-12T21:20:28Z","html_url":"https://github.com/jacob-carlborg/dstep/pull/52#discussion_r55927859","pull_request_url":"https://api.github.com/repos/jacob-carlborg/dstep/pulls/52","_links":{"self":{"href":"https://api.github.com/repos/jacob-carlborg/dstep/pulls/comments/55927859"},"html":{"href":"https://github.com/jacob-carlborg/dstep/pull/52#discussion_r55927859"},"pull_request":{"href":"https://api.github.com/repos/jacob-carlborg/dstep/pulls/52"}}},"pull_request":{"url":"https://api.github.com/repos/jacob-carlborg/dstep/pulls/52","id":59997439,"html_url":"https://github.com/jacob-carlborg/dstep/pull/52","diff_url":"https://github.com/jacob-carlborg/dstep/pull/52.diff","patch_url":"https://github.com/jacob-carlborg/dstep/pull/52.patch","issue_url":"https://api.github.com/repos/jacob-carlborg/dstep/issues/52","number":52,"state":"open","locked":false,"title":"Translate in order","user":{"login":"ciechowoj","id":7858228,"avatar_url":"https://avatars.githubusercontent.com/u/7858228?v=3","gravatar_id":"","url":"https://api.github.com/users/ciechowoj","html_url":"https://github.com/ciechowoj","followers_url":"https://api.github.com/users/ciechowoj/followers","following_url":"https://api.github.com/users/ciechowoj/following{/other_user}","gists_url":"https://api.github.com/users/ciechowoj/gists{/gist_id}","starred_url":"https://api.github.com/users/ciechowoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciechowoj/subscriptions","organizations_url":"https://api.github.com/users/ciechowoj/orgs","repos_url":"https://api.github.com/users/ciechowoj/repos","events_url":"https://api.github.com/users/ciechowoj/events{/privacy}","received_events_url":"https://api.github.com/users/ciechowoj/received_events","type":"User","site_admin":false},"body":"Replaces superfluous switch statement from `Translator.translateString`.\r\nMakes translated statements to appear in C order (at least for existing acceptance tests, I believe it needs more test). ","created_at":"2016-02-19T19:44:38Z","updated_at":"2016-03-12T21:20:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bbd2c1b7e2eccd457267f74dba049ed81357e625","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jacob-carlborg/dstep/pulls/52/commits","review_comments_url":"https://api.github.com/repos/jacob-carlborg/dstep/pulls/52/comments","review_comment_url":"https://api.github.com/repos/jacob-carlborg/dstep/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jacob-carlborg/dstep/issues/52/comments","statuses_url":"https://api.github.com/repos/jacob-carlborg/dstep/statuses/3990fc08b1ac4c2149c583008e89f9883092266a","head":{"label":"ciechowoj:translate_in_order","ref":"translate_in_order","sha":"3990fc08b1ac4c2149c583008e89f9883092266a","user":{"login":"ciechowoj","id":7858228,"avatar_url":"https://avatars.githubusercontent.com/u/7858228?v=3","gravatar_id":"","url":"https://api.github.com/users/ciechowoj","html_url":"https://github.com/ciechowoj","followers_url":"https://api.github.com/users/ciechowoj/followers","following_url":"https://api.github.com/users/ciechowoj/following{/other_user}","gists_url":"https://api.github.com/users/ciechowoj/gists{/gist_id}","starred_url":"https://api.github.com/users/ciechowoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciechowoj/subscriptions","organizations_url":"https://api.github.com/users/ciechowoj/orgs","repos_url":"https://api.github.com/users/ciechowoj/repos","events_url":"https://api.github.com/users/ciechowoj/events{/privacy}","received_events_url":"https://api.github.com/users/ciechowoj/received_events","type":"User","site_admin":false},"repo":{"id":50794645,"name":"dstep","full_name":"ciechowoj/dstep","owner":{"login":"ciechowoj","id":7858228,"avatar_url":"https://avatars.githubusercontent.com/u/7858228?v=3","gravatar_id":"","url":"https://api.github.com/users/ciechowoj","html_url":"https://github.com/ciechowoj","followers_url":"https://api.github.com/users/ciechowoj/followers","following_url":"https://api.github.com/users/ciechowoj/following{/other_user}","gists_url":"https://api.github.com/users/ciechowoj/gists{/gist_id}","starred_url":"https://api.github.com/users/ciechowoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciechowoj/subscriptions","organizations_url":"https://api.github.com/users/ciechowoj/orgs","repos_url":"https://api.github.com/users/ciechowoj/repos","events_url":"https://api.github.com/users/ciechowoj/events{/privacy}","received_events_url":"https://api.github.com/users/ciechowoj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ciechowoj/dstep","description":"A tool for converting C and Objective-C headers to D modules","fork":true,"url":"https://api.github.com/repos/ciechowoj/dstep","forks_url":"https://api.github.com/repos/ciechowoj/dstep/forks","keys_url":"https://api.github.com/repos/ciechowoj/dstep/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ciechowoj/dstep/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ciechowoj/dstep/teams","hooks_url":"https://api.github.com/repos/ciechowoj/dstep/hooks","issue_events_url":"https://api.github.com/repos/ciechowoj/dstep/issues/events{/number}","events_url":"https://api.github.com/repos/ciechowoj/dstep/events","assignees_url":"https://api.github.com/repos/ciechowoj/dstep/assignees{/user}","branches_url":"https://api.github.com/repos/ciechowoj/dstep/branches{/branch}","tags_url":"https://api.github.com/repos/ciechowoj/dstep/tags","blobs_url":"https://api.github.com/repos/ciechowoj/dstep/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ciechowoj/dstep/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ciechowoj/dstep/git/refs{/sha}","trees_url":"https://api.github.com/repos/ciechowoj/dstep/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ciechowoj/dstep/statuses/{sha}","languages_url":"https://api.github.com/repos/ciechowoj/dstep/languages","stargazers_url":"https://api.github.com/repos/ciechowoj/dstep/stargazers","contributors_url":"https://api.github.com/repos/ciechowoj/dstep/contributors","subscribers_url":"https://api.github.com/repos/ciechowoj/dstep/subscribers","subscription_url":"https://api.github.com/repos/ciechowoj/dstep/subscription","commits_url":"https://api.github.com/repos/ciechowoj/dstep/commits{/sha}","git_commits_url":"https://api.github.com/repos/ciechowoj/dstep/git/commits{/sha}","comments_url":"https://api.github.com/repos/ciechowoj/dstep/comments{/number}","issue_comment_url":"https://api.github.com/repos/ciechowoj/dstep/issues/comments{/number}","contents_url":"https://api.github.com/repos/ciechowoj/dstep/contents/{+path}","compare_url":"https://api.github.com/repos/ciechowoj/dstep/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ciechowoj/dstep/merges","archive_url":"https://api.github.com/repos/ciechowoj/dstep/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ciechowoj/dstep/downloads","issues_url":"https://api.github.com/repos/ciechowoj/dstep/issues{/number}","pulls_url":"https://api.github.com/repos/ciechowoj/dstep/pulls{/number}","milestones_url":"https://api.github.com/repos/ciechowoj/dstep/milestones{/number}","notifications_url":"https://api.github.com/repos/ciechowoj/dstep/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ciechowoj/dstep/labels{/name}","releases_url":"https://api.github.com/repos/ciechowoj/dstep/releases{/id}","deployments_url":"https://api.github.com/repos/ciechowoj/dstep/deployments","created_at":"2016-01-31T20:53:41Z","updated_at":"2016-01-31T20:53:42Z","pushed_at":"2016-03-12T21:18:31Z","git_url":"git://github.com/ciechowoj/dstep.git","ssh_url":"git@github.com:ciechowoj/dstep.git","clone_url":"https://github.com/ciechowoj/dstep.git","svn_url":"https://github.com/ciechowoj/dstep","homepage":"","size":656,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jacob-carlborg:master","ref":"master","sha":"8b70915ffd03cbd04b1d37518cb397164f6bd5f1","user":{"login":"jacob-carlborg","id":306980,"avatar_url":"https://avatars.githubusercontent.com/u/306980?v=3","gravatar_id":"","url":"https://api.github.com/users/jacob-carlborg","html_url":"https://github.com/jacob-carlborg","followers_url":"https://api.github.com/users/jacob-carlborg/followers","following_url":"https://api.github.com/users/jacob-carlborg/following{/other_user}","gists_url":"https://api.github.com/users/jacob-carlborg/gists{/gist_id}","starred_url":"https://api.github.com/users/jacob-carlborg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacob-carlborg/subscriptions","organizations_url":"https://api.github.com/users/jacob-carlborg/orgs","repos_url":"https://api.github.com/users/jacob-carlborg/repos","events_url":"https://api.github.com/users/jacob-carlborg/events{/privacy}","received_events_url":"https://api.github.com/users/jacob-carlborg/received_events","type":"User","site_admin":false},"repo":{"id":2494736,"name":"dstep","full_name":"jacob-carlborg/dstep","owner":{"login":"jacob-carlborg","id":306980,"avatar_url":"https://avatars.githubusercontent.com/u/306980?v=3","gravatar_id":"","url":"https://api.github.com/users/jacob-carlborg","html_url":"https://github.com/jacob-carlborg","followers_url":"https://api.github.com/users/jacob-carlborg/followers","following_url":"https://api.github.com/users/jacob-carlborg/following{/other_user}","gists_url":"https://api.github.com/users/jacob-carlborg/gists{/gist_id}","starred_url":"https://api.github.com/users/jacob-carlborg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacob-carlborg/subscriptions","organizations_url":"https://api.github.com/users/jacob-carlborg/orgs","repos_url":"https://api.github.com/users/jacob-carlborg/repos","events_url":"https://api.github.com/users/jacob-carlborg/events{/privacy}","received_events_url":"https://api.github.com/users/jacob-carlborg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jacob-carlborg/dstep","description":"A tool for converting C and Objective-C headers to D modules","fork":false,"url":"https://api.github.com/repos/jacob-carlborg/dstep","forks_url":"https://api.github.com/repos/jacob-carlborg/dstep/forks","keys_url":"https://api.github.com/repos/jacob-carlborg/dstep/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jacob-carlborg/dstep/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jacob-carlborg/dstep/teams","hooks_url":"https://api.github.com/repos/jacob-carlborg/dstep/hooks","issue_events_url":"https://api.github.com/repos/jacob-carlborg/dstep/issues/events{/number}","events_url":"https://api.github.com/repos/jacob-carlborg/dstep/events","assignees_url":"https://api.github.com/repos/jacob-carlborg/dstep/assignees{/user}","branches_url":"https://api.github.com/repos/jacob-carlborg/dstep/branches{/branch}","tags_url":"https://api.github.com/repos/jacob-carlborg/dstep/tags","blobs_url":"https://api.github.com/repos/jacob-carlborg/dstep/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jacob-carlborg/dstep/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jacob-carlborg/dstep/git/refs{/sha}","trees_url":"https://api.github.com/repos/jacob-carlborg/dstep/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jacob-carlborg/dstep/statuses/{sha}","languages_url":"https://api.github.com/repos/jacob-carlborg/dstep/languages","stargazers_url":"https://api.github.com/repos/jacob-carlborg/dstep/stargazers","contributors_url":"https://api.github.com/repos/jacob-carlborg/dstep/contributors","subscribers_url":"https://api.github.com/repos/jacob-carlborg/dstep/subscribers","subscription_url":"https://api.github.com/repos/jacob-carlborg/dstep/subscription","commits_url":"https://api.github.com/repos/jacob-carlborg/dstep/commits{/sha}","git_commits_url":"https://api.github.com/repos/jacob-carlborg/dstep/git/commits{/sha}","comments_url":"https://api.github.com/repos/jacob-carlborg/dstep/comments{/number}","issue_comment_url":"https://api.github.com/repos/jacob-carlborg/dstep/issues/comments{/number}","contents_url":"https://api.github.com/repos/jacob-carlborg/dstep/contents/{+path}","compare_url":"https://api.github.com/repos/jacob-carlborg/dstep/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jacob-carlborg/dstep/merges","archive_url":"https://api.github.com/repos/jacob-carlborg/dstep/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jacob-carlborg/dstep/downloads","issues_url":"https://api.github.com/repos/jacob-carlborg/dstep/issues{/number}","pulls_url":"https://api.github.com/repos/jacob-carlborg/dstep/pulls{/number}","milestones_url":"https://api.github.com/repos/jacob-carlborg/dstep/milestones{/number}","notifications_url":"https://api.github.com/repos/jacob-carlborg/dstep/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jacob-carlborg/dstep/labels{/name}","releases_url":"https://api.github.com/repos/jacob-carlborg/dstep/releases{/id}","deployments_url":"https://api.github.com/repos/jacob-carlborg/dstep/deployments","created_at":"2011-10-01T12:33:12Z","updated_at":"2016-02-27T01:35:07Z","pushed_at":"2016-03-12T21:18:32Z","git_url":"git://github.com/jacob-carlborg/dstep.git","ssh_url":"git@github.com:jacob-carlborg/dstep.git","clone_url":"https://github.com/jacob-carlborg/dstep.git","svn_url":"https://github.com/jacob-carlborg/dstep","homepage":"","size":644,"stargazers_count":88,"watchers_count":88,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":24,"forks":13,"open_issues":24,"watchers":88,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jacob-carlborg/dstep/pulls/52"},"html":{"href":"https://github.com/jacob-carlborg/dstep/pull/52"},"issue":{"href":"https://api.github.com/repos/jacob-carlborg/dstep/issues/52"},"comments":{"href":"https://api.github.com/repos/jacob-carlborg/dstep/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/jacob-carlborg/dstep/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/jacob-carlborg/dstep/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jacob-carlborg/dstep/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/jacob-carlborg/dstep/statuses/3990fc08b1ac4c2149c583008e89f9883092266a"}}}}