| Index: src/preparser.h
|
| diff --git a/src/preparser.h b/src/preparser.h
|
| index f3a43475dfe96bb3d3fd78abfecbf42862883b3c..13261f7a5b945f6b278a5ac9d450557bdce3e168 100644
|
| --- a/src/preparser.h
|
| +++ b/src/preparser.h
|
| @@ -470,8 +470,19 @@ class PreParser {
|
| void set_language_mode(i::LanguageMode language_mode) {
|
| language_mode_ = language_mode;
|
| }
|
| - void EnterWith() { with_nesting_count_++; }
|
| - void LeaveWith() { with_nesting_count_--; }
|
| +
|
| + class InsideWith {
|
| + public:
|
| + explicit InsideWith(Scope* scope) : scope_(scope) {
|
| + scope->with_nesting_count_++;
|
| + }
|
| +
|
| + ~InsideWith() { scope_->with_nesting_count_--; }
|
| +
|
| + private:
|
| + Scope* scope_;
|
| + DISALLOW_COPY_AND_ASSIGN(InsideWith);
|
| + };
|
|
|
| private:
|
| Scope** const variable_;
|
|
|