{"action":"created","issue":{"url":"https://api.github.com/repos/mooz/js2-mode/issues/393","repository_url":"https://api.github.com/repos/mooz/js2-mode","labels_url":"https://api.github.com/repos/mooz/js2-mode/issues/393/labels{/name}","comments_url":"https://api.github.com/repos/mooz/js2-mode/issues/393/comments","events_url":"https://api.github.com/repos/mooz/js2-mode/issues/393/events","html_url":"https://github.com/mooz/js2-mode/issues/393","id":192598974,"number":393,"title":"Error when parsing destructuring","user":{"login":"davazp","id":265168,"avatar_url":"https://avatars.githubusercontent.com/u/265168?v=3","gravatar_id":"","url":"https://api.github.com/users/davazp","html_url":"https://github.com/davazp","followers_url":"https://api.github.com/users/davazp/followers","following_url":"https://api.github.com/users/davazp/following{/other_user}","gists_url":"https://api.github.com/users/davazp/gists{/gist_id}","starred_url":"https://api.github.com/users/davazp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davazp/subscriptions","organizations_url":"https://api.github.com/users/davazp/orgs","repos_url":"https://api.github.com/users/davazp/repos","events_url":"https://api.github.com/users/davazp/events{/privacy}","received_events_url":"https://api.github.com/users/davazp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2016-11-30T15:41:25Z","updated_at":"2016-12-13T12:38:48Z","closed_at":"2016-12-13T01:17:00Z","body":"If I visit a file with the file\r\n\r\n```javascript\r\nfunction f (x,y) {\r\n  let [u,v] = [x,y];\r\n}\r\n```\r\n\r\njs2-mode throws the following error:\r\n```\r\nError running timer ‘js2-mode-idle-reparse’: (wrong-type-argument js2-name-node [cl-struct-js2-array-node 65 0 5 nil [cl-struct-js2-var-init-node 152 4 13 nil [cl-struct-js2-var-decl-node 121 0 17 nil [cl-struct-js2-expr-stmt-node 133 4 18 nil [cl-struct-js2-block-node 128 17 24 nil [cl-struct-js2-function-node 108 1 41 nil [cl-struct-js2-ast-root 135 1 42 nil nil (#6) ((f . [cl-struct-js2-symbol 108 \"f\" #6])) nil nil nil nil nil 0 nil nil 0 \"js2-bug.js\" nil nil nil nil] nil ((v . [cl-struct-js2-symbol 152 \"v\" [cl-struct-js2-name-node 39 3 1 nil #1 \"v\" nil]]) (u . [cl-struct-js2-symbol 152 \"u\" [cl-struct-js2-name-node 39 1 1 nil #1 \"u\" nil]]) (y . [cl-struct-js2-symbol 86 \"y\" [cl-struct-js2-name-node 39 14 1 nil #6 \"y\" nil]]) (x . [cl-struct-js2-symbol 86 \"x\" [cl-struct-js2-name-node 39 12 1 nil #6 \"x\" nil]])) [cl-struct-js2-ast-root 135 1 42 nil nil (#6) ((f . [cl-struct-js2-symbol 108 \"f\" #6])) nil nil nil nil nil 0 nil nil 0 \"js2-bug.js\" nil nil nil nil] nil nil nil nil 0 nil nil 0 FUNCTION FUNCTION_STATEMENT [cl-struct-js2-name-node 39 9 1 nil #6 \"f\" nil] ([cl-struct-js2-name-node 39 12 1 nil #6 \"x\" nil] [cl-struct-js2-name-node 39 14 1 nil #6 \"y\" nil]) nil #5 11 15 nil nil nil nil nil] (#4)] #3] (#2) 152] #1 [cl-struct-js2-array-node 65 8 5 nil #2 ([cl-struct-js2-name-node 39 1 1 nil #3 \"x\" nil] [cl-struct-js2-name-node 39 3 1 nil #3 \"y\" nil])]] ([cl-struct-js2-name-node 39 1 1 nil #1 \"u\" nil] [cl-struct-js2-name-node 39 3 1 nil #1 \"v\" nil])])\r\n```\r\n\r\nFor larger files it also makes Emacs very very slow.\r\n\r\nI am using `js2-mode` \"1.8.5\" and GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.31) of 2016-10-06."},"comment":{"url":"https://api.github.com/repos/mooz/js2-mode/issues/comments/266728206","html_url":"https://github.com/mooz/js2-mode/issues/393#issuecomment-266728206","issue_url":"https://api.github.com/repos/mooz/js2-mode/issues/393","id":266728206,"user":{"login":"davazp","id":265168,"avatar_url":"https://avatars.githubusercontent.com/u/265168?v=3","gravatar_id":"","url":"https://api.github.com/users/davazp","html_url":"https://github.com/davazp","followers_url":"https://api.github.com/users/davazp/followers","following_url":"https://api.github.com/users/davazp/following{/other_user}","gists_url":"https://api.github.com/users/davazp/gists{/gist_id}","starred_url":"https://api.github.com/users/davazp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davazp/subscriptions","organizations_url":"https://api.github.com/users/davazp/orgs","repos_url":"https://api.github.com/users/davazp/repos","events_url":"https://api.github.com/users/davazp/events{/privacy}","received_events_url":"https://api.github.com/users/davazp/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T12:38:48Z","updated_at":"2016-12-13T12:38:48Z","body":"@dgutov It works nicely for me, although I am not using complicated destructuring. I'll pay attention to more complex cases.\r\n\r\nThanks for the fix. That was a great job and thread."}}
{"actor":{"display_login":"davazp"}}