Simplify error message logic in ParseImportNames
authoradamk <adamk@chromium.org>
Wed, 25 Feb 2015 19:40:39 +0000 (11:40 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 25 Feb 2015 19:40:54 +0000 (19:40 +0000)
commit8b33567fd37e3151d3ea707f7fb47b67196a5fc2
tree2a34bc1a355f4281384c253053aa15df35edba1c
parentf1e2aa524cbba83add14d976bf6194d5f02df9e8
Simplify error message logic in ParseImportNames

The new logic ensures that the error messages are the same in the
"import { <reserved word> }" and "import { foo as <reserved ord> }"
cases.

Also prepares ParseImportNames for returning both the import and local
names to ParseImportClause.

BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26863}
src/parser.cc
src/parser.h
test/message/import-as-eval.js [new file with mode: 0644]
test/message/import-as-eval.out [new file with mode: 0644]
test/message/import-as-reserved-word.js [new file with mode: 0644]
test/message/import-as-reserved-word.out [new file with mode: 0644]
test/message/import-eval.js [new file with mode: 0644]
test/message/import-eval.out [new file with mode: 0644]
test/message/import-reserved-word.js [new file with mode: 0644]
test/message/import-reserved-word.out [new file with mode: 0644]