{"action":"created","issue":{"url":"https://api.github.com/repos/jquery/esprima/issues/1596","repository_url":"https://api.github.com/repos/jquery/esprima","labels_url":"https://api.github.com/repos/jquery/esprima/issues/1596/labels{/name}","comments_url":"https://api.github.com/repos/jquery/esprima/issues/1596/comments","events_url":"https://api.github.com/repos/jquery/esprima/issues/1596/events","html_url":"https://github.com/jquery/esprima/issues/1596","id":184675058,"number":1596,"title":"Invalid left-hand side in assignment: export default a = b + c","user":{"login":"Jianru-Lin","id":1057486,"avatar_url":"https://avatars.githubusercontent.com/u/1057486?v=3","gravatar_id":"","url":"https://api.github.com/users/Jianru-Lin","html_url":"https://github.com/Jianru-Lin","followers_url":"https://api.github.com/users/Jianru-Lin/followers","following_url":"https://api.github.com/users/Jianru-Lin/following{/other_user}","gists_url":"https://api.github.com/users/Jianru-Lin/gists{/gist_id}","starred_url":"https://api.github.com/users/Jianru-Lin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jianru-Lin/subscriptions","organizations_url":"https://api.github.com/users/Jianru-Lin/orgs","repos_url":"https://api.github.com/users/Jianru-Lin/repos","events_url":"https://api.github.com/users/Jianru-Lin/events{/privacy}","received_events_url":"https://api.github.com/users/Jianru-Lin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-23T06:53:08Z","updated_at":"2016-10-23T14:26:22Z","closed_at":null,"body":"esprima refuses:\r\n\r\n```\r\nexport default a = b + c\r\n```\r\n\r\nand reports:\r\n\r\n```\r\nError: Line 1: Invalid left-hand side in assignment\r\n```\r\n\r\nbut it accepts:\r\n\r\n```\r\nexport default (a = b + c)\r\n```\r\n\r\nand it accepts this without any brace:\r\n\r\n```\r\nexport default a + b\r\n```\r\n\r\nI'm just wondering is this a bug? Or I misunderstood it?\r\n\r\nI reviewed the [ECMA-262 2016](ecma-international.org/publications/standards/Ecma-262.htm)，I saw:\r\n\r\n```\r\nExportDeclaration:\r\n\texport * FromClause;\r\n\texport ExportClause FromClause;\r\n\texport ExportClause;\r\n\texport VariableStatement\r\n\texport Declaration\r\n\texport default HoistableDeclaration[Default]\r\n\texport default ClassDeclaration[Default]\r\n\texport default [lookahead ∉ { function, class }] AssignmentExpression[In];\r\n```\r\n\r\nSo I guess esprima should accept this too:\r\n\r\n```\r\nexport default a = b + c\r\n```\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/jquery/esprima/issues/comments/255591617","html_url":"https://github.com/jquery/esprima/issues/1596#issuecomment-255591617","issue_url":"https://api.github.com/repos/jquery/esprima/issues/1596","id":255591617,"user":{"login":"ariya","id":7288,"avatar_url":"https://avatars.githubusercontent.com/u/7288?v=3","gravatar_id":"","url":"https://api.github.com/users/ariya","html_url":"https://github.com/ariya","followers_url":"https://api.github.com/users/ariya/followers","following_url":"https://api.github.com/users/ariya/following{/other_user}","gists_url":"https://api.github.com/users/ariya/gists{/gist_id}","starred_url":"https://api.github.com/users/ariya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ariya/subscriptions","organizations_url":"https://api.github.com/users/ariya/orgs","repos_url":"https://api.github.com/users/ariya/repos","events_url":"https://api.github.com/users/ariya/events{/privacy}","received_events_url":"https://api.github.com/users/ariya/received_events","type":"User","site_admin":false},"created_at":"2016-10-23T14:26:21Z","updated_at":"2016-10-23T14:26:21Z","body":"Thanks for the report! Looks like you find a defect in Esprima."}}
{"actor":{"display_login":"ariya"}}