| Index: src/preparser.h
|
| ===================================================================
|
| --- src/preparser.h (revision 9006)
|
| +++ src/preparser.h (working copy)
|
| @@ -77,6 +77,12 @@
|
| kFunctionScope
|
| };
|
|
|
| + enum VariableDeclarationContext {
|
| + kSourceElement,
|
| + kStatement,
|
| + kForStatement
|
| + };
|
| +
|
| class Expression;
|
|
|
| class Identifier {
|
| @@ -344,7 +350,8 @@
|
| strict_mode_violation_type_(NULL),
|
| stack_overflow_(false),
|
| allow_lazy_(true),
|
| - parenthesized_function_(false) { }
|
| + parenthesized_function_(false),
|
| + harmony_block_scoping_(scanner->HarmonyBlockScoping()) { }
|
|
|
| // Preparse the program. Only called in PreParseProgram after creating
|
| // the instance.
|
| @@ -377,12 +384,16 @@
|
| // which is set to false if parsing failed; it is unchanged otherwise.
|
| // By making the 'exception handling' explicit, we are forced to check
|
| // for failure at the call sites.
|
| + Statement ParseSourceElement(bool* ok);
|
| SourceElements ParseSourceElements(int end_token, bool* ok);
|
| Statement ParseStatement(bool* ok);
|
| Statement ParseFunctionDeclaration(bool* ok);
|
| Statement ParseBlock(bool* ok);
|
| - Statement ParseVariableStatement(bool* ok);
|
| - Statement ParseVariableDeclarations(bool accept_IN, int* num_decl, bool* ok);
|
| + Statement ParseVariableStatement(VariableDeclarationContext var_context,
|
| + bool* ok);
|
| + Statement ParseVariableDeclarations(VariableDeclarationContext var_context,
|
| + int* num_decl,
|
| + bool* ok);
|
| Statement ParseExpressionOrLabelledStatement(bool* ok);
|
| Statement ParseIfStatement(bool* ok);
|
| Statement ParseContinueStatement(bool* ok);
|
| @@ -496,6 +507,7 @@
|
| bool stack_overflow_;
|
| bool allow_lazy_;
|
| bool parenthesized_function_;
|
| + bool harmony_block_scoping_;
|
| };
|
| } } // v8::preparser
|
|
|
|
|