{"action":"created","issue":{"url":"https://api.github.com/repos/jquery/esprima/issues/311","labels_url":"https://api.github.com/repos/jquery/esprima/issues/311/labels{/name}","comments_url":"https://api.github.com/repos/jquery/esprima/issues/311/comments","events_url":"https://api.github.com/repos/jquery/esprima/issues/311/events","html_url":"https://github.com/jquery/esprima/issues/311","id":56839931,"number":311,"title":"`export default function() {}` Should parse the function as a nameless FuncDecl","user":{"login":"jeffmo","id":498293,"avatar_url":"https://avatars.githubusercontent.com/u/498293?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffmo","html_url":"https://github.com/jeffmo","followers_url":"https://api.github.com/users/jeffmo/followers","following_url":"https://api.github.com/users/jeffmo/following{/other_user}","gists_url":"https://api.github.com/users/jeffmo/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffmo/subscriptions","organizations_url":"https://api.github.com/users/jeffmo/orgs","repos_url":"https://api.github.com/users/jeffmo/repos","events_url":"https://api.github.com/users/jeffmo/events{/privacy}","received_events_url":"https://api.github.com/users/jeffmo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jquery/esprima/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/jquery/esprima/labels/easy","name":"easy","color":"009800"},{"url":"https://api.github.com/repos/jquery/esprima/labels/es6modules","name":"es6modules","color":"5319e7"},{"url":"https://api.github.com/repos/jquery/esprima/labels/harmony%20branch","name":"harmony branch","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":36,"created_at":"2015-02-06T17:15:11Z","updated_at":"2015-02-07T02:59:36Z","closed_at":null,"body":"Currently esprima parses this as a function expression (probably because, before ES6, only function expressions could be nameless...not function decls).\r\n\r\nHowever, in the `export default` grammar, this should be parsed as a special \"HoistableDeclaration\" which allows for nameless (yet hoisted) function declarations:\r\n\r\nhttps://people.mozilla.org/~jorendorff/es6-draft.html#sec-exports"},"comment":{"url":"https://api.github.com/repos/jquery/esprima/issues/comments/73346932","html_url":"https://github.com/jquery/esprima/issues/311#issuecomment-73346932","issue_url":"https://api.github.com/repos/jquery/esprima/issues/311","id":73346932,"user":{"login":"michaelficarra","id":218840,"avatar_url":"https://avatars.githubusercontent.com/u/218840?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelficarra","html_url":"https://github.com/michaelficarra","followers_url":"https://api.github.com/users/michaelficarra/followers","following_url":"https://api.github.com/users/michaelficarra/following{/other_user}","gists_url":"https://api.github.com/users/michaelficarra/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelficarra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelficarra/subscriptions","organizations_url":"https://api.github.com/users/michaelficarra/orgs","repos_url":"https://api.github.com/users/michaelficarra/repos","events_url":"https://api.github.com/users/michaelficarra/events{/privacy}","received_events_url":"https://api.github.com/users/michaelficarra/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T02:59:36Z","updated_at":"2015-02-07T02:59:36Z","body":"Unfortunately, I don't think SpiderMonkey supports import/export declarations yet.\r\n\r\n@sebmck: Shift's ES6 branch has BindingIdentifier, it's implemented on our parser's ES6 branch, and it is *wonderful*. :stuck_out_tongue_winking_eye:"}}