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

Unified Diff: src/ast/scopes.h

Issue 1871923003: Add parsing for ambient declarations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@types-devel
Patch Set: Minor fixes to address code review comments Created 4 years, 8 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/ast/ast.h ('k') | src/messages.h » ('j') | src/parsing/preparser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.h
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index 289158e9be1bbc03d983ad6e76243f860b631ab1..f4d7ba2a3a8dda1b76d4ac871c79ec0a28038855 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -321,6 +321,9 @@ class Scope: public ZoneObject {
bool is_arrow_scope() const {
return is_function_scope() && IsArrowFunction(function_kind_);
}
+ bool is_toplevel_scope() const {
+ return is_script_scope() || is_eval_scope() || is_module_scope();
+ }
bool is_declaration_scope() const { return is_declaration_scope_; }
void set_is_declaration_scope() { is_declaration_scope_ = true; }
« no previous file with comments | « src/ast/ast.h ('k') | src/messages.h » ('j') | src/parsing/preparser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698