summaryrefslogtreecommitdiff
path: root/test/ripper/test_parser_events.rb
AgeCommit message (Collapse)Author
11 daysEmit `warn` event for duplicated hash keys on ripperyui-knk
Need to use `rb_warn` macro instead of calling `rb_compile_warn` directly to emit `warn` event on ripper.
2024-04-07Fix ripper to dispatch warning event for duplicated when clauseyui-knk
Need to separate `check_literal_when` function for parser and ripper otherwise warning event is not dispatched because parser `rb_warning1` is used in ripper.
2024-02-15Do not include a backtick in error messages and backtracesYusuke Endoh
[Feature #16495]
2023-11-02Added TestRipper namespace to test_call_colon2Hiroshi SHIBATA
2023-11-02test/ripper: nest helper classes under TestRipper modulelukeg
Generic names like Node and NodeList should be namespaced properly.
2023-08-26[Bug #19851] Ripper: Hide internal block argument IDNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8293
2023-08-01[Bug #19788] Use the result of `tCOLON2` eventNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8144
2022-06-14ripper: Check if anonymous parameters defined [Bug #18828]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6016
2021-05-21ripper: wrap endless method in bodystmt [Bug #17869]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4516
2021-05-21ripper: assertions for rescue/ensure in method bodyNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4516
2020-12-16Ripper: Fixed erred token on wrong alias [Bug #17345]Nobuyoshi Nakada
2020-11-02ripper: Invalid pragma value warningNobuyoshi Nakada
2020-10-12Prohibit setter method names in all kinds of endless methodsNobuyoshi Nakada
Also unwrap NODE_RIPPER to check the method name. Notes: Merged: https://github.com/ruby/ruby/pull/3649
2020-06-25Drop token info for endless method definitionNobuyoshi Nakada
Because it does not have closing `end`.
2020-06-25[ripper] added endless method definition event testsNobuyoshi Nakada
2020-06-24[ripper] fix mismatched indentations warning [Bug #16981]Nobuyoshi Nakada
The scanner location has to be set from `lex.ptok` before it is flushed by dispatching the scanner event.
2020-06-24[ripper] fail unless got warning as expectedNobuyoshi Nakada
2020-06-14Introduce find pattern [Feature #16828]Kazuki Tsujimoto
2020-06-06Add leading arguments support to arguments forwardingJeremy Evans
The idFWD_KWREST sections may be wrong. However, the existing idFWD_KWREST sections for ... without leading arguments are already broken. Implements [Feature #16378] Notes: Merged: https://github.com/ruby/ruby/pull/3190
2020-04-28Removed unnecessary RLIMIT_ASNobuyoshi Nakada
Even without this limit, these assertions almost certainly cause a NoMemoryError by removing the fix in 72ad8595f20.
2019-11-12Revert "Method reference operator"Nobuyoshi Nakada
This reverts commit 67c574736912003c377218153f9d3b9c0c96a17b. [Feature #16275]
2019-10-22Arguments forwarding [Feature #16253]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/2575
2019-09-25Removed idNUMPARAM_0Nobuyoshi Nakada
2019-09-24Changed numbered parameter prefixNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/2431
2019-08-30Make ripper support **nil syntaxJeremy Evans
The on_params hook will use :nil as the keyword rest argument. There is a new on_nokw_param hook as well. This fixes a type issue in the previous code, where an ID was passed where a VALUE was the declared type. The symbol :nil is passed instead of the id. Notes: Merged: https://github.com/ruby/ruby/pull/2395
2019-08-09double memory limit on MJIT.Koichi Sasada
On test with MJIT, sometimes it fails like: http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2189967
2019-07-04Do not dispatch a nil token in ripperNobuyoshi Nakada
As a comment token includes the newline, so delayed newline token just follows it should not be dispatched. [Bug #11485] Co-Authored-By: Jeremy Evans <code@jeremyevans.net>
2019-06-28Test string contentNobuyoshi Nakada
2019-06-28Fixed a variable nameNobuyoshi Nakada
2019-06-27Fix ripper fatalNobuyoshi Nakada
* parse.y (parser_yylex): return END_OF_INPUT at unterminated here document instead of an error. [Bug #15962]
2019-06-27Test for unterminated here-docsNobuyoshi Nakada
2019-04-17Introduce pattern matching [EXPERIMENTAL]ktsj
[ruby-core:87945] [Feature #14912] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-19parse.y: removed redundant number_arg parser eventnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-19parse.y: fix var_ref of numbered param in rippernobu
* parse.y (string_dvar, user_variable): register numbered parameter in ripper for var_ref. [ruby-core:91867] [Bug #15673] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-17Numbered parameters [Feature #4475]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-14parse.y: no punctuation instance/class variablesnobu
* parse.y (parse_atmark): exclude punctuation follows @ marks, whereas it is inclusive after $ mark as some punctuation global variables exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-31Method reference operatornobu
Introduce the new operator for method reference, `.:`. [Feature #12125] [Feature #13581] [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-26parse.y: remove "shadowing outer local variable" warningmame
You can now write the following without warning. user = User.all.find {|user| cond(user) } Fixes [Feature #12490]. A patch from Soutaro Matsumoto <matsumoto@soutaro.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-26Revert "parse.y: remove "shadowing outer local variable" warning"mame
I forgot to add the copyright of the patch... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-26parse.y: remove "shadowing outer local variable" warningmame
You can now write the following without warning. user = User.all.find {|user| cond(user) } Fixes [Feature #12490]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-15test/ripper/test_parser_events.rb (test_block_variables): bump RLIMIT_AS againnormal
I still seem to need more memory for parallel tests with MJIT... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-06test/ripper/test_parser_events.rb (test_block_variables): increase RLIMIT_ASnormal
Unfortunately, MJIT goes over the 100M RLIMIT_AS for this test on x86-64 (Debian 9) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24parse.y: refactor list literalsnobu
* parse.y (words, symbols, qwords, qsymbols): unify empty list and non-empty list. * parse.y (parser_parse_string): always dispatch a word separator at the beginning of list literals. [ruby-core:83871] [Bug #14126] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24test_parser_events.rb: results of list literalsnobu
* test/ripper/test_parser_events.rb (test_qwords_add), (test_qsymbols_add, test_symbols_add, test_words_add): more assertions for results of list literals. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-04parse.y: fix var_fieldnobu
* parse.y (mlhs_node): dispatch var_field as well as lhs. * parse.y (lhs, var_hs): dispatch var_field before assignable check so it is inside assign_error at a wrong assignment, as well as backref_assign_error. * parse.y (var_field_gen): wrap var_field value with the variable ID. * parse.y (assignable_gen, const_decl_gen): return the callback result on a syntax error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-03test_parser_events.rb: backref_assign_errornobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-21ripper: add kwrest_param parser eventrhe
* 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
2017-07-01parse.y: f_margs parser eventsnobu
* parse.y (f_margs): implemented parser events for massign formal arguments. [ruby-core:81848] [Bug #13701] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-01parse.y: mlhs_add_postnobu
* parse.y (mlhs_add_post): new parser event corresponding to POSTARG. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-01test_parser_events.rb: simplifynobu
* test/ripper/dummyparser.rb (DummyParser): simplified mlhs node representation. * test/ripper/test_parser_events.rb (test_mlhs_add_star): simplified assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e