diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-05-26 08:24:51 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-05-26 08:24:51 +0000 |
commit | e6300774896d943115b3f51fa3489d3051f61eb4 (patch) | |
tree | 825c701fc7319cb5a34d8995525d917eaed5249d /parse.y | |
parent | 0f34277fe50561c58c5c50881bbe234fbe8eafad (diff) |
1.1b9_23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 22 |
1 files changed, 3 insertions, 19 deletions
@@ -57,7 +57,7 @@ static enum lex_state { EXPR_BEG, /* ignore newline, +/- is a sign. */ EXPR_MID, /* newline significant, +/- is a sign. */ EXPR_END, /* newline significant, +/- is a operator. */ - EXPR_ARG, /* newline significant, +/- may be a sign. */ + EXPR_ARG, /* newline significant, +/- is a operator. */ EXPR_FNAME, /* ignore newline, +/- is a operator, no reserved words. */ EXPR_DOT, /* immediate after `.', no reserved words. */ EXPR_CLASS, /* immediate after `class', no here document. */ @@ -2498,15 +2498,7 @@ retry: yylval.id = '+'; return tOP_ASGN; } - if (lex_state == EXPR_ARG) { - if (space_seen && !ISSPACE(c)) { - arg_ambiguous(); - } - else { - lex_state = EXPR_END; - } - } - if (lex_state != EXPR_END) { + if (lex_state == EXPR_BEG || lex_state == EXPR_MID) { if (ISDIGIT(c)) { goto start_num; } @@ -2532,15 +2524,7 @@ retry: yylval.id = '-'; return tOP_ASGN; } - if (lex_state == EXPR_ARG) { - if (space_seen && !ISSPACE(c)) { - arg_ambiguous(); - } - else { - lex_state = EXPR_END; - } - } - if (lex_state != EXPR_END) { + if (lex_state == EXPR_BEG || lex_state == EXPR_MID) { if (ISDIGIT(c)) { pushback(c); c = '-'; |