Commit 7da873b7 authored by adamk's avatar adamk Committed by Commit bot

Remove unused default argument value in ExpressionClassifier::Accumulate

Also removed the "StandardProductions" enum value as its name is unhelpful
in deciding when to use it (and it only had a single reference).

R=gsathya@chromium.org

Review-Url: https://codereview.chromium.org/2260183003
Cr-Commit-Position: refs/heads/master@{#38763}
parent 0c95efb7
...@@ -71,11 +71,10 @@ class ExpressionClassifier { ...@@ -71,11 +71,10 @@ class ExpressionClassifier {
LetPatternProduction | AsyncBindingPatternProduction), LetPatternProduction | AsyncBindingPatternProduction),
FormalParametersProductions = (DistinctFormalParametersProduction | FormalParametersProductions = (DistinctFormalParametersProduction |
StrictModeFormalParametersProduction), StrictModeFormalParametersProduction),
StandardProductions = ExpressionProductions | PatternProductions,
AllProductions = AllProductions =
(StandardProductions | FormalParametersProductions | (ExpressionProductions | PatternProductions |
ArrowFormalParametersProduction | CoverInitializedNameProduction | FormalParametersProductions | ArrowFormalParametersProduction |
AsyncArrowFormalParametersProduction | AsyncBindingPatternProduction) CoverInitializedNameProduction | AsyncArrowFormalParametersProduction)
}; };
enum FunctionProperties : unsigned { enum FunctionProperties : unsigned {
...@@ -345,8 +344,7 @@ class ExpressionClassifier { ...@@ -345,8 +344,7 @@ class ExpressionClassifier {
invalid_productions_ &= ~AssignmentPatternProduction; invalid_productions_ &= ~AssignmentPatternProduction;
} }
void Accumulate(ExpressionClassifier* inner, void Accumulate(ExpressionClassifier* inner, unsigned productions,
unsigned productions = StandardProductions,
bool merge_non_patterns = true) { bool merge_non_patterns = true) {
DCHECK_EQ(inner->reported_errors_, reported_errors_); DCHECK_EQ(inner->reported_errors_, reported_errors_);
DCHECK_EQ(inner->reported_errors_begin_, reported_errors_end_); DCHECK_EQ(inner->reported_errors_begin_, reported_errors_end_);
......
...@@ -2413,11 +2413,11 @@ ParserBase<Traits>::ParseAssignmentExpression(bool accept_IN, ...@@ -2413,11 +2413,11 @@ ParserBase<Traits>::ParseAssignmentExpression(bool accept_IN,
// Do not merge pending non-pattern expressions yet! // Do not merge pending non-pattern expressions yet!
classifier->Accumulate( classifier->Accumulate(
&arrow_formals_classifier, &arrow_formals_classifier,
ExpressionClassifier::StandardProductions | ExpressionClassifier::ExpressionProductions |
ExpressionClassifier::PatternProductions |
ExpressionClassifier::FormalParametersProductions | ExpressionClassifier::FormalParametersProductions |
ExpressionClassifier::CoverInitializedNameProduction | ExpressionClassifier::CoverInitializedNameProduction |
ExpressionClassifier::AsyncArrowFormalParametersProduction | ExpressionClassifier::AsyncArrowFormalParametersProduction,
ExpressionClassifier::AsyncBindingPatternProduction,
false); false);
if (!Token::IsAssignmentOp(peek())) { if (!Token::IsAssignmentOp(peek())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment