Make native syntax an early error in the preparser.
authorlrn@chromium.org <lrn@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 17 Oct 2011 12:45:52 +0000 (12:45 +0000)
committerlrn@chromium.org <lrn@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 17 Oct 2011 12:45:52 +0000 (12:45 +0000)
commit2bbf3bbee7483b31762ed717fb387fcefa07d29a
tree2e8647a33072046c100504ade971be7381cf261f
parent5152d2e0da3991a179b96fc1fc41c6754cd898ec
Make native syntax an early error in the preparser.

Previously the preparser always accepted natives syntax and let the
real parser throw the syntax error. In ES5, it should be an early error,
so the preparser must catch the error.
The perparser library does not expose parsing for natives syntax, it's
only used internally.

Review URL: http://codereview.chromium.org/8306024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/compiler.cc
src/parser.cc
src/parser.h
src/preparser-api.cc
src/preparser.cc
src/preparser.h
src/scanner.h
test/cctest/test-parsing.cc