summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorS.H <gamelinks007@gmail.com>2022-08-22 18:52:36 +0900
committerGitHub <noreply@github.com>2022-08-22 18:52:36 +0900
commit13d31331c87f6fc0a8d43135be67090cd4c810c3 (patch)
tree2f1a2be1618487d854d2bed6ec306f4f2a5df06e /parse.y
parentd91865f33f7bfad7a6d1434aa48674acbe51e7f7 (diff)
Reuse `nonlocal_var` patterns
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6263 Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y8
1 files changed, 2 insertions, 6 deletions
diff --git a/parse.y b/parse.y
index 426e4df772..405a83a8cf 100644
--- a/parse.y
+++ b/parse.y
@@ -5035,9 +5035,7 @@ ssym : tSYMBEG sym
;
sym : fname
- | tIVAR
- | tGVAR
- | tCVAR
+ | nonlocal_var
;
dsym : tSYMBEG string_contents tSTRING_END
@@ -5073,10 +5071,8 @@ nonlocal_var : tIVAR
;
user_variable : tIDENTIFIER
- | tIVAR
- | tGVAR
| tCONSTANT
- | tCVAR
+ | nonlocal_var
;
keyword_variable: keyword_nil {$$ = KWD2EID(nil, $1);}