Lexical declarations should not be allowed in Statement
authorarv <arv@chromium.org>
Fri, 30 Jan 2015 03:09:57 +0000 (19:09 -0800)
committerCommit bot <commit-bot@chromium.org>
Fri, 30 Jan 2015 03:10:13 +0000 (03:10 +0000)
commit13616615fd97f9cdde7ac93a883049a5f5122c82
treee835d93219bf7da6af314377a39a88ee601a5197
parentb004b1d821e28ffec8212a7cdf46b84cbdf74b67
Lexical declarations should not be allowed in Statement

For example let and class should only be allowed inside function/block/script.

We have to continue to support const in statements in sloppy mode for backwards compatibility.

BUG=3831
LOG=Y
R=dslomov@chromium.org, adamk

Review URL: https://codereview.chromium.org/869293002

Cr-Commit-Position: refs/heads/master@{#26337}
src/messages.js
src/parser.cc
src/preparser.cc
test/cctest/test-parsing.cc