Tests for (pre)parse errors when "yield" is found in inappropriate places.
authormarja@chromium.org <marja@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 4 Feb 2014 18:16:45 +0000 (18:16 +0000)
committermarja@chromium.org <marja@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 4 Feb 2014 18:16:45 +0000 (18:16 +0000)
commit23cbf27e12106b21630fd29d3614554dba1f2663
treebfe3bf07556b8f304c2dc5fe6c21671c19a9894e
parent35354cb9b7e1789945aaddc414a102594ffc3544
Tests for (pre)parse errors when "yield" is found in inappropriate places.

In addition:
- Fix: PreParser used to report an unexpected token one token too late when
ParsePrimaryExpression failed.
- Unified identifier handling (PreParser::GetIdentifier is now like Parser::GetIdentifier).
- Fix: PreParser used to produce "unexpected_token YIELD" errors when Parser
produced "unexpected_token_identifier"; fixed PreParser to match Parser.

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

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

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