GitHub PullRequestReviewCommentEvent at 2014-09-02 20:24:36
Repository: traceur-compiler
Actor: hzr
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/google/traceur-compiler/pulls/comments/17013180","id":17013180,"diff_hunk":"@@ -0,0 +1,49 @@\n+// Copyright 2014 Traceur Authors.\n+//\n+// Licensed under the Apache License, Version 2.0 (the 'License');\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//      http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an 'AS IS' BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+import {ParseTreeTransformer} from './ParseTreeTransformer';\n+import {LiteralExpression} from '../syntax/trees/ParseTrees';\n+import {STRING} from '../syntax/TokenType';\n+\n+var re = /\\\\u{([0-9a-f]+)}/gi;\n+\n+function zeroPad(value) {\n+  return '0000'.slice(value.length) + value;\n+}\n+\n+function needsTransform(token) {\n+  return token.type === STRING && re.test(token.value);\n+}\n+\n+function transformToken(token) {\n+  return token.value.replace(re, (match, hexDigits) => {\n+    var codePoint = parseInt(hexDigits, 16);\n+    if (codePoint <= 0xFFFF) {\n+      return '\\\\u' + zeroPad(codePoint.toString(16).toUpperCase());","path":"src/codegeneration/UnicodeEscapeSequenceTransformer.js","position":33,"original_position":33,"commit_id":"7377efe4990e74f81a50efc738d6989b7067274c","original_commit_id":"7377efe4990e74f81a50efc738d6989b7067274c","user":{"login":"hzr","id":591881,"avatar_url":"https://avatars.githubusercontent.com/u/591881?v=2","gravatar_id":"7c96918ba38b567b53764af02e71d016","url":"https://api.github.com/users/hzr","html_url":"https://github.com/hzr","followers_url":"https://api.github.com/users/hzr/followers","following_url":"https://api.github.com/users/hzr/following{/other_user}","gists_url":"https://api.github.com/users/hzr/gists{/gist_id}","starred_url":"https://api.github.com/users/hzr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzr/subscriptions","organizations_url":"https://api.github.com/users/hzr/orgs","repos_url":"https://api.github.com/users/hzr/repos","events_url":"https://api.github.com/users/hzr/events{/privacy}","received_events_url":"https://api.github.com/users/hzr/received_events","type":"User","site_admin":false},"body":"Yea, it was just for stylistic purposes. I don't feel strongly either way, but I'll keep them unless someone feels strongly about removing them. :)","created_at":"2014-09-02T20:24:36Z","updated_at":"2014-09-02T20:24:36Z","html_url":"https://github.com/google/traceur-compiler/pull/1305#discussion_r17013180","pull_request_url":"https://api.github.com/repos/google/traceur-compiler/pulls/1305","_links":{"self":{"href":"https://api.github.com/repos/google/traceur-compiler/pulls/comments/17013180"},"html":{"href":"https://github.com/google/traceur-compiler/pull/1305#discussion_r17013180"},"pull_request":{"href":"https://api.github.com/repos/google/traceur-compiler/pulls/1305"}}},"pull_request":{"url":"https://api.github.com/repos/google/traceur-compiler/pulls/1305","id":20632134,"html_url":"https://github.com/google/traceur-compiler/pull/1305","diff_url":"https://github.com/google/traceur-compiler/pull/1305.diff","patch_url":"https://github.com/google/traceur-compiler/pull/1305.patch","issue_url":"https://api.github.com/repos/google/traceur-compiler/issues/1305","number":1305,"state":"open","locked":false,"title":"Add support for Unicode escape sequences (\\u{123})","user":{"login":"hzr","id":591881,"avatar_url":"https://avatars.githubusercontent.com/u/591881?v=2","gravatar_id":"7c96918ba38b567b53764af02e71d016","url":"https://api.github.com/users/hzr","html_url":"https://github.com/hzr","followers_url":"https://api.github.com/users/hzr/followers","following_url":"https://api.github.com/users/hzr/following{/other_user}","gists_url":"https://api.github.com/users/hzr/gists{/gist_id}","starred_url":"https://api.github.com/users/hzr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzr/subscriptions","organizations_url":"https://api.github.com/users/hzr/orgs","repos_url":"https://api.github.com/users/hzr/repos","events_url":"https://api.github.com/users/hzr/events{/privacy}","received_events_url":"https://api.github.com/users/hzr/received_events","type":"User","site_admin":false},"body":"Add support for Unicode escape sequences (\\u{123})","created_at":"2014-09-02T18:48:31Z","updated_at":"2014-09-02T20:24:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fb36b18e78447f35f120f7a97da26c98328f9c3d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/google/traceur-compiler/pulls/1305/commits","review_comments_url":"https://api.github.com/repos/google/traceur-compiler/pulls/1305/comments","review_comment_url":"https://api.github.com/repos/google/traceur-compiler/pulls/comments/{number}","comments_url":"https://api.github.com/repos/google/traceur-compiler/issues/1305/comments","statuses_url":"https://api.github.com/repos/google/traceur-compiler/statuses/7377efe4990e74f81a50efc738d6989b7067274c","head":{"label":"hzr:master","ref":"master","sha":"7377efe4990e74f81a50efc738d6989b7067274c","user":{"login":"hzr","id":591881,"avatar_url":"https://avatars.githubusercontent.com/u/591881?v=2","gravatar_id":"7c96918ba38b567b53764af02e71d016","url":"https://api.github.com/users/hzr","html_url":"https://github.com/hzr","followers_url":"https://api.github.com/users/hzr/followers","following_url":"https://api.github.com/users/hzr/following{/other_user}","gists_url":"https://api.github.com/users/hzr/gists{/gist_id}","starred_url":"https://api.github.com/users/hzr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzr/subscriptions","organizations_url":"https://api.github.com/users/hzr/orgs","repos_url":"https://api.github.com/users/hzr/repos","events_url":"https://api.github.com/users/hzr/events{/privacy}","received_events_url":"https://api.github.com/users/hzr/received_events","type":"User","site_admin":false},"repo":{"id":23590240,"name":"traceur-compiler","full_name":"hzr/traceur-compiler","owner":{"login":"hzr","id":591881,"avatar_url":"https://avatars.githubusercontent.com/u/591881?v=2","gravatar_id":"7c96918ba38b567b53764af02e71d016","url":"https://api.github.com/users/hzr","html_url":"https://github.com/hzr","followers_url":"https://api.github.com/users/hzr/followers","following_url":"https://api.github.com/users/hzr/following{/other_user}","gists_url":"https://api.github.com/users/hzr/gists{/gist_id}","starred_url":"https://api.github.com/users/hzr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzr/subscriptions","organizations_url":"https://api.github.com/users/hzr/orgs","repos_url":"https://api.github.com/users/hzr/repos","events_url":"https://api.github.com/users/hzr/events{/privacy}","received_events_url":"https://api.github.com/users/hzr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hzr/traceur-compiler","description":"Traceur is a JavaScript.next-to-JavaScript-of-today compiler","fork":true,"url":"https://api.github.com/repos/hzr/traceur-compiler","forks_url":"https://api.github.com/repos/hzr/traceur-compiler/forks","keys_url":"https://api.github.com/repos/hzr/traceur-compiler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hzr/traceur-compiler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hzr/traceur-compiler/teams","hooks_url":"https://api.github.com/repos/hzr/traceur-compiler/hooks","issue_events_url":"https://api.github.com/repos/hzr/traceur-compiler/issues/events{/number}","events_url":"https://api.github.com/repos/hzr/traceur-compiler/events","assignees_url":"https://api.github.com/repos/hzr/traceur-compiler/assignees{/user}","branches_url":"https://api.github.com/repos/hzr/traceur-compiler/branches{/branch}","tags_url":"https://api.github.com/repos/hzr/traceur-compiler/tags","blobs_url":"https://api.github.com/repos/hzr/traceur-compiler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hzr/traceur-compiler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hzr/traceur-compiler/git/refs{/sha}","trees_url":"https://api.github.com/repos/hzr/traceur-compiler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hzr/traceur-compiler/statuses/{sha}","languages_url":"https://api.github.com/repos/hzr/traceur-compiler/languages","stargazers_url":"https://api.github.com/repos/hzr/traceur-compiler/stargazers","contributors_url":"https://api.github.com/repos/hzr/traceur-compiler/contributors","subscribers_url":"https://api.github.com/repos/hzr/traceur-compiler/subscribers","subscription_url":"https://api.github.com/repos/hzr/traceur-compiler/subscription","commits_url":"https://api.github.com/repos/hzr/traceur-compiler/commits{/sha}","git_commits_url":"https://api.github.com/repos/hzr/traceur-compiler/git/commits{/sha}","comments_url":"https://api.github.com/repos/hzr/traceur-compiler/comments{/number}","issue_comment_url":"https://api.github.com/repos/hzr/traceur-compiler/issues/comments/{number}","contents_url":"https://api.github.com/repos/hzr/traceur-compiler/contents/{+path}","compare_url":"https://api.github.com/repos/hzr/traceur-compiler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hzr/traceur-compiler/merges","archive_url":"https://api.github.com/repos/hzr/traceur-compiler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hzr/traceur-compiler/downloads","issues_url":"https://api.github.com/repos/hzr/traceur-compiler/issues{/number}","pulls_url":"https://api.github.com/repos/hzr/traceur-compiler/pulls{/number}","milestones_url":"https://api.github.com/repos/hzr/traceur-compiler/milestones{/number}","notifications_url":"https://api.github.com/repos/hzr/traceur-compiler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hzr/traceur-compiler/labels{/name}","releases_url":"https://api.github.com/repos/hzr/traceur-compiler/releases{/id}","created_at":"2014-09-02T18:21:50Z","updated_at":"2014-09-02T18:26:08Z","pushed_at":"2014-09-02T18:46:42Z","git_url":"git://github.com/hzr/traceur-compiler.git","ssh_url":"git@github.com:hzr/traceur-compiler.git","clone_url":"https://github.com/hzr/traceur-compiler.git","svn_url":"https://github.com/hzr/traceur-compiler","homepage":"","size":38551,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"abe2a990145a48770e48c585d210b209d7685b74","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=2","gravatar_id":"24ba30616d2a20673f54c2aee36d159e","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":9060347,"name":"traceur-compiler","full_name":"google/traceur-compiler","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=2","gravatar_id":"24ba30616d2a20673f54c2aee36d159e","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/traceur-compiler","description":"Traceur is a JavaScript.next-to-JavaScript-of-today compiler","fork":false,"url":"https://api.github.com/repos/google/traceur-compiler","forks_url":"https://api.github.com/repos/google/traceur-compiler/forks","keys_url":"https://api.github.com/repos/google/traceur-compiler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/traceur-compiler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/traceur-compiler/teams","hooks_url":"https://api.github.com/repos/google/traceur-compiler/hooks","issue_events_url":"https://api.github.com/repos/google/traceur-compiler/issues/events{/number}","events_url":"https://api.github.com/repos/google/traceur-compiler/events","assignees_url":"https://api.github.com/repos/google/traceur-compiler/assignees{/user}","branches_url":"https://api.github.com/repos/google/traceur-compiler/branches{/branch}","tags_url":"https://api.github.com/repos/google/traceur-compiler/tags","blobs_url":"https://api.github.com/repos/google/traceur-compiler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/traceur-compiler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/traceur-compiler/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/traceur-compiler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/traceur-compiler/statuses/{sha}","languages_url":"https://api.github.com/repos/google/traceur-compiler/languages","stargazers_url":"https://api.github.com/repos/google/traceur-compiler/stargazers","contributors_url":"https://api.github.com/repos/google/traceur-compiler/contributors","subscribers_url":"https://api.github.com/repos/google/traceur-compiler/subscribers","subscription_url":"https://api.github.com/repos/google/traceur-compiler/subscription","commits_url":"https://api.github.com/repos/google/traceur-compiler/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/traceur-compiler/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/traceur-compiler/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/traceur-compiler/issues/comments/{number}","contents_url":"https://api.github.com/repos/google/traceur-compiler/contents/{+path}","compare_url":"https://api.github.com/repos/google/traceur-compiler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/traceur-compiler/merges","archive_url":"https://api.github.com/repos/google/traceur-compiler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/traceur-compiler/downloads","issues_url":"https://api.github.com/repos/google/traceur-compiler/issues{/number}","pulls_url":"https://api.github.com/repos/google/traceur-compiler/pulls{/number}","milestones_url":"https://api.github.com/repos/google/traceur-compiler/milestones{/number}","notifications_url":"https://api.github.com/repos/google/traceur-compiler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/traceur-compiler/labels{/name}","releases_url":"https://api.github.com/repos/google/traceur-compiler/releases{/id}","created_at":"2013-03-27T18:05:40Z","updated_at":"2014-09-02T18:55:23Z","pushed_at":"2014-09-02T16:54:15Z","git_url":"git://github.com/google/traceur-compiler.git","ssh_url":"git@github.com:google/traceur-compiler.git","clone_url":"https://github.com/google/traceur-compiler.git","svn_url":"https://github.com/google/traceur-compiler","homepage":"","size":38551,"stargazers_count":2933,"watchers_count":2933,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":185,"mirror_url":null,"open_issues_count":172,"forks":185,"open_issues":172,"watchers":2933,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/traceur-compiler/pulls/1305"},"html":{"href":"https://github.com/google/traceur-compiler/pull/1305"},"issue":{"href":"https://api.github.com/repos/google/traceur-compiler/issues/1305"},"comments":{"href":"https://api.github.com/repos/google/traceur-compiler/issues/1305/comments"},"review_comments":{"href":"https://api.github.com/repos/google/traceur-compiler/pulls/1305/comments"},"review_comment":{"href":"https://api.github.com/repos/google/traceur-compiler/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/google/traceur-compiler/pulls/1305/commits"},"statuses":{"href":"https://api.github.com/repos/google/traceur-compiler/statuses/7377efe4990e74f81a50efc738d6989b7067274c"}}}}