ruby-changes:15511
From: nobu <ko1@a...>
Date: Tue, 20 Apr 2010 12:10:11 +0900 (JST)
Subject: [ruby-changes:15511] Ruby:r27413 (trunk): * parse.y (parser_yylex): simplified with IS_ARG and IS_END.
nobu 2010-04-20 12:09:57 +0900 (Tue, 20 Apr 2010) New Revision: 27413 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27413 Log: * parse.y (parser_yylex): simplified with IS_ARG and IS_END. Modified files: trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 27412) +++ parse.y (revision 27413) @@ -6658,10 +6658,9 @@ case '<': c = nextc(); if (c == '<' && - lex_state != EXPR_END && lex_state != EXPR_DOT && - lex_state != EXPR_ENDARG && lex_state != EXPR_CLASS && + !IS_END() && (!IS_ARG() || space_seen)) { int token = heredoc_identifier(); if (token) return token; @@ -6737,7 +6736,7 @@ return tSTRING_BEG; case '?': - if (lex_state == EXPR_END || lex_state == EXPR_ENDARG) { + if (IS_END()) { lex_state = EXPR_VALUE; return '?'; } @@ -7625,8 +7624,7 @@ } if ((lex_state == EXPR_BEG && !cmd_state) || - lex_state == EXPR_ARG || - lex_state == EXPR_CMDARG) { + IS_ARG()) { if (peek(':') && !(lex_p + 1 < lex_pend && lex_p[1] == ':')) { lex_state = EXPR_BEG; nextc(); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/