{"action":"closed","issue":{"url":"https://api.github.com/repos/RReverser/babel-plugin-uglify/issues/2","labels_url":"https://api.github.com/repos/RReverser/babel-plugin-uglify/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/RReverser/babel-plugin-uglify/issues/2/comments","events_url":"https://api.github.com/repos/RReverser/babel-plugin-uglify/issues/2/events","html_url":"https://github.com/RReverser/babel-plugin-uglify/issues/2","id":113283876,"number":2,"title":"RegExp literal causes 'Invalid Literal type' error","user":{"login":"dbaba","id":1858156,"avatar_url":"https://avatars.githubusercontent.com/u/1858156?v=3","gravatar_id":"","url":"https://api.github.com/users/dbaba","html_url":"https://github.com/dbaba","followers_url":"https://api.github.com/users/dbaba/followers","following_url":"https://api.github.com/users/dbaba/following{/other_user}","gists_url":"https://api.github.com/users/dbaba/gists{/gist_id}","starred_url":"https://api.github.com/users/dbaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbaba/subscriptions","organizations_url":"https://api.github.com/users/dbaba/orgs","repos_url":"https://api.github.com/users/dbaba/repos","events_url":"https://api.github.com/users/dbaba/events{/privacy}","received_events_url":"https://api.github.com/users/dbaba/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-10-26T04:28:17Z","updated_at":"2015-10-30T14:19:10Z","closed_at":"2015-10-30T14:19:10Z","body":"hi,\r\nI encountered an unknown error when I ran babel with this plugin (`babel --plugins uglify:after test.js`.\r\nCan you please address it?\r\n```\r\nError: test.js: Invalid Literal type\r\n    at CodeGenerator._Literal (/Users/foo/.nvm/versions/node/v0.12.7/lib/node_modules/babel/node_modules/babel-core/lib/generation/generators/types.js:180:15)\r\n(snip)\r\n```\r\n\r\nAnd I identified what had caused the error.\r\n```\r\nconsole.log('NULL terminator is gone!\\0'.replace(/\\0/g, ''));\r\n```\r\nThe regular expression `/\\0/g`  caused the trouble.\r\n\r\nThe value was set to the variable `val` in [`_Literal(node)` function in `types.js`](https://github.com/mgcrea/babel-core/blob/master/lib/generation/generators/types.js#L180), which is a part of `babel-core` rather than this plugin.\r\n\r\nPlease tell me the right place if the issue is out of this plugin scope.\r\n\r\nModule and Node versions:\r\n - babel 5.8.23\r\n - babel-plugin-uglify 1.0.2\r\n - node js 0.12.7"}}