{"action":"created","comment":{"url":"https://api.github.com/repos/mayankmahajan24/QL/pulls/comments/46718463","id":46718463,"diff_hunk":"@@ -112,25 +112,11 @@ let string_data_literal (expr : Ast.expr) = match expr\n \t| Literal_string(i) -> i\n \t| _ -> raise (Failure \"we can't print this\")\n \n-(* TODO: Get rid of this garbage function. *)\n-let output_file =\n-\topen_out_gen [Open_creat; Open_text; Open_append] 0o640 \"Test.java\"\n-\n-let print_to_file (prog_str : string) =\n-\tlet file = output_file in\n-\t\tPrintf.fprintf file \"%s\" prog_str;;\n-\n-let print_header (class_name : string) =\n-\tlet prog_str = \"public class \" ^ class_name ^ \" { public static void main(String[] args) { \" in\n-\tprint_to_file prog_str\n-\n-let handle_print_function (print_term : string) =\n-\tlet prog_str = \"System.out.println(\\\"\" ^ print_term  ^ \"\\\"); \" in\n-\tprint_to_file prog_str\n-\n let handle_expr_statement (expr : Ast.expr) (env: Environment.symbol_table) = match expr\n \twith Call(f_name, args) -> (match f_name\n-\t\twith \"print\" -> handle_print_function (string_data_literal(List.hd args))\n+\t\twith \"print\" ->\n+\t\t\tif List.length args != 1 then\n+\t\t\t\traise (Failure \"Print only takes one argument\")","path":"compiler/semantic.ml","position":25,"original_position":25,"commit_id":"6dcda710c8492b70193a51afbf5a791462e26b97","original_commit_id":"6dcda710c8492b70193a51afbf5a791462e26b97","user":{"login":"mjp2220","id":4534415,"avatar_url":"https://avatars.githubusercontent.com/u/4534415?v=3","gravatar_id":"","url":"https://api.github.com/users/mjp2220","html_url":"https://github.com/mjp2220","followers_url":"https://api.github.com/users/mjp2220/followers","following_url":"https://api.github.com/users/mjp2220/following{/other_user}","gists_url":"https://api.github.com/users/mjp2220/gists{/gist_id}","starred_url":"https://api.github.com/users/mjp2220/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjp2220/subscriptions","organizations_url":"https://api.github.com/users/mjp2220/orgs","repos_url":"https://api.github.com/users/mjp2220/repos","events_url":"https://api.github.com/users/mjp2220/events{/privacy}","received_events_url":"https://api.github.com/users/mjp2220/received_events","type":"User","site_admin":false},"body":"I think you should be using \"printf\" instead of \"print\" (disregard)","created_at":"2015-12-04T19:03:30Z","updated_at":"2015-12-04T19:03:30Z","html_url":"https://github.com/mayankmahajan24/QL/pull/18#discussion_r46718463","pull_request_url":"https://api.github.com/repos/mayankmahajan24/QL/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/mayankmahajan24/QL/pulls/comments/46718463"},"html":{"href":"https://github.com/mayankmahajan24/QL/pull/18#discussion_r46718463"},"pull_request":{"href":"https://api.github.com/repos/mayankmahajan24/QL/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/mayankmahajan24/QL/pulls/18","id":52707519,"html_url":"https://github.com/mayankmahajan24/QL/pull/18","diff_url":"https://github.com/mayankmahajan24/QL/pull/18.diff","patch_url":"https://github.com/mayankmahajan24/QL/pull/18.patch","issue_url":"https://api.github.com/repos/mayankmahajan24/QL/issues/18","number":18,"state":"open","locked":false,"title":"Code gen skeleton","user":{"login":"mjp2220","id":4534415,"avatar_url":"https://avatars.githubusercontent.com/u/4534415?v=3","gravatar_id":"","url":"https://api.github.com/users/mjp2220","html_url":"https://github.com/mjp2220","followers_url":"https://api.github.com/users/mjp2220/followers","following_url":"https://api.github.com/users/mjp2220/following{/other_user}","gists_url":"https://api.github.com/users/mjp2220/gists{/gist_id}","starred_url":"https://api.github.com/users/mjp2220/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjp2220/subscriptions","organizations_url":"https://api.github.com/users/mjp2220/orgs","repos_url":"https://api.github.com/users/mjp2220/repos","events_url":"https://api.github.com/users/mjp2220/events{/privacy}","received_events_url":"https://api.github.com/users/mjp2220/received_events","type":"User","site_admin":false},"body":"Adding code generation","created_at":"2015-12-04T19:02:35Z","updated_at":"2015-12-04T19:03:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4d185c1f07fc476a63259803a0f39055b3455d4e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mayankmahajan24/QL/pulls/18/commits","review_comments_url":"https://api.github.com/repos/mayankmahajan24/QL/pulls/18/comments","review_comment_url":"https://api.github.com/repos/mayankmahajan24/QL/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mayankmahajan24/QL/issues/18/comments","statuses_url":"https://api.github.com/repos/mayankmahajan24/QL/statuses/6dcda710c8492b70193a51afbf5a791462e26b97","head":{"label":"mayankmahajan24:code_gen_skeleton","ref":"code_gen_skeleton","sha":"6dcda710c8492b70193a51afbf5a791462e26b97","user":{"login":"mayankmahajan24","id":5421777,"avatar_url":"https://avatars.githubusercontent.com/u/5421777?v=3","gravatar_id":"","url":"https://api.github.com/users/mayankmahajan24","html_url":"https://github.com/mayankmahajan24","followers_url":"https://api.github.com/users/mayankmahajan24/followers","following_url":"https://api.github.com/users/mayankmahajan24/following{/other_user}","gists_url":"https://api.github.com/users/mayankmahajan24/gists{/gist_id}","starred_url":"https://api.github.com/users/mayankmahajan24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mayankmahajan24/subscriptions","organizations_url":"https://api.github.com/users/mayankmahajan24/orgs","repos_url":"https://api.github.com/users/mayankmahajan24/repos","events_url":"https://api.github.com/users/mayankmahajan24/events{/privacy}","received_events_url":"https://api.github.com/users/mayankmahajan24/received_events","type":"User","site_admin":false},"repo":{"id":44703548,"name":"QL","full_name":"mayankmahajan24/QL","owner":{"login":"mayankmahajan24","id":5421777,"avatar_url":"https://avatars.githubusercontent.com/u/5421777?v=3","gravatar_id":"","url":"https://api.github.com/users/mayankmahajan24","html_url":"https://github.com/mayankmahajan24","followers_url":"https://api.github.com/users/mayankmahajan24/followers","following_url":"https://api.github.com/users/mayankmahajan24/following{/other_user}","gists_url":"https://api.github.com/users/mayankmahajan24/gists{/gist_id}","starred_url":"https://api.github.com/users/mayankmahajan24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mayankmahajan24/subscriptions","organizations_url":"https://api.github.com/users/mayankmahajan24/orgs","repos_url":"https://api.github.com/users/mayankmahajan24/repos","events_url":"https://api.github.com/users/mayankmahajan24/events{/privacy}","received_events_url":"https://api.github.com/users/mayankmahajan24/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mayankmahajan24/QL","description":"QL Language and Compiler, for Programming Langauges and Translators Course Fall 2015","fork":false,"url":"https://api.github.com/repos/mayankmahajan24/QL","forks_url":"https://api.github.com/repos/mayankmahajan24/QL/forks","keys_url":"https://api.github.com/repos/mayankmahajan24/QL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mayankmahajan24/QL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mayankmahajan24/QL/teams","hooks_url":"https://api.github.com/repos/mayankmahajan24/QL/hooks","issue_events_url":"https://api.github.com/repos/mayankmahajan24/QL/issues/events{/number}","events_url":"https://api.github.com/repos/mayankmahajan24/QL/events","assignees_url":"https://api.github.com/repos/mayankmahajan24/QL/assignees{/user}","branches_url":"https://api.github.com/repos/mayankmahajan24/QL/branches{/branch}","tags_url":"https://api.github.com/repos/mayankmahajan24/QL/tags","blobs_url":"https://api.github.com/repos/mayankmahajan24/QL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mayankmahajan24/QL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mayankmahajan24/QL/git/refs{/sha}","trees_url":"https://api.github.com/repos/mayankmahajan24/QL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mayankmahajan24/QL/statuses/{sha}","languages_url":"https://api.github.com/repos/mayankmahajan24/QL/languages","stargazers_url":"https://api.github.com/repos/mayankmahajan24/QL/stargazers","contributors_url":"https://api.github.com/repos/mayankmahajan24/QL/contributors","subscribers_url":"https://api.github.com/repos/mayankmahajan24/QL/subscribers","subscription_url":"https://api.github.com/repos/mayankmahajan24/QL/subscription","commits_url":"https://api.github.com/repos/mayankmahajan24/QL/commits{/sha}","git_commits_url":"https://api.github.com/repos/mayankmahajan24/QL/git/commits{/sha}","comments_url":"https://api.github.com/repos/mayankmahajan24/QL/comments{/number}","issue_comment_url":"https://api.github.com/repos/mayankmahajan24/QL/issues/comments{/number}","contents_url":"https://api.github.com/repos/mayankmahajan24/QL/contents/{+path}","compare_url":"https://api.github.com/repos/mayankmahajan24/QL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mayankmahajan24/QL/merges","archive_url":"https://api.github.com/repos/mayankmahajan24/QL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mayankmahajan24/QL/downloads","issues_url":"https://api.github.com/repos/mayankmahajan24/QL/issues{/number}","pulls_url":"https://api.github.com/repos/mayankmahajan24/QL/pulls{/number}","milestones_url":"https://api.github.com/repos/mayankmahajan24/QL/milestones{/number}","notifications_url":"https://api.github.com/repos/mayankmahajan24/QL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mayankmahajan24/QL/labels{/name}","releases_url":"https://api.github.com/repos/mayankmahajan24/QL/releases{/id}","created_at":"2015-10-21T20:52:45Z","updated_at":"2015-11-23T01:46:38Z","pushed_at":"2015-12-04T19:02:35Z","git_url":"git://github.com/mayankmahajan24/QL.git","ssh_url":"git@github.com:mayankmahajan24/QL.git","clone_url":"https://github.com/mayankmahajan24/QL.git","svn_url":"https://github.com/mayankmahajan24/QL","homepage":null,"size":280,"stargazers_count":3,"watchers_count":3,"language":"OCaml","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":3,"default_branch":"master"}},"base":{"label":"mayankmahajan24:master","ref":"master","sha":"ce9ada804264fa70dd1cae87b2bdc08dcf9a9b68","user":{"login":"mayankmahajan24","id":5421777,"avatar_url":"https://avatars.githubusercontent.com/u/5421777?v=3","gravatar_id":"","url":"https://api.github.com/users/mayankmahajan24","html_url":"https://github.com/mayankmahajan24","followers_url":"https://api.github.com/users/mayankmahajan24/followers","following_url":"https://api.github.com/users/mayankmahajan24/following{/other_user}","gists_url":"https://api.github.com/users/mayankmahajan24/gists{/gist_id}","starred_url":"https://api.github.com/users/mayankmahajan24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mayankmahajan24/subscriptions","organizations_url":"https://api.github.com/users/mayankmahajan24/orgs","repos_url":"https://api.github.com/users/mayankmahajan24/repos","events_url":"https://api.github.com/users/mayankmahajan24/events{/privacy}","received_events_url":"https://api.github.com/users/mayankmahajan24/received_events","type":"User","site_admin":false},"repo":{"id":44703548,"name":"QL","full_name":"mayankmahajan24/QL","owner":{"login":"mayankmahajan24","id":5421777,"avatar_url":"https://avatars.githubusercontent.com/u/5421777?v=3","gravatar_id":"","url":"https://api.github.com/users/mayankmahajan24","html_url":"https://github.com/mayankmahajan24","followers_url":"https://api.github.com/users/mayankmahajan24/followers","following_url":"https://api.github.com/users/mayankmahajan24/following{/other_user}","gists_url":"https://api.github.com/users/mayankmahajan24/gists{/gist_id}","starred_url":"https://api.github.com/users/mayankmahajan24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mayankmahajan24/subscriptions","organizations_url":"https://api.github.com/users/mayankmahajan24/orgs","repos_url":"https://api.github.com/users/mayankmahajan24/repos","events_url":"https://api.github.com/users/mayankmahajan24/events{/privacy}","received_events_url":"https://api.github.com/users/mayankmahajan24/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mayankmahajan24/QL","description":"QL Language and Compiler, for Programming Langauges and Translators Course Fall 2015","fork":false,"url":"https://api.github.com/repos/mayankmahajan24/QL","forks_url":"https://api.github.com/repos/mayankmahajan24/QL/forks","keys_url":"https://api.github.com/repos/mayankmahajan24/QL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mayankmahajan24/QL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mayankmahajan24/QL/teams","hooks_url":"https://api.github.com/repos/mayankmahajan24/QL/hooks","issue_events_url":"https://api.github.com/repos/mayankmahajan24/QL/issues/events{/number}","events_url":"https://api.github.com/repos/mayankmahajan24/QL/events","assignees_url":"https://api.github.com/repos/mayankmahajan24/QL/assignees{/user}","branches_url":"https://api.github.com/repos/mayankmahajan24/QL/branches{/branch}","tags_url":"https://api.github.com/repos/mayankmahajan24/QL/tags","blobs_url":"https://api.github.com/repos/mayankmahajan24/QL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mayankmahajan24/QL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mayankmahajan24/QL/git/refs{/sha}","trees_url":"https://api.github.com/repos/mayankmahajan24/QL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mayankmahajan24/QL/statuses/{sha}","languages_url":"https://api.github.com/repos/mayankmahajan24/QL/languages","stargazers_url":"https://api.github.com/repos/mayankmahajan24/QL/stargazers","contributors_url":"https://api.github.com/repos/mayankmahajan24/QL/contributors","subscribers_url":"https://api.github.com/repos/mayankmahajan24/QL/subscribers","subscription_url":"https://api.github.com/repos/mayankmahajan24/QL/subscription","commits_url":"https://api.github.com/repos/mayankmahajan24/QL/commits{/sha}","git_commits_url":"https://api.github.com/repos/mayankmahajan24/QL/git/commits{/sha}","comments_url":"https://api.github.com/repos/mayankmahajan24/QL/comments{/number}","issue_comment_url":"https://api.github.com/repos/mayankmahajan24/QL/issues/comments{/number}","contents_url":"https://api.github.com/repos/mayankmahajan24/QL/contents/{+path}","compare_url":"https://api.github.com/repos/mayankmahajan24/QL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mayankmahajan24/QL/merges","archive_url":"https://api.github.com/repos/mayankmahajan24/QL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mayankmahajan24/QL/downloads","issues_url":"https://api.github.com/repos/mayankmahajan24/QL/issues{/number}","pulls_url":"https://api.github.com/repos/mayankmahajan24/QL/pulls{/number}","milestones_url":"https://api.github.com/repos/mayankmahajan24/QL/milestones{/number}","notifications_url":"https://api.github.com/repos/mayankmahajan24/QL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mayankmahajan24/QL/labels{/name}","releases_url":"https://api.github.com/repos/mayankmahajan24/QL/releases{/id}","created_at":"2015-10-21T20:52:45Z","updated_at":"2015-11-23T01:46:38Z","pushed_at":"2015-12-04T19:02:35Z","git_url":"git://github.com/mayankmahajan24/QL.git","ssh_url":"git@github.com:mayankmahajan24/QL.git","clone_url":"https://github.com/mayankmahajan24/QL.git","svn_url":"https://github.com/mayankmahajan24/QL","homepage":null,"size":280,"stargazers_count":3,"watchers_count":3,"language":"OCaml","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mayankmahajan24/QL/pulls/18"},"html":{"href":"https://github.com/mayankmahajan24/QL/pull/18"},"issue":{"href":"https://api.github.com/repos/mayankmahajan24/QL/issues/18"},"comments":{"href":"https://api.github.com/repos/mayankmahajan24/QL/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/mayankmahajan24/QL/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/mayankmahajan24/QL/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mayankmahajan24/QL/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/mayankmahajan24/QL/statuses/6dcda710c8492b70193a51afbf5a791462e26b97"}}}}