@@ -2939,6 +2939,7 @@ ParserBase<Traits>::ParseConditionalExpression(bool accept_IN,
2939
2939
ExpressionT expression =
2940
2940
this->ParseBinaryExpression(4, accept_IN, classifier, CHECK_OK);
2941
2941
if (peek() != Token::CONDITIONAL) return expression;
2942
+ ArrowFormalParametersUnexpectedToken(classifier);
2942
2943
BindingPatternUnexpectedToken(classifier);
2943
2944
Consume(Token::CONDITIONAL);
2944
2945
// In parsing the first assignment expression in conditional
@@ -2964,6 +2965,7 @@ ParserBase<Traits>::ParseBinaryExpression(int prec, bool accept_IN,
2964
2965
// prec1 >= 4
2965
2966
while (Precedence(peek(), accept_IN) == prec1) {
2966
2967
BindingPatternUnexpectedToken(classifier);
2968
+ ArrowFormalParametersUnexpectedToken(classifier);
2967
2969
Token::Value op = Next();
2968
2970
Scanner::Location op_location = scanner()->location();
2969
2971
int pos = position();
@@ -3026,6 +3028,7 @@ ParserBase<Traits>::ParseUnaryExpression(ExpressionClassifier* classifier,
3026
3028
Token::Value op = peek();
3027
3029
if (Token::IsUnaryOp(op)) {
3028
3030
BindingPatternUnexpectedToken(classifier);
3031
+ ArrowFormalParametersUnexpectedToken(classifier);
3029
3032
3030
3033
op = Next();
3031
3034
int pos = position();
@@ -3048,6 +3051,7 @@ ParserBase<Traits>::ParseUnaryExpression(ExpressionClassifier* classifier,
3048
3051
return this->BuildUnaryExpression(expression, op, pos, factory());
3049
3052
} else if (Token::IsCountOp(op)) {
3050
3053
BindingPatternUnexpectedToken(classifier);
3054
+ ArrowFormalParametersUnexpectedToken(classifier);
3051
3055
op = Next();
3052
3056
Scanner::Location lhs_location = scanner()->peek_location();
3053
3057
ExpressionT expression = this->ParseUnaryExpression(classifier, CHECK_OK);
@@ -3080,6 +3084,7 @@ ParserBase<Traits>::ParsePostfixExpression(ExpressionClassifier* classifier,
3080
3084
if (!scanner()->HasAnyLineTerminatorBeforeNext() &&
3081
3085
Token::IsCountOp(peek())) {
3082
3086
BindingPatternUnexpectedToken(classifier);
3087
+ ArrowFormalParametersUnexpectedToken(classifier);
3083
3088
3084
3089
expression = this->CheckAndRewriteReferenceExpression(
3085
3090
expression, lhs_location, MessageTemplate::kInvalidLhsInPostfixOp,
@@ -3111,6 +3116,7 @@ ParserBase<Traits>::ParseLeftHandSideExpression(
3111
3116
switch (peek()) {
3112
3117
case Token::LBRACK: {
3113
3118
BindingPatternUnexpectedToken(classifier);
3119
+ ArrowFormalParametersUnexpectedToken(classifier);
3114
3120
Consume(Token::LBRACK);
3115
3121
int pos = position();
3116
3122
ExpressionT index = ParseExpression(true, classifier, CHECK_OK);
@@ -3121,6 +3127,7 @@ ParserBase<Traits>::ParseLeftHandSideExpression(
3121
3127
3122
3128
case Token::LPAREN: {
3123
3129
BindingPatternUnexpectedToken(classifier);
3130
+ ArrowFormalParametersUnexpectedToken(classifier);
3124
3131
3125
3132
if (is_strong(language_mode()) && this->IsIdentifier(result) &&
3126
3133
this->IsEval(this->AsIdentifier(result))) {
@@ -3172,6 +3179,7 @@ ParserBase<Traits>::ParseLeftHandSideExpression(
3172
3179
3173
3180
case Token::PERIOD: {
3174
3181
BindingPatternUnexpectedToken(classifier);
3182
+ ArrowFormalParametersUnexpectedToken(classifier);
3175
3183
Consume(Token::PERIOD);
3176
3184
int pos = position();
3177
3185
IdentifierT name = ParseIdentifierName(CHECK_OK);
@@ -3184,6 +3192,7 @@ ParserBase<Traits>::ParseLeftHandSideExpression(
3184
3192
case Token::TEMPLATE_SPAN:
3185
3193
case Token::TEMPLATE_TAIL: {
3186
3194
BindingPatternUnexpectedToken(classifier);
3195
+ ArrowFormalParametersUnexpectedToken(classifier);
3187
3196
result = ParseTemplateLiteral(result, position(), classifier, CHECK_OK);
3188
3197
break;
3189
3198
}
@@ -3221,6 +3230,7 @@ ParserBase<Traits>::ParseMemberWithNewPrefixesExpression(
3221
3230
3222
3231
if (peek() == Token::NEW) {
3223
3232
BindingPatternUnexpectedToken(classifier);
3233
+ ArrowFormalParametersUnexpectedToken(classifier);
3224
3234
Consume(Token::NEW);
3225
3235
int new_pos = position();
3226
3236
ExpressionT result = this->EmptyExpression();
@@ -3274,6 +3284,7 @@ ParserBase<Traits>::ParseMemberExpression(ExpressionClassifier* classifier,
3274
3284
ExpressionT result = this->EmptyExpression();
3275
3285
if (peek() == Token::FUNCTION) {
3276
3286
BindingPatternUnexpectedToken(classifier);
3287
+ ArrowFormalParametersUnexpectedToken(classifier);
3277
3288
3278
3289
Consume(Token::FUNCTION);
3279
3290
int function_token_position = position();
@@ -3523,6 +3534,7 @@ ParserBase<Traits>::ParseMemberExpressionContinuation(
3523
3534
switch (peek()) {
3524
3535
case Token::LBRACK: {
3525
3536
BindingPatternUnexpectedToken(classifier);
3537
+ ArrowFormalParametersUnexpectedToken(classifier);
3526
3538
3527
3539
Consume(Token::LBRACK);
3528
3540
int pos = position();
@@ -3536,6 +3548,7 @@ ParserBase<Traits>::ParseMemberExpressionContinuation(
3536
3548
}
3537
3549
case Token::PERIOD: {
3538
3550
BindingPatternUnexpectedToken(classifier);
3551
+ ArrowFormalParametersUnexpectedToken(classifier);
3539
3552
3540
3553
Consume(Token::PERIOD);
3541
3554
int pos = position();
@@ -3550,6 +3563,7 @@ ParserBase<Traits>::ParseMemberExpressionContinuation(
3550
3563
case Token::TEMPLATE_SPAN:
3551
3564
case Token::TEMPLATE_TAIL: {
3552
3565
BindingPatternUnexpectedToken(classifier);
3566
+ ArrowFormalParametersUnexpectedToken(classifier);
3553
3567
int pos;
3554
3568
if (scanner()->current_token() == Token::IDENTIFIER) {
3555
3569
pos = position();
0 commit comments