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

Unified Diff: src/ast/scopes.cc

Issue 2657943003: [parser] Skipping inner funcs: add variable names into the data for test purposes. (Closed)
Patch Set: code review (vogelheim@) Created 3 years, 11 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 | « no previous file | src/parsing/preparsed-scope-data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.cc
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
index 98a34be8ef7bb7fe629ef7dd33fa783d53cefa07..100e89a9a0e3b43de05814e8fd4c23c328b30595 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -2178,10 +2178,7 @@ void Scope::CollectVariableData(PreParsedScopeData* data) {
PreParsedScopeData::ScopeScope scope_scope(data, scope_type(),
start_position(), end_position());
for (Variable* local : locals_) {
- if (local->mode() == VAR || local->mode() == LET ||
- local->mode() == CONST) {
- scope_scope.AddVariable(local->location(), local->maybe_assigned());
- }
+ scope_scope.MaybeAddVariable(local);
}
for (Scope* inner = inner_scope_; inner != nullptr; inner = inner->sibling_) {
inner->CollectVariableData(data);
« no previous file with comments | « no previous file | src/parsing/preparsed-scope-data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698