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 {
LetPatternProduction | AsyncBindingPatternProduction),
FormalParametersProductions = (DistinctFormalParametersProduction |
StrictModeFormalParametersProduction),
StandardProductions = ExpressionProductions | PatternProductions,
AllProductions =
(StandardProductions | FormalParametersProductions |
ArrowFormalParametersProduction | CoverInitializedNameProduction |
AsyncArrowFormalParametersProduction | AsyncBindingPatternProduction)
(ExpressionProductions | PatternProductions |
FormalParametersProductions | ArrowFormalParametersProduction |
CoverInitializedNameProduction | AsyncArrowFormalParametersProduction)
};
enum FunctionProperties : unsigned {
......@@ -345,8 +344,7 @@ class ExpressionClassifier {
invalid_productions_ &= ~AssignmentPatternProduction;
}
void Accumulate(ExpressionClassifier* inner,
unsigned productions = StandardProductions,
void Accumulate(ExpressionClassifier* inner, unsigned productions,
bool merge_non_patterns = true) {
DCHECK_EQ(inner->reported_errors_, reported_errors_);
DCHECK_EQ(inner->reported_errors_begin_, reported_errors_end_);
......
......@@ -2413,11 +2413,11 @@ ParserBase<Traits>::ParseAssignmentExpression(bool accept_IN,
// Do not merge pending non-pattern expressions yet!
classifier->Accumulate(
&arrow_formals_classifier,
ExpressionClassifier::StandardProductions |
ExpressionClassifier::ExpressionProductions |
ExpressionClassifier::PatternProductions |
ExpressionClassifier::FormalParametersProductions |
ExpressionClassifier::CoverInitializedNameProduction |
ExpressionClassifier::AsyncArrowFormalParametersProduction |
ExpressionClassifier::AsyncBindingPatternProduction,
ExpressionClassifier::AsyncArrowFormalParametersProduction,
false);
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