{"action":"created","comment":{"url":"https://api.github.com/repos/google/traceur-compiler/pulls/comments/25849814","id":25849814,"diff_hunk":"@@ -0,0 +1,261 @@\n+// Copyright 2015 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 {\n+  CONSTRUCTOR\n+} from '../syntax/PredefinedName.js';\n+import {\n+  AnonBlock,\n+  ClassExpression,\n+  GetAccessor,\n+  PropertyMethodAssignment,\n+  SetAccessor,\n+  LiteralPropertyName,\n+} from '../syntax/trees/ParseTrees.js';\n+import {\n+  CALL_EXPRESSION,\n+  EXPRESSION_STATEMENT,\n+  GET_ACCESSOR,\n+  PROPERTY_METHOD_ASSIGNMENT,\n+  PROPERTY_VARIABLE_DECLARATION,\n+  SET_ACCESSOR,\n+  SUPER_EXPRESSION\n+} from '../syntax/trees/ParseTreeType.js';\n+import {TempVarTransformer} from './TempVarTransformer.js';\n+import {ParseTreeTransformer} from './ParseTreeTransformer.js';\n+import {\n+  createBindingIdentifier,\n+  createClassDeclaration,\n+  createCommaExpression,\n+  createEmptyParameterList,\n+  createExpressionStatement,\n+  createFunctionBody,\n+  createIdentifierToken,\n+  createImmediatelyInvokedFunctionExpression,\n+  createPropertyNameAssignment,} from './ParseTreeFactory.js';\n+import {parseStatement, parseExpression} from './PlaceholderParser.js';\n+import {propName} from '../staticsemantics/PropName.js';\n+import {prependStatements} from './PrependStatements.js';\n+\n+// TODO(vicb): comment\n+\n+export class ES6ClassTransformer extends TempVarTransformer {\n+  /**\n+   * @param {UniqueIdentifierGenerator} identifierGenerator\n+   */\n+  constructor(identifierGenerator) {\n+    super(identifierGenerator);\n+  }\n+\n+  transformClassElements_(tree) {\n+    let superClass = this.transformAny(tree.superClass);\n+\n+    let elements = [];\n+    let initInstanceVars = [], initStaticVars = [];\n+    let constructor;\n+    let constructorIndex = 0;\n+\n+    tree.elements.forEach((tree) => {\n+      let initVars;\n+      if (tree.isStatic) {\n+        initVars = initStaticVars;\n+      } else {\n+        initVars = initInstanceVars;\n+      }\n+\n+      switch (tree.type) {\n+        case GET_ACCESSOR:\n+          let getter = new GetAccessor(tree.location, tree.isSatic, tree.name,","path":"src/codegeneration/ES6ClassTransformer.js","position":79,"original_position":79,"commit_id":"9a9c9946776e73eb0f410dacc3074de0be133e2f","original_commit_id":"9a9c9946776e73eb0f410dacc3074de0be133e2f","user":{"login":"arv","id":45845,"avatar_url":"https://avatars.githubusercontent.com/u/45845?v=3","gravatar_id":"","url":"https://api.github.com/users/arv","html_url":"https://github.com/arv","followers_url":"https://api.github.com/users/arv/followers","following_url":"https://api.github.com/users/arv/following{/other_user}","gists_url":"https://api.github.com/users/arv/gists{/gist_id}","starred_url":"https://api.github.com/users/arv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arv/subscriptions","organizations_url":"https://api.github.com/users/arv/orgs","repos_url":"https://api.github.com/users/arv/repos","events_url":"https://api.github.com/users/arv/events{/privacy}","received_events_url":"https://api.github.com/users/arv/received_events","type":"User","site_admin":false},"body":"typo isSatic. Is there a missing test?","created_at":"2015-03-05T09:25:13Z","updated_at":"2015-03-05T09:25:13Z","html_url":"https://github.com/google/traceur-compiler/pull/1791#discussion_r25849814","pull_request_url":"https://api.github.com/repos/google/traceur-compiler/pulls/1791","_links":{"self":{"href":"https://api.github.com/repos/google/traceur-compiler/pulls/comments/25849814"},"html":{"href":"https://github.com/google/traceur-compiler/pull/1791#discussion_r25849814"},"pull_request":{"href":"https://api.github.com/repos/google/traceur-compiler/pulls/1791"}}},"pull_request":{"url":"https://api.github.com/repos/google/traceur-compiler/pulls/1791","id":30456388,"html_url":"https://github.com/google/traceur-compiler/pull/1791","diff_url":"https://github.com/google/traceur-compiler/pull/1791.diff","patch_url":"https://github.com/google/traceur-compiler/pull/1791.patch","issue_url":"https://api.github.com/repos/google/traceur-compiler/issues/1791","number":1791,"state":"open","locked":false,"title":"[WIP] Member variables in ES6","user":{"login":"vicb","id":248818,"avatar_url":"https://avatars.githubusercontent.com/u/248818?v=3","gravatar_id":"","url":"https://api.github.com/users/vicb","html_url":"https://github.com/vicb","followers_url":"https://api.github.com/users/vicb/followers","following_url":"https://api.github.com/users/vicb/following{/other_user}","gists_url":"https://api.github.com/users/vicb/gists{/gist_id}","starred_url":"https://api.github.com/users/vicb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicb/subscriptions","organizations_url":"https://api.github.com/users/vicb/orgs","repos_url":"https://api.github.com/users/vicb/repos","events_url":"https://api.github.com/users/vicb/events{/privacy}","received_events_url":"https://api.github.com/users/vicb/received_events","type":"User","site_admin":false},"body":"**Disclaimer: This is a very early proto to get some feedback**\r\n\r\nrelates to #1708 \r\n\r\n/cc @arv @caitp\r\n\r\nTODO:\r\n- [x] generated ctor if super class - currently ```parseStatement `super(...arguments)` ``` fails,\r\n- [x] the coma expression (class expression) is not valid: `let` and \";\",\r\n- [ ] add tests","created_at":"2015-03-04T11:11:35Z","updated_at":"2015-03-05T09:25:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c1ad1180583bbf44f83c3ca37e3e88b3c6c36354","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/google/traceur-compiler/pulls/1791/commits","review_comments_url":"https://api.github.com/repos/google/traceur-compiler/pulls/1791/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/1791/comments","statuses_url":"https://api.github.com/repos/google/traceur-compiler/statuses/9a9c9946776e73eb0f410dacc3074de0be133e2f","head":{"label":"vicb:0304-mves6","ref":"0304-mves6","sha":"9a9c9946776e73eb0f410dacc3074de0be133e2f","user":{"login":"vicb","id":248818,"avatar_url":"https://avatars.githubusercontent.com/u/248818?v=3","gravatar_id":"","url":"https://api.github.com/users/vicb","html_url":"https://github.com/vicb","followers_url":"https://api.github.com/users/vicb/followers","following_url":"https://api.github.com/users/vicb/following{/other_user}","gists_url":"https://api.github.com/users/vicb/gists{/gist_id}","starred_url":"https://api.github.com/users/vicb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicb/subscriptions","organizations_url":"https://api.github.com/users/vicb/orgs","repos_url":"https://api.github.com/users/vicb/repos","events_url":"https://api.github.com/users/vicb/events{/privacy}","received_events_url":"https://api.github.com/users/vicb/received_events","type":"User","site_admin":false},"repo":{"id":24492000,"name":"traceur-compiler","full_name":"vicb/traceur-compiler","owner":{"login":"vicb","id":248818,"avatar_url":"https://avatars.githubusercontent.com/u/248818?v=3","gravatar_id":"","url":"https://api.github.com/users/vicb","html_url":"https://github.com/vicb","followers_url":"https://api.github.com/users/vicb/followers","following_url":"https://api.github.com/users/vicb/following{/other_user}","gists_url":"https://api.github.com/users/vicb/gists{/gist_id}","starred_url":"https://api.github.com/users/vicb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicb/subscriptions","organizations_url":"https://api.github.com/users/vicb/orgs","repos_url":"https://api.github.com/users/vicb/repos","events_url":"https://api.github.com/users/vicb/events{/privacy}","received_events_url":"https://api.github.com/users/vicb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vicb/traceur-compiler","description":"Traceur is a JavaScript.next-to-JavaScript-of-today compiler","fork":true,"url":"https://api.github.com/repos/vicb/traceur-compiler","forks_url":"https://api.github.com/repos/vicb/traceur-compiler/forks","keys_url":"https://api.github.com/repos/vicb/traceur-compiler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vicb/traceur-compiler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vicb/traceur-compiler/teams","hooks_url":"https://api.github.com/repos/vicb/traceur-compiler/hooks","issue_events_url":"https://api.github.com/repos/vicb/traceur-compiler/issues/events{/number}","events_url":"https://api.github.com/repos/vicb/traceur-compiler/events","assignees_url":"https://api.github.com/repos/vicb/traceur-compiler/assignees{/user}","branches_url":"https://api.github.com/repos/vicb/traceur-compiler/branches{/branch}","tags_url":"https://api.github.com/repos/vicb/traceur-compiler/tags","blobs_url":"https://api.github.com/repos/vicb/traceur-compiler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vicb/traceur-compiler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vicb/traceur-compiler/git/refs{/sha}","trees_url":"https://api.github.com/repos/vicb/traceur-compiler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vicb/traceur-compiler/statuses/{sha}","languages_url":"https://api.github.com/repos/vicb/traceur-compiler/languages","stargazers_url":"https://api.github.com/repos/vicb/traceur-compiler/stargazers","contributors_url":"https://api.github.com/repos/vicb/traceur-compiler/contributors","subscribers_url":"https://api.github.com/repos/vicb/traceur-compiler/subscribers","subscription_url":"https://api.github.com/repos/vicb/traceur-compiler/subscription","commits_url":"https://api.github.com/repos/vicb/traceur-compiler/commits{/sha}","git_commits_url":"https://api.github.com/repos/vicb/traceur-compiler/git/commits{/sha}","comments_url":"https://api.github.com/repos/vicb/traceur-compiler/comments{/number}","issue_comment_url":"https://api.github.com/repos/vicb/traceur-compiler/issues/comments{/number}","contents_url":"https://api.github.com/repos/vicb/traceur-compiler/contents/{+path}","compare_url":"https://api.github.com/repos/vicb/traceur-compiler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vicb/traceur-compiler/merges","archive_url":"https://api.github.com/repos/vicb/traceur-compiler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vicb/traceur-compiler/downloads","issues_url":"https://api.github.com/repos/vicb/traceur-compiler/issues{/number}","pulls_url":"https://api.github.com/repos/vicb/traceur-compiler/pulls{/number}","milestones_url":"https://api.github.com/repos/vicb/traceur-compiler/milestones{/number}","notifications_url":"https://api.github.com/repos/vicb/traceur-compiler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vicb/traceur-compiler/labels{/name}","releases_url":"https://api.github.com/repos/vicb/traceur-compiler/releases{/id}","created_at":"2014-09-26T08:23:43Z","updated_at":"2015-03-04T11:08:46Z","pushed_at":"2015-03-05T08:57:24Z","git_url":"git://github.com/vicb/traceur-compiler.git","ssh_url":"git@github.com:vicb/traceur-compiler.git","clone_url":"https://github.com/vicb/traceur-compiler.git","svn_url":"https://github.com/vicb/traceur-compiler","homepage":"","size":20662,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":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":"980cc4bc04b820e38c571e4713bea9d9c559aa19","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","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=3","gravatar_id":"","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":"2015-03-05T09:03:08Z","pushed_at":"2015-03-03T16:04:05Z","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":36480,"stargazers_count":4698,"watchers_count":4698,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":280,"mirror_url":null,"open_issues_count":252,"forks":280,"open_issues":252,"watchers":4698,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/traceur-compiler/pulls/1791"},"html":{"href":"https://github.com/google/traceur-compiler/pull/1791"},"issue":{"href":"https://api.github.com/repos/google/traceur-compiler/issues/1791"},"comments":{"href":"https://api.github.com/repos/google/traceur-compiler/issues/1791/comments"},"review_comments":{"href":"https://api.github.com/repos/google/traceur-compiler/pulls/1791/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/1791/commits"},"statuses":{"href":"https://api.github.com/repos/google/traceur-compiler/statuses/9a9c9946776e73eb0f410dacc3074de0be133e2f"}}}}