{"action":"opened","issue":{"url":"https://api.github.com/repos/jquery/esprima/issues/1084","labels_url":"https://api.github.com/repos/jquery/esprima/issues/1084/labels{/name}","comments_url":"https://api.github.com/repos/jquery/esprima/issues/1084/comments","events_url":"https://api.github.com/repos/jquery/esprima/issues/1084/events","html_url":"https://github.com/jquery/esprima/issues/1084","id":59257272,"number":1084,"title":"Implicit octal (ES5 OctalIntegerLiteral) should not be allowed in strict mode","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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-27T16:16:50Z","updated_at":"2015-02-27T16:16:50Z","closed_at":null,"body":"Consider the following test code:\r\n```js\r\nrequire('./esprima').parse('052')\r\n```\r\n\r\nThis creates a numeric literal with the value `42`. The number starts with `0` and hence it is interpreted as `OctalIntegerLiteral` (ES5 specification, [Annex B.1.1](http://es5.github.io/#B.1.1) on *Numeric Literals*). This is the case of *implicit octal* (term used in V8 source code) and it is supported by Esprima already (see commit 7eb60150a0).\r\n\r\nNow consider the following test code:\r\n```js\r\nrequire('./esprima').parse('\"use strict\";053')\r\n```\r\nIn this case, `053` should be rejected because of strict mode. Quoting ES5 specification [Section 7.8.3](http://es5.github.io/#x7.8.3) on *Numeric Literals*:\r\n\r\n> A conforming implementation, when processing strict mode code (see 10.1.1), must not extend the syntax of *NumericLiteral* to include *OctalIntegerLiteral* as described in B.1.1.\r\n"}}