aboutsummaryrefslogtreecommitdiffstats
path: root/test/ripper/test_parser_events.rb
Commit message (Collapse)AuthorAgeFilesLines
* Ripper: Fixed erred token on wrong alias [Bug #17345]Nobuyoshi Nakada2020-12-161-1/+1
|
* ripper: Invalid pragma value warningNobuyoshi Nakada2020-11-021-0/+6
|
* Prohibit setter method names in all kinds of endless methodsNobuyoshi Nakada2020-10-121-6/+44
| | | | Also unwrap NODE_RIPPER to check the method name.
* Drop token info for endless method definitionNobuyoshi Nakada2020-06-251-4/+16
| | | | Because it does not have closing `end`.
* [ripper] added endless method definition event testsNobuyoshi Nakada2020-06-251-0/+10
|
* [ripper] fix mismatched indentations warning [Bug #16981]Nobuyoshi Nakada2020-06-241-0/+6
| | | | | The scanner location has to be set from `lex.ptok` before it is flushed by dispatching the scanner event.
* [ripper] fail unless got warning as expectedNobuyoshi Nakada2020-06-241-0/+2
|
* Introduce find pattern [Feature #16828]Kazuki Tsujimoto2020-06-141-0/+6
|
* Add leading arguments support to arguments forwardingJeremy Evans2020-06-061-3/+11
| | | | | | | | The idFWD_KWREST sections may be wrong. However, the existing idFWD_KWREST sections for ... without leading arguments are already broken. Implements [Feature #16378]
* Removed unnecessary RLIMIT_ASNobuyoshi Nakada2020-04-281-10/+3
| | | | | Even without this limit, these assertions almost certainly cause a NoMemoryError by removing the fix in 72ad8595f20.
* Revert "Method reference operator"Nobuyoshi Nakada2019-11-121-7/+0
| | | | | This reverts commit 67c574736912003c377218153f9d3b9c0c96a17b. [Feature #16275]
* Arguments forwarding [Feature #16253]Nobuyoshi Nakada2019-10-221-0/+6
|
* Removed idNUMPARAM_0Nobuyoshi Nakada2019-09-251-1/+0
|
* Changed numbered parameter prefixNobuyoshi Nakada2019-09-241-5/+5
|
* Make ripper support **nil syntaxJeremy Evans2019-08-301-0/+10
| | | | | | | | | 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.
* double memory limit on MJIT.Koichi Sasada2019-08-091-1/+2
| | | | | On test with MJIT, sometimes it fails like: http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2189967
* Do not dispatch a nil token in ripperNobuyoshi Nakada2019-07-041-0/+6
| | | | | | | 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>
* Test string contentNobuyoshi Nakada2019-06-281-0/+1
|
* Fixed a variable nameNobuyoshi Nakada2019-06-281-1/+1
|
* Fix ripper fatalNobuyoshi Nakada2019-06-271-0/+3
| | | | | * parse.y (parser_yylex): return END_OF_INPUT at unterminated here document instead of an error. [Bug #15962]
* Test for unterminated here-docsNobuyoshi Nakada2019-06-271-0/+6
|
* Introduce pattern matching [EXPERIMENTAL]ktsj2019-04-171-0/+18
| | | | | | [ruby-core:87945] [Feature #14912] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: removed redundant number_arg parser eventnobu2019-03-191-7/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix var_ref of numbered param in rippernobu2019-03-191-0/+1
| | | | | | | | * 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
* Numbered parameters [Feature #4475]nobu2019-03-171-1/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: no punctuation instance/class variablesnobu2019-03-141-2/+2
| | | | | | | | * 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
* Method reference operatornobu2018-12-311-0/+7
| | | | | | | | 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
* parse.y: remove "shadowing outer local variable" warningmame2018-10-261-7/+0
| | | | | | | | | | | 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
* Revert "parse.y: remove "shadowing outer local variable" warning"mame2018-10-261-0/+7
| | | | | | 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
* parse.y: remove "shadowing outer local variable" warningmame2018-10-261-7/+0
| | | | | | | | | | 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
* test/ripper/test_parser_events.rb (test_block_variables): bump RLIMIT_AS againnormal2018-08-151-1/+1
| | | | | | 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
* test/ripper/test_parser_events.rb (test_block_variables): increase RLIMIT_ASnormal2018-08-061-2/+5
| | | | | | | 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
* parse.y: refactor list literalsnobu2017-11-241-0/+16
| | | | | | | | | | | * 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
* test_parser_events.rb: results of list literalsnobu2017-11-241-4/+8
| | | | | | | | * 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
* parse.y: fix var_fieldnobu2017-10-041-18/+39
| | | | | | | | | | | | | | | | * 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
* test_parser_events.rb: backref_assign_errornobu2017-10-031-2/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ripper: add kwrest_param parser eventrhe2017-07-211-1/+10
| | | | | | | | | | | | | | | * 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
* parse.y: f_margs parser eventsnobu2017-07-011-0/+78
| | | | | | | * 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
* parse.y: mlhs_add_postnobu2017-07-011-4/+27
| | | | | | | * 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
* test_parser_events.rb: simplifynobu2017-07-011-5/+5
| | | | | | | | | | * 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
* ripper: fix %-op on_operator_ambiguousnobu2017-02-121-1/+7
| | | | | | | | | * parse.y (ambiguous_operator): separate token and string representation of operators, to fix %-operator argument. in a warning message, needs to be escaped by '%' but the symbol should not be. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* {ext,test}/ripper: Specify frozen_string_literal: true.kazu2017-02-051-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: indented hereocnobu2015-12-071-0/+13
| | | | | | * parse.y: add heredoc <<~ syntax. [Feature #9098] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_parser_events.rb: suppress a warningnobu2015-11-271-1/+1
| | | | | | | | * test/ripper/test_parser_events.rb (test_warn_cr_in_middle): remove unused variable to suppress assigned-but-unused-variable warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: ripper for warningsnobu2015-11-241-0/+6
| | | | | | | * parse.y (parser_yylex): deal with magic comment warnings also in ripper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* change DOTQnobu2015-11-061-7/+7
| | | | | | | * defs/id.def (token_ops), parse.y (parser_yylex): change DOTQ from ".?" to "&.". [ruby-core:71363] [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix op_assign typenobu2015-10-281-0/+10
| | | | | | | * parse.y (new_attr_op_assign): fix op_assign type, which is already an ID since r52284. [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_parser_events.rb: event tokennobu2015-10-281-13/+26
| | | | | | | * test/ripper/test_parser_events.rb (test_opassign): test parsed event tokens too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: call_op2nobu2015-10-261-1/+16
| | | | | | | * parse.y (call_op2): separate from call_op and also allow "::", while dot_or_colon should not allow ".?". [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix ripper warningsnobu2015-10-141-0/+21
| | | | | | | | | * parse.y (parser_nextc): send a warning to ripper, not to STDERR always. * parse.y (rb_warn1, rb_warning1): move argument conversions to callers. PRIsVALUE is not valid in String#%. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e