diff options
author | rhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-21 04:29:46 +0000 |
---|---|---|
committer | rhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-21 04:29:46 +0000 |
commit | c4dfd0ccfbc325d3231de655f9f0dfc4cdfc8593 (patch) | |
tree | ec0f6717c80f680997b623c5fa6d3566152fe119 /test/ripper/dummyparser.rb | |
parent | 0055f09bcc84ef28c401fae056ac5afe87d0357e (diff) | |
download | ruby-c4dfd0ccfbc325d3231de655f9f0dfc4cdfc8593.tar.gz |
ripper: add kwrest_param parser event
* parse.y (f_kwrest): Dispatch kwrest_param event. This is especially
useful for unnamed kwrest parameter for which we expose the internal
ID currently. [ruby-core:75528] [Feature #12387]
* test/ripper/dummyparser.rb (on_kwrest_param): Add handler for
kwrest_param parser event.
* test/ripper/test_parser_events.rb (test_params): Adapt to the change
in DummyParser.
(test_kwrest_param): Test that kwrest_param event handler is called.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ripper/dummyparser.rb')
-rw-r--r-- | test/ripper/dummyparser.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ripper/dummyparser.rb b/test/ripper/dummyparser.rb index 6de7e19013..4261ab5e82 100644 --- a/test/ripper/dummyparser.rb +++ b/test/ripper/dummyparser.rb @@ -153,6 +153,10 @@ class DummyParser < Ripper "*#{var}" end + def on_kwrest_param(var) + "**#{var}" + end + def on_blockarg(var) "&#{var}" end |