From f5f195180883fe80f02bc2579ba9aa84118e834b Mon Sep 17 00:00:00 2001 From: ydah Date: Fri, 14 Mar 2025 00:16:34 +0900 Subject: [PATCH] Refactor parse.y to replace tIDENTIFIER and tCONSTANT with ident_or_const inline rules --- parse.y | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/parse.y b/parse.y index f7b84d45cf..f519eb6e2d 100644 --- a/parse.y +++ b/parse.y @@ -3739,7 +3739,7 @@ lhs : user_or_keyword_variable $$ = aryset(p, $1, $3, &@$); /*% ripper: aref_field!($:1, $:3) %*/ } - | primary_value call_op tIDENTIFIER + | primary_value call_op ident_or_const { $$ = attrset(p, $1, $2, $3, &@$); /*% ripper: field!($:1, $:2, $:3) %*/ @@ -3749,11 +3749,6 @@ lhs : user_or_keyword_variable $$ = attrset(p, $1, idCOLON2, $3, &@$); /*% ripper: field!($:1, $:2, $:3) %*/ } - | primary_value call_op tCONSTANT - { - $$ = attrset(p, $1, $2, $3, &@$); - /*% ripper: field!($:1, $:2, $:3) %*/ - } | primary_value tCOLON2 tCONSTANT { /*% ripper: const_path_field!($:1, $:3) %*/