@@ -3186,21 +3186,6 @@ lexer_expect_object_literal_id (parser_context_t *context_p, /**< context */
3186
3186
lexer_consume_next_character (context_p );
3187
3187
return ;
3188
3188
}
3189
- case LIT_CHAR_DOT :
3190
- {
3191
- if ((ident_opts & ((uint32_t ) ~(LEXER_OBJ_IDENT_OBJECT_PATTERN | LEXER_OBJ_IDENT_SET_FUNCTION_START )))
3192
- || context_p -> source_p + 2 >= context_p -> source_end_p || context_p -> source_p [1 ] != LIT_CHAR_DOT
3193
- || context_p -> source_p [2 ] != LIT_CHAR_DOT )
3194
- {
3195
- break ;
3196
- }
3197
-
3198
- context_p -> token .type = LEXER_THREE_DOTS ;
3199
- context_p -> token .flags &= (uint8_t ) ~LEXER_NO_SKIP_SPACES ;
3200
- PARSER_PLUS_EQUAL_LC (context_p -> column , 3 );
3201
- context_p -> source_p += 3 ;
3202
- return ;
3203
- }
3204
3189
#endif /* JERRY_ESNEXT */
3205
3190
case LIT_CHAR_RIGHT_BRACE :
3206
3191
{
@@ -3213,6 +3198,27 @@ lexer_expect_object_literal_id (parser_context_t *context_p, /**< context */
3213
3198
lexer_consume_next_character (context_p );
3214
3199
return ;
3215
3200
}
3201
+ #if JERRY_ESNEXT
3202
+ case LIT_CHAR_DOT :
3203
+ {
3204
+ if (!(context_p -> source_p + 1 >= context_p -> source_end_p || lit_char_is_decimal_digit (context_p -> source_p [1 ])))
3205
+ {
3206
+ if ((ident_opts & ((uint32_t ) ~(LEXER_OBJ_IDENT_OBJECT_PATTERN | LEXER_OBJ_IDENT_SET_FUNCTION_START )))
3207
+ || context_p -> source_p + 2 >= context_p -> source_end_p || context_p -> source_p [1 ] != LIT_CHAR_DOT
3208
+ || context_p -> source_p [2 ] != LIT_CHAR_DOT )
3209
+ {
3210
+ break ;
3211
+ }
3212
+
3213
+ context_p -> token .type = LEXER_THREE_DOTS ;
3214
+ context_p -> token .flags &= (uint8_t ) ~LEXER_NO_SKIP_SPACES ;
3215
+ PARSER_PLUS_EQUAL_LC (context_p -> column , 3 );
3216
+ context_p -> source_p += 3 ;
3217
+ return ;
3218
+ }
3219
+ /* FALLTHRU */
3220
+ }
3221
+ #endif /* JERRY_ESNEXT */
3216
3222
default :
3217
3223
{
3218
3224
const uint8_t * char_p = context_p -> source_p ;
0 commit comments