Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(982)

Unified Diff: src/scopes.h

Issue 13179002: Add parser support for generators. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: added additional syntax tests Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/scanner.cc ('k') | src/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.h
diff --git a/src/scopes.h b/src/scopes.h
index 3ca2dcf0ce259c6fafc57bb05a3e4bbf2160671e..2688cfa6c9976710b1d251b4707dee6bd4efeb98 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -308,6 +308,10 @@ class Scope: public ZoneObject {
// Does this scope contain a with statement.
bool contains_with() const { return scope_contains_with_; }
+ // If this scope is in a function that is a generator.
+ bool inside_generator() const { return scope_inside_generator_; }
+ void set_inside_generator(bool inside) { scope_inside_generator_ = inside; }
+
// ---------------------------------------------------------------------------
// Accessors.
@@ -481,6 +485,8 @@ class Scope: public ZoneObject {
bool scope_inside_with_;
// This scope contains a 'with' statement.
bool scope_contains_with_;
+ // This scope is in a function that is a generator.
+ bool scope_inside_generator_;
// This scope or a nested catch scope or with scope contain an 'eval' call. At
// the 'eval' call site this scope is the declaration scope.
bool scope_calls_eval_;
« no previous file with comments | « src/scanner.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698