mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* parse.y (warn_balanced, parser_yylex): no warnings after closing
parens. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e9ff453d86
commit
bf36feb76d
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon May 24 19:00:34 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* parse.y (warn_balanced, parser_yylex): no warnings after closing
|
||||
parens.
|
||||
|
||||
Mon May 24 12:52:44 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* common.mk (change), tool/change_maker.rb: make a brief template
|
||||
|
|
3
parse.y
3
parse.y
|
@ -6486,6 +6486,7 @@ parser_prepare(struct parser_params *parser)
|
|||
#define warn_balanced(op, syn) \
|
||||
(last_state != EXPR_CLASS && last_state != EXPR_DOT && \
|
||||
last_state != EXPR_FNAME && last_state != EXPR_ENDFN && \
|
||||
last_state != EXPR_ENDARG && \
|
||||
space_seen && !ISSPACE(c) && \
|
||||
(ambiguous_operator(op, syn), 0))
|
||||
|
||||
|
@ -7252,7 +7253,7 @@ parser_yylex(struct parser_params *parser)
|
|||
COND_LEXPOP();
|
||||
CMDARG_LEXPOP();
|
||||
if (c == ')')
|
||||
lex_state = EXPR_END;
|
||||
lex_state = EXPR_ENDFN;
|
||||
else
|
||||
lex_state = EXPR_ENDARG;
|
||||
return c;
|
||||
|
|
Loading…
Reference in a new issue