summaryrefslogtreecommitdiff
path: root/test/ripper
AgeCommit message (Collapse)Author
2019-07-23Split test/ripper/test_files.rb to run in parallelNobuyoshi Nakada
2019-07-06Added assertions for Unicode escaped CHAR scanner eventsNobuyoshi Nakada
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-28Add parentheses to suppress a warningNobuyoshi Nakada
2019-06-28Test string contentNobuyoshi Nakada
2019-06-28Removed unused variablesNobuyoshi 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-06-13Add pipeline operator [Feature #15799]Nobuyoshi Nakada
2019-06-03Fix the error token on "invalid hex escape"Nobuyoshi Nakada
* parse.y (tok_hex): flush token after dispatching the "invalid hex escape" parse error.
2019-05-30parse.y: adjust here-doc error tokenNobuyoshi Nakada
* parse.y (here_document): adjust token to the here-doc identifier in compile_error when a here-document misses the closing identifier.
2019-05-30Include stack elements left after errorsNobuyoshi Nakada
2019-05-29parse.y: fix state after ivar/cvarNobuyoshi Nakada
* parse.y (parse_atmark): return EXPR_END or EXPR_ENDFN, depending on the previous state, even incomplete names consistently.
2019-05-29parse.y: flush invalid charNobuyoshi Nakada
2019-05-27Do not make an incomplete escape a valid charNobuyoshi Nakada
2019-05-27Ripper#tokenNobuyoshi Nakada
* parse.y (ripper_token): added Ripper#token which returns the current token string. [EXPERIMENTAL]
2019-05-26Fix scanner event at invalid syntaxNobuyoshi Nakada
* parse.y (parser_yyerror, parser_compile_error): revert r67224 (e5d10cda07b23682e5e4e64d1324e4d3247d4785) "Flush erred token".
2019-05-09require 'stringio'NARUSE, Yui
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-19parse.y: fix segv with Ripper#yydebugnobu
* parse.y (parser_token_value_print): in ripper, ID values are wrapped in NODE_RIPPER at set_yylval_name(), so print the Symbol wrapped together. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67305 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-16dsym should be treated as string [ruby-core:91852] [Bug #15670]ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67270 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
2019-03-09Add ignored_sp eventnobu
* ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer): add ignored_sp event which will be fired from Ripper::Lexer#on_heredoc_dedent method. [ruby-core:91727] [Bug #15648] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-09Use assert_respond_tonobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67199 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
2018-03-13test/ripper/test_lexer.rb: add test for r62743k0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-12ripper: fix escaped spacenobu
* parse.y: use tSP same as ripper instead of tSPACE. [ruby-core:86080] [Bug #14597] * ext/ripper/eventids2.c: tSP is defined in ripper.c now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22Fix CMDARG manipulationnobu
* parse.y: Fix CMDARG manipulation. Use CMDARG_P to identify keyword_do/keyword_do_block. [Feature #14506] [Fix GH-1823] From: Ilya Bylich <ibylich@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62528 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-11-23ripper.y: fix word list eventsnobu
* parse.y (parser_skip_words_sep): QWORDS_BEG should not include the first separators in ripper. * parse.y (parser_parse_string): WORDS_SEP should not include the closing parentheses of a word list in ripper, should include spaces at beginning of lines. [ruby-core:83864] [Bug #14126] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-19parse.y: indent at '#'nobu
* parse.y (parser_here_document): update indent at '#', which is not a space. [ruby-core:83368] [Bug #14032] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-19lexer.rb: no dedent strings in middlenobu
* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): dedent only strings at the beginning, not strings in middle. [ruby-core:83343] [Bug #14027] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-08parse.y: fix a typonobu
* parse.y (f_kw): fix typo. needs the argument value, not the label twice. [ruby-core:83174] [Bug #13987] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-05parse.y: fix KWD2EIDnobu
* parse.y (KWD2EID): should respect the previous callback result for keywords. [ruby-core:83106] [Bug #13971] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60120 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-04test_sexp.rb: test for fnamenobu
* test/ripper/test_sexp.rb (test_def_fname): test for fname in def statement. [ruby-core:83089] [Bug #13967] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60114 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-09-14ripper: add states of scannernobu
* parse.y (ripper_state): add states of scanner to tokens from Ripper.lex and Ripper::Filter#on_*. based on the patch by aycabta (Code Ahss) at [ruby-core:81789]. [Feature #13686] * ext/ripper/tools/preproc.rb (prelude, usercode): generate EXPR_* constants from enums. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59896 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-15test_lexer.rb: require ripper directlyyui-knk
* test/ripper/test_lexer.rb: This file does not use DummyParser, so requiring ripper directly instead of requiring dummyparser. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e