{"action":"created","issue":{"url":"https://api.github.com/repos/playframework/twirl/issues/161","repository_url":"https://api.github.com/repos/playframework/twirl","labels_url":"https://api.github.com/repos/playframework/twirl/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/playframework/twirl/issues/161/comments","events_url":"https://api.github.com/repos/playframework/twirl/issues/161/events","html_url":"https://github.com/playframework/twirl/pull/161","id":279363426,"number":161,"title":"Support ECMAScript 6 Arrow Functions.","user":{"login":"evanbennett","id":7615102,"avatar_url":"https://avatars0.githubusercontent.com/u/7615102?v=4","gravatar_id":"","url":"https://api.github.com/users/evanbennett","html_url":"https://github.com/evanbennett","followers_url":"https://api.github.com/users/evanbennett/followers","following_url":"https://api.github.com/users/evanbennett/following{/other_user}","gists_url":"https://api.github.com/users/evanbennett/gists{/gist_id}","starred_url":"https://api.github.com/users/evanbennett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanbennett/subscriptions","organizations_url":"https://api.github.com/users/evanbennett/orgs","repos_url":"https://api.github.com/users/evanbennett/repos","events_url":"https://api.github.com/users/evanbennett/events{/privacy}","received_events_url":"https://api.github.com/users/evanbennett/received_events","type":"User","site_admin":false},"labels":[{"id":57561424,"url":"https://api.github.com/repos/playframework/twirl/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-12-05T12:50:07Z","updated_at":"2018-03-03T13:49:05Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/playframework/twirl/pulls/161","html_url":"https://github.com/playframework/twirl/pull/161","diff_url":"https://github.com/playframework/twirl/pull/161.diff","patch_url":"https://github.com/playframework/twirl/pull/161.patch"},"body":"Currently, a `case` statement (Scala or JavaScript) followed by an ES6 Arrow Function using `=> {` is parsed as a `caseExpression`. This also causes parsing errors if a brace exists in between.\r\n\r\nTo resolve this, I have:\r\n* Removed `caseExpression` from `mixed`\r\n* Created `atLeastOne` because a `matchblock` requires at least one `caseExpression`\r\n* Created a `matchBlock` which requires only `caseExpression`s - I have created this by adding an argument to `block` to avoid code duplication\r\n* Changed `matchExpOrSafeExpOrExpr` when it is a `match` to require a `matchBlock` instead of a `block`\r\n\r\nThis has the additional benefit or removing invalid parsing:\r\n* Other options in `mixed` are invalid within a `matchBlock`\r\n* `caseExpression`s are invalid outside a `matchBlock`\r\n\r\nI have added test `caseAndArrowFunctions.scala.js` to cover the new behaviour, and `patternMatching` to make sure I did not break anything (other than the currently allowed invalid parsing listed above)."},"comment":{"url":"https://api.github.com/repos/playframework/twirl/issues/comments/370148808","html_url":"https://github.com/playframework/twirl/pull/161#issuecomment-370148808","issue_url":"https://api.github.com/repos/playframework/twirl/issues/161","id":370148808,"user":{"login":"evanbennett","id":7615102,"avatar_url":"https://avatars0.githubusercontent.com/u/7615102?v=4","gravatar_id":"","url":"https://api.github.com/users/evanbennett","html_url":"https://github.com/evanbennett","followers_url":"https://api.github.com/users/evanbennett/followers","following_url":"https://api.github.com/users/evanbennett/following{/other_user}","gists_url":"https://api.github.com/users/evanbennett/gists{/gist_id}","starred_url":"https://api.github.com/users/evanbennett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanbennett/subscriptions","organizations_url":"https://api.github.com/users/evanbennett/orgs","repos_url":"https://api.github.com/users/evanbennett/repos","events_url":"https://api.github.com/users/evanbennett/events{/privacy}","received_events_url":"https://api.github.com/users/evanbennett/received_events","type":"User","site_admin":false},"created_at":"2018-03-03T13:49:05Z","updated_at":"2018-03-03T13:49:05Z","author_association":"NONE","body":"Hi @marcospereira,\r\n\r\nI have moved on to other things, but would still like this. Is it likely to progress? "}}
{"actor":{"display_login":"evanbennett"}}