summaryrefslogtreecommitdiff
path: root/parse.y
AgeCommit message (Collapse)Author
2017-01-24parse.y (parser_yylex): remove wrong warningnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-19parse.y: rescue/else/ensure in do-endnobu
* parse.y (do_body): allow rescue/else/ensure inside do/end blocks. [Feature #12906] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-19parse.y: chomp by -lnobu
* parse.y (rb_parser_while_loop): should chomp but not chop by -l option. [ruby-core:78099] [Bug #12926] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-19parse.y: warn spacenobu
* parse.y (parser_yylex): warn parentheses after space. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-26parse.y: preserve cmdarg stacknobu
* parse.y (do_body): preserve cmdarg stack around do/end block. [ruby-core:78837] [Bug #13073] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-16fix r57089nobu
* parse.y (parser_heredoc_identifier): fix multiline here document identifier condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-16multiline heredoc identifiernobu
* parse.y (parser_heredoc_identifier): reject multiline here document identifier, which never matches single line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-15parse.y: newline in heredoc identifiernobu
* parse.y (parser_heredoc_identifier): warn newline in here document identifier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-15parse.y: one warning, one line [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-14parse.y: curtail scanningnobu
* parse.y (parser_yyerror): curtail scanning range, not to exceed the max margin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-14parse.y: fix yyerror messagenobu
* parse.y (parser_yyerror): show the error line even if the error is at the end. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-11parse.y: zero codepointsnobu
* parse.y (parser_tokadd_utf8): relax restriction to allow zero or more codepoints. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57050 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-12-02parse.y: simplify parsing utf-8 stringnobu
* parse.y (parser_tokadd_codepoint): move error checks and add char. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-02parse.y: relax spacesnobu
* parse.y (parser_tokadd_utf8): relax restriction spaces inside "\u{...}". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-01parse.y: reject invalid codepointnobu
* parse.y (parser_tokadd_codepoint): reject invalid codepoint, surrogate blocks and surrogate pair, as well as mruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30parse.y: refine error messagenobu
* parse.y (parser_tokadd_utf8): refine error message at bad char in unicode escape, "invalid" instead of "unterminated". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30parse.y: parser_tokadd_codepointnobu
* parse.y (parser_tokadd_codepoint): extract from parser_tokadd_utf8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30parse.y: brace constantsnobu
* parse.y (parser_tokadd_utf8): make open/close braces constant. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30parse.y: no warning for lambdanobu
* parse.y (parser_yylex): do not warn parentheses of lambda argument list, because there is no name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29parse.y: ambiguous parenthesesnobu
* parse.y (parser_yylex): warn ambiguous parentheses after a space in method definitions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-22parse.y: warn ? followed by a wordnobu
* parse.y (parse_qmark): warn `?` with unbalanced space, which is interpreted as a conditional operator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-21Revert r56856nobu
* parse.y: tCHAR can be concatenated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-21parse.y: tCHAR cannot be concatenatednobu
* parse.y (strings): tCHAR is not a subject of string literal concatenation and string interpolation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-10parse.y: new_attr_op_assign in ripper needs symbolnobu
* parse.y (command_asgn, arg): new_attr_op_assign in ripper expects a Symbol VALUE as the operator, not an ID, so convert literal IDs to Symbols. [ruby-core:78069] [Bug #12916] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-05parse.y: fix restored cmdarg_stacknobu
* parse.y (brace_body, do_body): since cmdarg_stack is saved in VALUE val, should restore from the same member. on big-endian platforms where VALUE is larger than int, it restored 0 in the upper word. [ruby-core:77920] [Bug #12900] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-29parse.y: !-operator warningnobu
* parse.y (cond0): !-operator is a method call, no warning for literal in condition. [ruby-core:77801] [Bug #12881] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-22parse.y: append to buffernobu
* parse.y (reg_compile_gen): always append error message to the error buffer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-01compile.c: literal rangenobu
* compile.c (iseq_compile_each): move numeric literal range optimization from fixup_nodes() in parse.y. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-29parse.y: deferred_dots_gennobu
* parse.y (deferred_dots_gen): extract for tDOT2 and tDOT3. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-27parse.y: fix up r56198nobu
* parse.y (symbol, dsym, parser_set_number_literal): set state to ENDARG, so that `do` after a literal should be `do_block` and bound to the outer method. [ruby-core:72482] [Bug #11873] * parse.y (parse_ident): revert r56198. * parse.y (warn_balanced): the state of symbol and numeric literals is now EXPR_ENDARG, do not exclude it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-21parse.y: preserve cmdarg_stacknobu
* parse.y (brace_body, do_body): preserve cmdarg_stack so that `do` after cmdarg in a block should be `do_block` and bound to the outer method. [ruby-core:72482] [Bug #11873] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-21parse.y: do after cmdarg in parennobu
* parse.y: `do` after cmdarg in parentheses should be `do_block` and bound to the outer method. [ruby-core:72482] [Bug #11873] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-21parse.y: remove spaces [ci skip]nobu
* parse.y (cmd_brace_block, do_block): remove spaces before tab in indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-21parse.y: block bodiesnobu
* parse.y (brace_body, do_body): extract block bodies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-26parse.y: heredoc tokennobu
* parse.y (parser_heredoc_identifier): gather branches by quote char. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-26parse.y: STR_TERM_ENDnobu
* parse.y (parser_parse_string): store the end of string literal mark in nd_term instead of nd_func. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-26parse.y: parser_string_termnobu
* parse.y (parser_string_term): return the token of string or regexp literal terminator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-26parse.y: reset indent in heredoc_dedentnobu
* parse.y (parser_heredoc_dedent): reset heredoc_indent and return the dedented node. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-26parse.y: new_string1nobu
* parse.y (new_string1): extract from the rule. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-26parse.y: new_xstring_gennobu
* parse.y (new_xstring_gen): extract from the rule. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-26parse.y: new_regexp_gennobu
* parse.y (new_regexp_gen): extract from the rule. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-19parse.y: lparen_arg statementnobu
* parse.y (primary): allow parenthesised statement as a method argument. [Feature #12686] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-13parse.y: chained assignmentsnobu
* parse.y (command_asgn, arg): fix syntax errors with chained assignment with op assign. [Bug #12669] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-13parse.y: rescue modifier in rhs of op asgnnobu
* parse.y (stmt, arg): rescue modifier in command op assignment should be limited to rhs only. [ruby-core:75621] [Bug #12402] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-12parse.y: const_decl_gennobu
* parse.y (const_decl_gen): extract as a function as well as ripper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-12parse.y: assign_errornobu
* parse.y (assign_error_gen): [ripper] rename without backref. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11parse.y: node_assignnobu
* parse.y (stmt, command_asgn): unifiy parser and ripper code by node_assign macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11parse.y: backref_assign_errornobu
* parse.y (backref_assign_error): unify parser and ripper code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11parse.y: const declaration macronobu
* parse.y (const_decl): unify parser and ripper code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e