Tests and fixes for (pre)parse errors related to strict reserved words.
authormarja@chromium.org <marja@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 4 Feb 2014 12:19:53 +0000 (12:19 +0000)
committermarja@chromium.org <marja@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 4 Feb 2014 12:19:53 +0000 (12:19 +0000)
commit443e645a2d4e4d7ffa8d4229f0fe5b2e449c75bb
tree7997ca50c9bd244730576e0b13e97dec481581e3
parente5c7f4eff16458ffd51c6ab606f75c367e1159dc
Tests and fixes for (pre)parse errors related to strict reserved words.

This contains the following fixes:

- We had strict_reserved_word and unexpected_strict_reserved, which one to use
was totally mixed in Parser and PreParser. Removed strict_reserved_word.
- When we saw a strict future reserved word when expecting something completely
different (such as "(" in "function foo interface"), Parser reports unexpected
identifier, whereas PreParser used to report unexpected strict reserved
word. Fixed PreParser to report unexpected identifier too.
- Unified parser and preparser error locations when the name of a function is a
strict reserved word. Now both point to the name.

BUG=3126
LOG=N
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/messages.js
src/parser.cc
src/preparser.cc
test/cctest/test-parsing.cc