{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/3242","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/3242/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/3242/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/3242/events","html_url":"https://github.com/facebook/flow/issues/3242","id":202409448,"number":3242,"title":"Fails to parse `(\"a\")`","user":{"login":"lydell","id":2142817,"avatar_url":"https://avatars.githubusercontent.com/u/2142817?v=3","gravatar_id":"","url":"https://api.github.com/users/lydell","html_url":"https://github.com/lydell","followers_url":"https://api.github.com/users/lydell/followers","following_url":"https://api.github.com/users/lydell/following{/other_user}","gists_url":"https://api.github.com/users/lydell/gists{/gist_id}","starred_url":"https://api.github.com/users/lydell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lydell/subscriptions","organizations_url":"https://api.github.com/users/lydell/orgs","repos_url":"https://api.github.com/users/lydell/repos","events_url":"https://api.github.com/users/lydell/events{/privacy}","received_events_url":"https://api.github.com/users/lydell/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-22T20:59:29Z","updated_at":"2017-01-22T21:46:56Z","closed_at":"2017-01-22T21:46:56Z","body":"```\r\n~/bugs/flow-parens-string-bug  \r\n❯ node --version\r\nv7.2.0\r\n\r\n~/bugs/flow-parens-string-bug  \r\n❯ npm i flow-parser\r\n/home/lydell/bugs/flow-parens-string-bug\r\n└─┬ flow-parser@0.38.0 \r\n  ├── ast-types@0.8.18 \r\n  ├── colors@1.1.2 \r\n  └── minimist@1.2.0 \r\n\r\n\r\n~/bugs/flow-parens-string-bug  \r\n❯ node\r\n> try { require('flow-parser').parse('(\"a\")') } catch (e) { console.log('err', e) }\r\nerr [ 0,\r\n  [ 248, aw { t: 0, c: 'Failure', l: 7 }, -3 ],\r\n  aw { t: 0, c: 'Nooo: T_LPAREN\\n', l: 15 } ]\r\nundefined\r\n> \r\n```\r\n\r\nExpectations:\r\n\r\n- No error to be thrown. (And if one were to be thrown, I'd expect a real\r\n  `Error` to be thrown, not an `Array`.)\r\n- An AST to be returned.\r\n\r\nThe non-JS version of the parser seems to have the same problem:\r\n\r\n```\r\n~/bugs/flow-parens-string-bug  \r\n❯ npm i flow-bin\r\n/home/lydell/bugs/flow-parens-string-bug\r\n└── flow-bin@0.38.0 \r\n\r\n\r\n~/bugs/flow-parens-string-bug  \r\n❯ echo '(\"a\")' | flow ast --pretty\r\nUnhandled exception: Failure(\"Nooo: T_LPAREN\\n\")\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/274362305","html_url":"https://github.com/facebook/flow/issues/3242#issuecomment-274362305","issue_url":"https://api.github.com/repos/facebook/flow/issues/3242","id":274362305,"user":{"login":"vkurchatkin","id":2993861,"avatar_url":"https://avatars.githubusercontent.com/u/2993861?v=3","gravatar_id":"","url":"https://api.github.com/users/vkurchatkin","html_url":"https://github.com/vkurchatkin","followers_url":"https://api.github.com/users/vkurchatkin/followers","following_url":"https://api.github.com/users/vkurchatkin/following{/other_user}","gists_url":"https://api.github.com/users/vkurchatkin/gists{/gist_id}","starred_url":"https://api.github.com/users/vkurchatkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkurchatkin/subscriptions","organizations_url":"https://api.github.com/users/vkurchatkin/orgs","repos_url":"https://api.github.com/users/vkurchatkin/repos","events_url":"https://api.github.com/users/vkurchatkin/events{/privacy}","received_events_url":"https://api.github.com/users/vkurchatkin/received_events","type":"User","site_admin":false},"created_at":"2017-01-22T21:46:56Z","updated_at":"2017-01-22T21:46:56Z","body":"Duplicate of https://github.com/facebook/flow/issues/3234"}}
{"actor":{"display_login":"vkurchatkin"}}