Yes indeed, at the moment the preparser gets the information from the
scanner.
But this will need some cleanup soon. According to the draft the switching
between the modes will be more fine grained than one global switch, i.e. it
will
be possible to mix classic mode / strict mode / harmony mode
(called 'extended'
mode according to the spec) in one source file. In that sense the
(pre)parser
should keep track of harmony mode in the same way strict mode is handled
now. It
is unfortunate that also the scanner depends on the mode.
On 2011/10/17 11:00:30, Lasse Reichstein wrote:
http://codereview.chromium.org/8306024/diff/1/src/parser.h
File src/parser.h (right):
http://codereview.chromium.org/8306024/diff/1/src/parser.h#newcode165
src/parser.h:165: kHarmonyScoping = kAllowNativesSyntax * 2
Not sure there is a reason. In the preparser, the parser gets the
harmony-scoping bool from the scanner, so it doesn't need an extra flag.
http://codereview.chromium.org/8306024/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev