summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorydah <[email protected]>2025-03-14 00:16:34 +0900
committerYudai Takada <[email protected]>2025-03-14 12:32:03 +0900
commitf5f195180883fe80f02bc2579ba9aa84118e834b (patch)
tree3c799a4806ada823bf828acd0dfd7927928b9863
parenta4328a424bbbe3fdeefa861d5946e6258bc87260 (diff)
Refactor parse.y to replace tIDENTIFIER and tCONSTANT with ident_or_const inline rules
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12929
-rw-r--r--parse.y7
1 files changed, 1 insertions, 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) %*/