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

Unified Diff: src/parsing/parser.h

Issue 2394403002: [cleanup] Remove dead code from Variable and simplify PatternRewriter slightly (Closed)
Patch Set: Created 4 years, 2 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/variables.cc ('k') | src/parsing/pattern-rewriter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index 45b4d2b2e3b39b2c949a4b544bb9d62b1b8fc410..9cda51672bd767a72d2a8ed31c2367a4488cb550 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -358,11 +358,13 @@ class Parser : public ParserBase<Parser> {
void VisitObjectLiteral(ObjectLiteral* node, Variable** temp_var);
void VisitArrayLiteral(ArrayLiteral* node, Variable** temp_var);
- bool IsBindingContext() const { return IsBindingContext(context_); }
+ bool IsBindingContext() const {
+ return context_ == BINDING || context_ == INITIALIZER;
+ }
bool IsInitializerContext() const { return context_ != ASSIGNMENT; }
- bool IsAssignmentContext() const { return IsAssignmentContext(context_); }
- bool IsAssignmentContext(PatternContext c) const;
- bool IsBindingContext(PatternContext c) const;
+ bool IsAssignmentContext() const {
+ return context_ == ASSIGNMENT || context_ == ASSIGNMENT_INITIALIZER;
+ }
bool IsSubPattern() const { return recursion_level_ > 1; }
PatternContext SetAssignmentContextIfNeeded(Expression* node);
PatternContext SetInitializerContextIfNeeded(Expression* node);
« no previous file with comments | « src/ast/variables.cc ('k') | src/parsing/pattern-rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698