Chromium Code Reviews| Index: src/parser.h |
| diff --git a/src/parser.h b/src/parser.h |
| index 72561e0e3e14245135e75966cc4d7e59f853caad..914d3c7fdcab798c7652b1ff19c206070d033e54 100644 |
| --- a/src/parser.h |
| +++ b/src/parser.h |
| @@ -33,6 +33,7 @@ |
| #include "preparse-data-format.h" |
| #include "preparse-data.h" |
| #include "scopes.h" |
| +#include "preparser.h" |
| namespace v8 { |
| namespace internal { |
| @@ -157,6 +158,13 @@ class ScriptDataImpl : public ScriptData { |
| class ParserApi { |
| public: |
| + enum Flags { |
| + kNoFlags = v8::preparser::PreParser::kNoFlags, |
| + kAllowLazy = v8::preparser::PreParser::kAllowLazy, |
| + kAllowNativesSyntax = v8::preparser::PreParser::kAllowNativesSyntax, |
| + kHarmonyScoping = kAllowNativesSyntax * 2 |
|
fschneider
2011/10/17 10:33:51
Why is there not harmony scoping flag in the prepa
Lasse Reichstein
2011/10/17 11:00:30
Not sure there is a reason. In the preparser, the
|
| + }; |
| + |
| // Parses the source code represented by the compilation info and sets its |
| // function literal. Returns false (and deallocates any allocated AST |
| // nodes) if parsing failed. |
| @@ -165,13 +173,13 @@ class ParserApi { |
| // Generic preparser generating full preparse data. |
| static ScriptDataImpl* PreParse(UC16CharacterStream* source, |
| v8::Extension* extension, |
| - bool harmony_scoping); |
| + int flags); |
| // Preparser that only does preprocessing that makes sense if only used |
| // immediately after. |
| static ScriptDataImpl* PartialPreParse(UC16CharacterStream* source, |
| v8::Extension* extension, |
| - bool harmony_scoping); |
| + int flags); |
| }; |
| // ---------------------------------------------------------------------------- |