{"action":"created","comment":{"url":"https://api.github.com/repos/sq/JSIL/pulls/comments/39419763","id":39419763,"diff_hunk":"@@ -1130,11 +1138,28 @@ bool forDynamic\n             var translated = TranslateNode(node as dynamic);\n \n             var statement = translated as JSStatement;\n-            if (statement == null) {\n-                var expression = (JSExpression)translated;\n+            if (statement == null)\n+            {\n+                var expression = (JSExpression) translated;\n \n                 if (expression != null)\n+                {\n+                    var ranges =","path":"JSIL/ILBlockTranslator.cs","position":41,"original_position":41,"commit_id":"e5c28bc904ce957edbfe1d6bf3fd9d3fd6c13634","original_commit_id":"e5c28bc904ce957edbfe1d6bf3fd9d3fd6c13634","user":{"login":"iskiselev","id":5084964,"avatar_url":"https://avatars.githubusercontent.com/u/5084964?v=3","gravatar_id":"","url":"https://api.github.com/users/iskiselev","html_url":"https://github.com/iskiselev","followers_url":"https://api.github.com/users/iskiselev/followers","following_url":"https://api.github.com/users/iskiselev/following{/other_user}","gists_url":"https://api.github.com/users/iskiselev/gists{/gist_id}","starred_url":"https://api.github.com/users/iskiselev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iskiselev/subscriptions","organizations_url":"https://api.github.com/users/iskiselev/orgs","repos_url":"https://api.github.com/users/iskiselev/repos","events_url":"https://api.github.com/users/iskiselev/events{/privacy}","received_events_url":"https://api.github.com/users/iskiselev/received_events","type":"User","site_admin":false},"body":"Probably it would be better always preserve source ILRange in  JSNode on this stage, and introduce separate pass over converted AST representation to build SourceMap if needed, as this processing could be really more complicated.\r\nRight now JSIL may reuse JSNode (as variables) - and it may be a problem for this task. Will investigate a little bit more proper point of ILTranslation extension.\r\nWill be good if right solution would not require us rewrite each JSNode creation.","created_at":"2015-09-14T17:14:39Z","updated_at":"2015-09-14T17:14:39Z","html_url":"https://github.com/sq/JSIL/pull/852#discussion_r39419763","pull_request_url":"https://api.github.com/repos/sq/JSIL/pulls/852","_links":{"self":{"href":"https://api.github.com/repos/sq/JSIL/pulls/comments/39419763"},"html":{"href":"https://github.com/sq/JSIL/pull/852#discussion_r39419763"},"pull_request":{"href":"https://api.github.com/repos/sq/JSIL/pulls/852"}}},"pull_request":{"url":"https://api.github.com/repos/sq/JSIL/pulls/852","id":44915660,"html_url":"https://github.com/sq/JSIL/pull/852","diff_url":"https://github.com/sq/JSIL/pull/852.diff","patch_url":"https://github.com/sq/JSIL/pull/852.patch","issue_url":"https://api.github.com/repos/sq/JSIL/issues/852","number":852,"state":"open","locked":false,"title":"Source map initial support","user":{"login":"iskiselev","id":5084964,"avatar_url":"https://avatars.githubusercontent.com/u/5084964?v=3","gravatar_id":"","url":"https://api.github.com/users/iskiselev","html_url":"https://github.com/iskiselev","followers_url":"https://api.github.com/users/iskiselev/followers","following_url":"https://api.github.com/users/iskiselev/following{/other_user}","gists_url":"https://api.github.com/users/iskiselev/gists{/gist_id}","starred_url":"https://api.github.com/users/iskiselev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iskiselev/subscriptions","organizations_url":"https://api.github.com/users/iskiselev/orgs","repos_url":"https://api.github.com/users/iskiselev/repos","events_url":"https://api.github.com/users/iskiselev/events{/privacy}","received_events_url":"https://api.github.com/users/iskiselev/received_events","type":"User","site_admin":false},"body":"Looks like I was able add some initial support of Source maps (#76). For now it was done not very clean and mostly hackish, but it already works in Chrome/IE/Visual Studio.\r\nTo enable their generation, user need add `BuildSourceMap : true` key in .jsilconfig.","created_at":"2015-09-14T10:43:47Z","updated_at":"2015-09-14T17:14:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"df18d6226885d963d7995c71729884fcfeecb8d8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sq/JSIL/pulls/852/commits","review_comments_url":"https://api.github.com/repos/sq/JSIL/pulls/852/comments","review_comment_url":"https://api.github.com/repos/sq/JSIL/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sq/JSIL/issues/852/comments","statuses_url":"https://api.github.com/repos/sq/JSIL/statuses/e5c28bc904ce957edbfe1d6bf3fd9d3fd6c13634","head":{"label":"iskiselev:SourceMap","ref":"SourceMap","sha":"e5c28bc904ce957edbfe1d6bf3fd9d3fd6c13634","user":{"login":"iskiselev","id":5084964,"avatar_url":"https://avatars.githubusercontent.com/u/5084964?v=3","gravatar_id":"","url":"https://api.github.com/users/iskiselev","html_url":"https://github.com/iskiselev","followers_url":"https://api.github.com/users/iskiselev/followers","following_url":"https://api.github.com/users/iskiselev/following{/other_user}","gists_url":"https://api.github.com/users/iskiselev/gists{/gist_id}","starred_url":"https://api.github.com/users/iskiselev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iskiselev/subscriptions","organizations_url":"https://api.github.com/users/iskiselev/orgs","repos_url":"https://api.github.com/users/iskiselev/repos","events_url":"https://api.github.com/users/iskiselev/events{/privacy}","received_events_url":"https://api.github.com/users/iskiselev/received_events","type":"User","site_admin":false},"repo":{"id":11807440,"name":"JSIL","full_name":"iskiselev/JSIL","owner":{"login":"iskiselev","id":5084964,"avatar_url":"https://avatars.githubusercontent.com/u/5084964?v=3","gravatar_id":"","url":"https://api.github.com/users/iskiselev","html_url":"https://github.com/iskiselev","followers_url":"https://api.github.com/users/iskiselev/followers","following_url":"https://api.github.com/users/iskiselev/following{/other_user}","gists_url":"https://api.github.com/users/iskiselev/gists{/gist_id}","starred_url":"https://api.github.com/users/iskiselev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iskiselev/subscriptions","organizations_url":"https://api.github.com/users/iskiselev/orgs","repos_url":"https://api.github.com/users/iskiselev/repos","events_url":"https://api.github.com/users/iskiselev/events{/privacy}","received_events_url":"https://api.github.com/users/iskiselev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iskiselev/JSIL","description":"CIL to Javascript Compiler","fork":true,"url":"https://api.github.com/repos/iskiselev/JSIL","forks_url":"https://api.github.com/repos/iskiselev/JSIL/forks","keys_url":"https://api.github.com/repos/iskiselev/JSIL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iskiselev/JSIL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iskiselev/JSIL/teams","hooks_url":"https://api.github.com/repos/iskiselev/JSIL/hooks","issue_events_url":"https://api.github.com/repos/iskiselev/JSIL/issues/events{/number}","events_url":"https://api.github.com/repos/iskiselev/JSIL/events","assignees_url":"https://api.github.com/repos/iskiselev/JSIL/assignees{/user}","branches_url":"https://api.github.com/repos/iskiselev/JSIL/branches{/branch}","tags_url":"https://api.github.com/repos/iskiselev/JSIL/tags","blobs_url":"https://api.github.com/repos/iskiselev/JSIL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iskiselev/JSIL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iskiselev/JSIL/git/refs{/sha}","trees_url":"https://api.github.com/repos/iskiselev/JSIL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iskiselev/JSIL/statuses/{sha}","languages_url":"https://api.github.com/repos/iskiselev/JSIL/languages","stargazers_url":"https://api.github.com/repos/iskiselev/JSIL/stargazers","contributors_url":"https://api.github.com/repos/iskiselev/JSIL/contributors","subscribers_url":"https://api.github.com/repos/iskiselev/JSIL/subscribers","subscription_url":"https://api.github.com/repos/iskiselev/JSIL/subscription","commits_url":"https://api.github.com/repos/iskiselev/JSIL/commits{/sha}","git_commits_url":"https://api.github.com/repos/iskiselev/JSIL/git/commits{/sha}","comments_url":"https://api.github.com/repos/iskiselev/JSIL/comments{/number}","issue_comment_url":"https://api.github.com/repos/iskiselev/JSIL/issues/comments{/number}","contents_url":"https://api.github.com/repos/iskiselev/JSIL/contents/{+path}","compare_url":"https://api.github.com/repos/iskiselev/JSIL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iskiselev/JSIL/merges","archive_url":"https://api.github.com/repos/iskiselev/JSIL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iskiselev/JSIL/downloads","issues_url":"https://api.github.com/repos/iskiselev/JSIL/issues{/number}","pulls_url":"https://api.github.com/repos/iskiselev/JSIL/pulls{/number}","milestones_url":"https://api.github.com/repos/iskiselev/JSIL/milestones{/number}","notifications_url":"https://api.github.com/repos/iskiselev/JSIL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iskiselev/JSIL/labels{/name}","releases_url":"https://api.github.com/repos/iskiselev/JSIL/releases{/id}","created_at":"2013-08-01T03:50:01Z","updated_at":"2015-08-04T16:41:05Z","pushed_at":"2015-09-14T10:40:18Z","git_url":"git://github.com/iskiselev/JSIL.git","ssh_url":"git@github.com:iskiselev/JSIL.git","clone_url":"https://github.com/iskiselev/JSIL.git","svn_url":"https://github.com/iskiselev/JSIL","homepage":"http://jsil.org/","size":124132,"stargazers_count":2,"watchers_count":2,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":0,"forks":3,"open_issues":0,"watchers":2,"default_branch":"opus"}},"base":{"label":"sq:master","ref":"master","sha":"3c2961904e44d28a769fd31b3dd969a9f02b6fca","user":{"login":"sq","id":4993185,"avatar_url":"https://avatars.githubusercontent.com/u/4993185?v=3","gravatar_id":"","url":"https://api.github.com/users/sq","html_url":"https://github.com/sq","followers_url":"https://api.github.com/users/sq/followers","following_url":"https://api.github.com/users/sq/following{/other_user}","gists_url":"https://api.github.com/users/sq/gists{/gist_id}","starred_url":"https://api.github.com/users/sq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sq/subscriptions","organizations_url":"https://api.github.com/users/sq/orgs","repos_url":"https://api.github.com/users/sq/repos","events_url":"https://api.github.com/users/sq/events{/privacy}","received_events_url":"https://api.github.com/users/sq/received_events","type":"Organization","site_admin":false},"repo":{"id":1594220,"name":"JSIL","full_name":"sq/JSIL","owner":{"login":"sq","id":4993185,"avatar_url":"https://avatars.githubusercontent.com/u/4993185?v=3","gravatar_id":"","url":"https://api.github.com/users/sq","html_url":"https://github.com/sq","followers_url":"https://api.github.com/users/sq/followers","following_url":"https://api.github.com/users/sq/following{/other_user}","gists_url":"https://api.github.com/users/sq/gists{/gist_id}","starred_url":"https://api.github.com/users/sq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sq/subscriptions","organizations_url":"https://api.github.com/users/sq/orgs","repos_url":"https://api.github.com/users/sq/repos","events_url":"https://api.github.com/users/sq/events{/privacy}","received_events_url":"https://api.github.com/users/sq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sq/JSIL","description":"CIL to Javascript Compiler","fork":false,"url":"https://api.github.com/repos/sq/JSIL","forks_url":"https://api.github.com/repos/sq/JSIL/forks","keys_url":"https://api.github.com/repos/sq/JSIL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sq/JSIL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sq/JSIL/teams","hooks_url":"https://api.github.com/repos/sq/JSIL/hooks","issue_events_url":"https://api.github.com/repos/sq/JSIL/issues/events{/number}","events_url":"https://api.github.com/repos/sq/JSIL/events","assignees_url":"https://api.github.com/repos/sq/JSIL/assignees{/user}","branches_url":"https://api.github.com/repos/sq/JSIL/branches{/branch}","tags_url":"https://api.github.com/repos/sq/JSIL/tags","blobs_url":"https://api.github.com/repos/sq/JSIL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sq/JSIL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sq/JSIL/git/refs{/sha}","trees_url":"https://api.github.com/repos/sq/JSIL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sq/JSIL/statuses/{sha}","languages_url":"https://api.github.com/repos/sq/JSIL/languages","stargazers_url":"https://api.github.com/repos/sq/JSIL/stargazers","contributors_url":"https://api.github.com/repos/sq/JSIL/contributors","subscribers_url":"https://api.github.com/repos/sq/JSIL/subscribers","subscription_url":"https://api.github.com/repos/sq/JSIL/subscription","commits_url":"https://api.github.com/repos/sq/JSIL/commits{/sha}","git_commits_url":"https://api.github.com/repos/sq/JSIL/git/commits{/sha}","comments_url":"https://api.github.com/repos/sq/JSIL/comments{/number}","issue_comment_url":"https://api.github.com/repos/sq/JSIL/issues/comments{/number}","contents_url":"https://api.github.com/repos/sq/JSIL/contents/{+path}","compare_url":"https://api.github.com/repos/sq/JSIL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sq/JSIL/merges","archive_url":"https://api.github.com/repos/sq/JSIL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sq/JSIL/downloads","issues_url":"https://api.github.com/repos/sq/JSIL/issues{/number}","pulls_url":"https://api.github.com/repos/sq/JSIL/pulls{/number}","milestones_url":"https://api.github.com/repos/sq/JSIL/milestones{/number}","notifications_url":"https://api.github.com/repos/sq/JSIL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sq/JSIL/labels{/name}","releases_url":"https://api.github.com/repos/sq/JSIL/releases{/id}","created_at":"2011-04-10T07:59:55Z","updated_at":"2015-09-13T01:56:04Z","pushed_at":"2015-09-14T14:36:30Z","git_url":"git://github.com/sq/JSIL.git","ssh_url":"git@github.com:sq/JSIL.git","clone_url":"https://github.com/sq/JSIL.git","svn_url":"https://github.com/sq/JSIL","homepage":"http://jsil.org/","size":126029,"stargazers_count":1050,"watchers_count":1050,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":194,"mirror_url":null,"open_issues_count":279,"forks":194,"open_issues":279,"watchers":1050,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sq/JSIL/pulls/852"},"html":{"href":"https://github.com/sq/JSIL/pull/852"},"issue":{"href":"https://api.github.com/repos/sq/JSIL/issues/852"},"comments":{"href":"https://api.github.com/repos/sq/JSIL/issues/852/comments"},"review_comments":{"href":"https://api.github.com/repos/sq/JSIL/pulls/852/comments"},"review_comment":{"href":"https://api.github.com/repos/sq/JSIL/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sq/JSIL/pulls/852/commits"},"statuses":{"href":"https://api.github.com/repos/sq/JSIL/statuses/e5c28bc904ce957edbfe1d6bf3fd9d3fd6c13634"}}}}