{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/pfff/issues/64","labels_url":"https://api.github.com/repos/facebook/pfff/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/facebook/pfff/issues/64/comments","events_url":"https://api.github.com/repos/facebook/pfff/issues/64/events","html_url":"https://github.com/facebook/pfff/issues/64","id":22156485,"number":64,"title":"parsing issue (javascript)","user":{"login":"hhugo","id":835209,"avatar_url":"https://avatars.githubusercontent.com/u/835209?v=3","gravatar_id":"","url":"https://api.github.com/users/hhugo","html_url":"https://github.com/hhugo","followers_url":"https://api.github.com/users/hhugo/followers","following_url":"https://api.github.com/users/hhugo/following{/other_user}","gists_url":"https://api.github.com/users/hhugo/gists{/gist_id}","starred_url":"https://api.github.com/users/hhugo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhugo/subscriptions","organizations_url":"https://api.github.com/users/hhugo/orgs","repos_url":"https://api.github.com/users/hhugo/repos","events_url":"https://api.github.com/users/hhugo/events{/privacy}","received_events_url":"https://api.github.com/users/hhugo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2013-11-05T22:23:18Z","updated_at":"2015-04-09T06:53:04Z","closed_at":null,"body":"report from : https://github.com/ocsigen/js_of_ocaml/blob/master/compiler/js_parser.mly\r\n\r\n\r\nA-\r\n```\r\nreturn\r\na+b\r\n```\r\nis parsed as\r\n``` return a+a;``` instead of ``` return; a+b;```\r\n\r\nB-\r\n```\r\nreturn a\r\n++ b\r\n```\r\nsould parse as `return a; ++b;` (instead, it fails trying `return a++  b`\r\n\r\nC- \r\nfor the record, js_of_ocaml uses different hack to deal with automatic semicolon insertion.\r\n - add virtal_semi after `return`/`throw`/`breal`/`continue` when the next token is on another line\r\n - add 2 new tokens `INCR_NB` and `DECR_NB` (NB: no line break before the token). It is used to parse the postfix version.\r\n - one ugly hack using menhir. accepting statement that require semicolon (and don't have one) if the next token is on another line. see :  https://github.com/ocsigen/js_of_ocaml/blob/master/compiler/js_parser.mly#L187\r\n - no other extra virtual semicolon is required"},"comment":{"url":"https://api.github.com/repos/facebook/pfff/issues/comments/91130120","html_url":"https://github.com/facebook/pfff/issues/64#issuecomment-91130120","issue_url":"https://api.github.com/repos/facebook/pfff/issues/64","id":91130120,"user":{"login":"phooji","id":2009859,"avatar_url":"https://avatars.githubusercontent.com/u/2009859?v=3","gravatar_id":"","url":"https://api.github.com/users/phooji","html_url":"https://github.com/phooji","followers_url":"https://api.github.com/users/phooji/followers","following_url":"https://api.github.com/users/phooji/following{/other_user}","gists_url":"https://api.github.com/users/phooji/gists{/gist_id}","starred_url":"https://api.github.com/users/phooji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phooji/subscriptions","organizations_url":"https://api.github.com/users/phooji/orgs","repos_url":"https://api.github.com/users/phooji/repos","events_url":"https://api.github.com/users/phooji/events{/privacy}","received_events_url":"https://api.github.com/users/phooji/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T06:53:04Z","updated_at":"2015-04-09T06:53:04Z","body":"Confirmed that this is still an issue. "}}