summaryrefslogtreecommitdiff
path: root/test/ripper
AgeCommit message (Collapse)Author
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
2017-07-06lexer.rb: ignore dedented spacenobu
* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): replace an empty string content because of dedentation with :on_ignored_sp. an empty token makes the sorted order unstable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59269 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
2017-05-06ripper/lexer.rb: nested indented heredocnobu
* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): insert stripped leading spaces as `on_ignored_sp` elements, so that the original source can be reconsructed. [ruby-core:80977] [Bug #13536] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-02ripper/lexer.rb: nested indented heredocnobu
* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): fix for nested indedented here documents, where `Elem`s are nested too. [ruby-core:80977] [Bug #13536] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-26parse.y: unterminated content tokennobu
* parse.y (parser_parse_string): defer the end token to next reading, to yield tSTRING_CONTENT with the unterminated content. [Bug #13363] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-25keep line number after unterminated string literalnobu
* parse.y (parser_parse_string): keep line number even after an unterminated string literal. it does not matter in the parser, ripper needs this value after this error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-12ripper: fix %-op on_operator_ambiguousnobu
* 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
2017-02-05{ext,test}/ripper: Specify frozen_string_literal: true.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-08parse.y: ripper generic inputnobu
* parse.y (ripper_initialize): allow generic input as source, if it has #gets method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-10test_files.rb: sample sizenobu
* test/ripper/test_files.rb (assert_parse_files): extract at least one sample. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-10test_files.rb: separate testsnobu
* test/ripper/test_files.rb (assert_parse_files): separate tests for each directories. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-27* test/ripper/test_ripper.rb: fix squiggly heredoc identifierkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-26* test/ripper/test_ripper.rb: add a test for dedent_string.headius
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-03parse.y: reg_fragment_enc_errornobu
* parse.y (reg_fragment_enc_error): compile_error is different between parser and ripper. [ruby-core:76397] [Bug #12651] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-02Fix Ripper.lex error in dedenting squiggly heredocnobu
* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): Fix Ripper.lex error in dedenting squiggly heredoc. heredoc tree is also an array of Elem in the outer tree. [Fix GH-1234] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-04Revert r53431 "temporally revert r53411 to debug"naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-04temporally revert r53411 to debugnaruse
http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20151225T162507Z.diff.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-02parse.y: use nd_tagnobu
* parse.y (regexp): set_yylval_num sets u1, should use nd_tag instead of nd_state. [ruby-core:72638] [Bug #11932] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-02Revert r53409 "parse.y: yylval.num should be u3"naruse
It introduces SEGV git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-02parse.y: yylval.num should be u3nobu
* parse.y (set_yylval_num): should be used as nd_state, set to u3. [ruby-core:72638] [Bug #11932] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07parse.y: indented hereocnobu
* parse.y: add heredoc <<~ syntax. [Feature #9098] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-28parse.y: last content of heredocnobu
* parse.y (parser_here_document): store dispatched result of on_tstring_content at the last fragment of a here document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-27test_parser_events.rb: suppress a warningnobu
* 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
2015-11-24parse.y: ripper for warningsnobu
* 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
2015-11-06change DOTQnobu
* 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
2015-10-28parse.y: fix op_assign typenobu
* 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
2015-10-28test_parser_events.rb: event tokennobu
* 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
2015-10-26parse.y: call_op2nobu
* 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
2015-10-25symbol.c: dotq in rippernobu
* symbol.c (op_tbl): add DOTQ for ripper. [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-14parse.y: fix ripper warningsnobu
* 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
2015-09-24parse.y: fix tokennobu
* parse.y (paren_args): fix separator token at `foo::bar()` in ripper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-13parse.y: refine message for gvar w/o identitirsnobu
* parse.y (parse_gvar): separate message for gvar without non-space characters from message for invalid identitirs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04parse.y: fix f_label resultnobu
* parse.y (f_label): return tLABEL value as it is. [ruby-core:67315] [Bug #10693] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01parse.y: preserve tSTRING_CONTENT resultsnobu
* parse.y (ripper_flush_string_content): preserve the dispatched results at tSTRING_CONTENT. [ruby-dev:48714] [Bug #10437] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01parse.y: enable encoding pragma in rippernobu
* parse.y (magic_comment_encoding): enable in ripper, since the encoding is necessary to parse non-default encoding scripts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-30parse.y: fix a typonobu
* parse.y (regexp_contents): fix a typo. pointed out by wanabe. [ruby-dev:48741] [Bug #10543] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-22dummyparser.rb: on_rescuenobu
* test/ripper/dummyparser.rb (on_rescue): add to turn exception class list into NodeList, to test exception class list. * test/ripper/test_parser_events.rb (test_rescue_class): add missing test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e