{"action":"created","comment":{"url":"https://api.github.com/repos/ternjs/acorn/pulls/comments/75349076","id":75349076,"diff_hunk":"@@ -424,17 +442,23 @@ pp.parseVarId = function(decl) {\n // Parse a function declaration or literal (depending on the\n // `isStatement` parameter).\n \n-pp.parseFunction = function(node, isStatement, allowExpressionBody) {\n+pp.parseFunction = function(node, isStatement, allowExpressionBody, isAsync) {\n   this.initFunction(node)\n-  if (this.options.ecmaVersion >= 6)\n+  if (this.options.ecmaVersion >= 6 && !isAsync)\n     node.generator = this.eat(tt.star)\n-  var oldInGen = this.inGenerator\n+  if (this.options.ecmaVersion >= 8)\n+    node.async = !!isAsync\n+  if (isStatement && this.type === tt.name)","path":"src/statement.js","position":55,"original_position":55,"commit_id":"d885d637d193d365abe257eae46f9f82f0c8bc5a","original_commit_id":"9fd3cb89350d7c344b5edfb68761d1dbfd971a02","user":{"login":"xiemaisi","id":501353,"avatar_url":"https://avatars.githubusercontent.com/u/501353?v=3","gravatar_id":"","url":"https://api.github.com/users/xiemaisi","html_url":"https://github.com/xiemaisi","followers_url":"https://api.github.com/users/xiemaisi/followers","following_url":"https://api.github.com/users/xiemaisi/following{/other_user}","gists_url":"https://api.github.com/users/xiemaisi/gists{/gist_id}","starred_url":"https://api.github.com/users/xiemaisi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiemaisi/subscriptions","organizations_url":"https://api.github.com/users/xiemaisi/orgs","repos_url":"https://api.github.com/users/xiemaisi/repos","events_url":"https://api.github.com/users/xiemaisi/events{/privacy}","received_events_url":"https://api.github.com/users/xiemaisi/received_events","type":"User","site_admin":false},"body":"Or rather, drop `this.type === tt.name` since you're handling the case of `!isStatement` below.","created_at":"2016-08-18T17:14:28Z","updated_at":"2016-08-18T17:14:28Z","html_url":"https://github.com/ternjs/acorn/pull/446#discussion_r75349076","pull_request_url":"https://api.github.com/repos/ternjs/acorn/pulls/446","_links":{"self":{"href":"https://api.github.com/repos/ternjs/acorn/pulls/comments/75349076"},"html":{"href":"https://github.com/ternjs/acorn/pull/446#discussion_r75349076"},"pull_request":{"href":"https://api.github.com/repos/ternjs/acorn/pulls/446"}}},"pull_request":{"url":"https://api.github.com/repos/ternjs/acorn/pulls/446","id":80256942,"html_url":"https://github.com/ternjs/acorn/pull/446","diff_url":"https://github.com/ternjs/acorn/pull/446.diff","patch_url":"https://github.com/ternjs/acorn/pull/446.patch","issue_url":"https://api.github.com/repos/ternjs/acorn/issues/446","number":446,"state":"open","locked":false,"title":"Async functions and await expressions","user":{"login":"mysticatea","id":1937871,"avatar_url":"https://avatars.githubusercontent.com/u/1937871?v=3","gravatar_id":"","url":"https://api.github.com/users/mysticatea","html_url":"https://github.com/mysticatea","followers_url":"https://api.github.com/users/mysticatea/followers","following_url":"https://api.github.com/users/mysticatea/following{/other_user}","gists_url":"https://api.github.com/users/mysticatea/gists{/gist_id}","starred_url":"https://api.github.com/users/mysticatea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysticatea/subscriptions","organizations_url":"https://api.github.com/users/mysticatea/orgs","repos_url":"https://api.github.com/users/mysticatea/repos","events_url":"https://api.github.com/users/mysticatea/events{/privacy}","received_events_url":"https://api.github.com/users/mysticatea/received_events","type":"User","site_admin":false},"body":"[Async functions](https://tc39.github.io/ecmascript-asyncawait/) proposal arrived stage 4.\r\nI'm investigating to implement async/await.\r\nThis is work in progress, but I'm happy to be reviewed and asked any concerns.\r\n\r\nIf acorn will not consider accepting stage 4 features, please close this PR.\r\n\r\n- [x] basic\r\n  - [x] async function declaration\r\n  - [x] async function expression\r\n  - [x] async arrow function expression\r\n  - [x] async method\r\n  - [x] await expression\r\n- [x] early errors\r\n  - [x] async function declaration\r\n  - [x] async function expression\r\n  - [x] async arrow function expression\r\n  - [x] async method\r\n  - [x] await expression\r\n- [x] tests\r\n  - [x] async function declaration\r\n  - [x] async function expression\r\n  - [x] async arrow function expression\r\n  - [x] async method\r\n  - [x] await expression\r\n- [x] for loose parser\r\n  - [x] async function declaration\r\n  - [x] async function expression\r\n  - [x] async arrow function expression\r\n  - [x] async method\r\n  - [x] await expression","created_at":"2016-08-05T14:57:14Z","updated_at":"2016-08-18T17:14:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88170131c0ac1af39ddc7e7fe34eff0ae4c9f4d7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ternjs/acorn/pulls/446/commits","review_comments_url":"https://api.github.com/repos/ternjs/acorn/pulls/446/comments","review_comment_url":"https://api.github.com/repos/ternjs/acorn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ternjs/acorn/issues/446/comments","statuses_url":"https://api.github.com/repos/ternjs/acorn/statuses/d885d637d193d365abe257eae46f9f82f0c8bc5a","head":{"label":"mysticatea:asyncawait","ref":"asyncawait","sha":"d885d637d193d365abe257eae46f9f82f0c8bc5a","user":{"login":"mysticatea","id":1937871,"avatar_url":"https://avatars.githubusercontent.com/u/1937871?v=3","gravatar_id":"","url":"https://api.github.com/users/mysticatea","html_url":"https://github.com/mysticatea","followers_url":"https://api.github.com/users/mysticatea/followers","following_url":"https://api.github.com/users/mysticatea/following{/other_user}","gists_url":"https://api.github.com/users/mysticatea/gists{/gist_id}","starred_url":"https://api.github.com/users/mysticatea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysticatea/subscriptions","organizations_url":"https://api.github.com/users/mysticatea/orgs","repos_url":"https://api.github.com/users/mysticatea/repos","events_url":"https://api.github.com/users/mysticatea/events{/privacy}","received_events_url":"https://api.github.com/users/mysticatea/received_events","type":"User","site_admin":false},"repo":{"id":48205283,"name":"acorn","full_name":"mysticatea/acorn","owner":{"login":"mysticatea","id":1937871,"avatar_url":"https://avatars.githubusercontent.com/u/1937871?v=3","gravatar_id":"","url":"https://api.github.com/users/mysticatea","html_url":"https://github.com/mysticatea","followers_url":"https://api.github.com/users/mysticatea/followers","following_url":"https://api.github.com/users/mysticatea/following{/other_user}","gists_url":"https://api.github.com/users/mysticatea/gists{/gist_id}","starred_url":"https://api.github.com/users/mysticatea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysticatea/subscriptions","organizations_url":"https://api.github.com/users/mysticatea/orgs","repos_url":"https://api.github.com/users/mysticatea/repos","events_url":"https://api.github.com/users/mysticatea/events{/privacy}","received_events_url":"https://api.github.com/users/mysticatea/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mysticatea/acorn","description":"A small, fast, JavaScript-based JavaScript parser","fork":true,"url":"https://api.github.com/repos/mysticatea/acorn","forks_url":"https://api.github.com/repos/mysticatea/acorn/forks","keys_url":"https://api.github.com/repos/mysticatea/acorn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mysticatea/acorn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mysticatea/acorn/teams","hooks_url":"https://api.github.com/repos/mysticatea/acorn/hooks","issue_events_url":"https://api.github.com/repos/mysticatea/acorn/issues/events{/number}","events_url":"https://api.github.com/repos/mysticatea/acorn/events","assignees_url":"https://api.github.com/repos/mysticatea/acorn/assignees{/user}","branches_url":"https://api.github.com/repos/mysticatea/acorn/branches{/branch}","tags_url":"https://api.github.com/repos/mysticatea/acorn/tags","blobs_url":"https://api.github.com/repos/mysticatea/acorn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mysticatea/acorn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mysticatea/acorn/git/refs{/sha}","trees_url":"https://api.github.com/repos/mysticatea/acorn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mysticatea/acorn/statuses/{sha}","languages_url":"https://api.github.com/repos/mysticatea/acorn/languages","stargazers_url":"https://api.github.com/repos/mysticatea/acorn/stargazers","contributors_url":"https://api.github.com/repos/mysticatea/acorn/contributors","subscribers_url":"https://api.github.com/repos/mysticatea/acorn/subscribers","subscription_url":"https://api.github.com/repos/mysticatea/acorn/subscription","commits_url":"https://api.github.com/repos/mysticatea/acorn/commits{/sha}","git_commits_url":"https://api.github.com/repos/mysticatea/acorn/git/commits{/sha}","comments_url":"https://api.github.com/repos/mysticatea/acorn/comments{/number}","issue_comment_url":"https://api.github.com/repos/mysticatea/acorn/issues/comments{/number}","contents_url":"https://api.github.com/repos/mysticatea/acorn/contents/{+path}","compare_url":"https://api.github.com/repos/mysticatea/acorn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mysticatea/acorn/merges","archive_url":"https://api.github.com/repos/mysticatea/acorn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mysticatea/acorn/downloads","issues_url":"https://api.github.com/repos/mysticatea/acorn/issues{/number}","pulls_url":"https://api.github.com/repos/mysticatea/acorn/pulls{/number}","milestones_url":"https://api.github.com/repos/mysticatea/acorn/milestones{/number}","notifications_url":"https://api.github.com/repos/mysticatea/acorn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mysticatea/acorn/labels{/name}","releases_url":"https://api.github.com/repos/mysticatea/acorn/releases{/id}","deployments_url":"https://api.github.com/repos/mysticatea/acorn/deployments","created_at":"2015-12-18T00:20:37Z","updated_at":"2016-06-11T09:26:09Z","pushed_at":"2016-08-17T13:33:53Z","git_url":"git://github.com/mysticatea/acorn.git","ssh_url":"git@github.com:mysticatea/acorn.git","clone_url":"https://github.com/mysticatea/acorn.git","svn_url":"https://github.com/mysticatea/acorn","homepage":"","size":3214,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"ternjs:master","ref":"master","sha":"57a50c68d8d897d29b5ed482fbeebdd46105fd4e","user":{"login":"ternjs","id":8876849,"avatar_url":"https://avatars.githubusercontent.com/u/8876849?v=3","gravatar_id":"","url":"https://api.github.com/users/ternjs","html_url":"https://github.com/ternjs","followers_url":"https://api.github.com/users/ternjs/followers","following_url":"https://api.github.com/users/ternjs/following{/other_user}","gists_url":"https://api.github.com/users/ternjs/gists{/gist_id}","starred_url":"https://api.github.com/users/ternjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ternjs/subscriptions","organizations_url":"https://api.github.com/users/ternjs/orgs","repos_url":"https://api.github.com/users/ternjs/repos","events_url":"https://api.github.com/users/ternjs/events{/privacy}","received_events_url":"https://api.github.com/users/ternjs/received_events","type":"Organization","site_admin":false},"repo":{"id":5932749,"name":"acorn","full_name":"ternjs/acorn","owner":{"login":"ternjs","id":8876849,"avatar_url":"https://avatars.githubusercontent.com/u/8876849?v=3","gravatar_id":"","url":"https://api.github.com/users/ternjs","html_url":"https://github.com/ternjs","followers_url":"https://api.github.com/users/ternjs/followers","following_url":"https://api.github.com/users/ternjs/following{/other_user}","gists_url":"https://api.github.com/users/ternjs/gists{/gist_id}","starred_url":"https://api.github.com/users/ternjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ternjs/subscriptions","organizations_url":"https://api.github.com/users/ternjs/orgs","repos_url":"https://api.github.com/users/ternjs/repos","events_url":"https://api.github.com/users/ternjs/events{/privacy}","received_events_url":"https://api.github.com/users/ternjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ternjs/acorn","description":"A small, fast, JavaScript-based JavaScript parser","fork":false,"url":"https://api.github.com/repos/ternjs/acorn","forks_url":"https://api.github.com/repos/ternjs/acorn/forks","keys_url":"https://api.github.com/repos/ternjs/acorn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ternjs/acorn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ternjs/acorn/teams","hooks_url":"https://api.github.com/repos/ternjs/acorn/hooks","issue_events_url":"https://api.github.com/repos/ternjs/acorn/issues/events{/number}","events_url":"https://api.github.com/repos/ternjs/acorn/events","assignees_url":"https://api.github.com/repos/ternjs/acorn/assignees{/user}","branches_url":"https://api.github.com/repos/ternjs/acorn/branches{/branch}","tags_url":"https://api.github.com/repos/ternjs/acorn/tags","blobs_url":"https://api.github.com/repos/ternjs/acorn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ternjs/acorn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ternjs/acorn/git/refs{/sha}","trees_url":"https://api.github.com/repos/ternjs/acorn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ternjs/acorn/statuses/{sha}","languages_url":"https://api.github.com/repos/ternjs/acorn/languages","stargazers_url":"https://api.github.com/repos/ternjs/acorn/stargazers","contributors_url":"https://api.github.com/repos/ternjs/acorn/contributors","subscribers_url":"https://api.github.com/repos/ternjs/acorn/subscribers","subscription_url":"https://api.github.com/repos/ternjs/acorn/subscription","commits_url":"https://api.github.com/repos/ternjs/acorn/commits{/sha}","git_commits_url":"https://api.github.com/repos/ternjs/acorn/git/commits{/sha}","comments_url":"https://api.github.com/repos/ternjs/acorn/comments{/number}","issue_comment_url":"https://api.github.com/repos/ternjs/acorn/issues/comments{/number}","contents_url":"https://api.github.com/repos/ternjs/acorn/contents/{+path}","compare_url":"https://api.github.com/repos/ternjs/acorn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ternjs/acorn/merges","archive_url":"https://api.github.com/repos/ternjs/acorn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ternjs/acorn/downloads","issues_url":"https://api.github.com/repos/ternjs/acorn/issues{/number}","pulls_url":"https://api.github.com/repos/ternjs/acorn/pulls{/number}","milestones_url":"https://api.github.com/repos/ternjs/acorn/milestones{/number}","notifications_url":"https://api.github.com/repos/ternjs/acorn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ternjs/acorn/labels{/name}","releases_url":"https://api.github.com/repos/ternjs/acorn/releases{/id}","deployments_url":"https://api.github.com/repos/ternjs/acorn/deployments","created_at":"2012-09-24T10:05:00Z","updated_at":"2016-08-18T02:34:15Z","pushed_at":"2016-08-17T13:12:20Z","git_url":"git://github.com/ternjs/acorn.git","ssh_url":"git@github.com:ternjs/acorn.git","clone_url":"https://github.com/ternjs/acorn.git","svn_url":"https://github.com/ternjs/acorn","homepage":"","size":4319,"stargazers_count":1806,"watchers_count":1806,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":216,"mirror_url":null,"open_issues_count":18,"forks":216,"open_issues":18,"watchers":1806,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ternjs/acorn/pulls/446"},"html":{"href":"https://github.com/ternjs/acorn/pull/446"},"issue":{"href":"https://api.github.com/repos/ternjs/acorn/issues/446"},"comments":{"href":"https://api.github.com/repos/ternjs/acorn/issues/446/comments"},"review_comments":{"href":"https://api.github.com/repos/ternjs/acorn/pulls/446/comments"},"review_comment":{"href":"https://api.github.com/repos/ternjs/acorn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ternjs/acorn/pulls/446/commits"},"statuses":{"href":"https://api.github.com/repos/ternjs/acorn/statuses/d885d637d193d365abe257eae46f9f82f0c8bc5a"}}}}
{"actor":{"display_login":"xiemaisi"}}