From 96b40dff450df701200ea5edceb07f2ed847e3fd Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 17 Feb 2000 07:11:22 +0000 Subject: 2000-02-17 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index 5c8e07058c..254c974fcf 100644 --- a/parse.y +++ b/parse.y @@ -2430,7 +2430,7 @@ parse_quotedwords(term, paren) strstart = ruby_sourceline; newtok(); - while ((c = nextc()) == ' ') + while (c = nextc(),ISSPACE(c)) ; /* skip preceding spaces */ pushback(c); while ((c = nextc()) != term || nest > 0) { @@ -2455,14 +2455,13 @@ parse_quotedwords(term, paren) case '\\': c = '\\'; break; - case ' ': - tokadd(' '); - break; default: - tokadd('\\'); + if (ISSPACE(c)) + tokadd('\\'); + tokadd(c); } } - else if (c == ' ') { + else if (ISSPACE(c)) { NODE *str; tokfix(); @@ -2470,7 +2469,7 @@ parse_quotedwords(term, paren) newtok(); if (!qwords) qwords = NEW_LIST(str); else list_append(qwords, str); - while ((c = nextc()) == ' ') + while (c = nextc(),ISSPACE(c)) ; /* skip continuous spaces */ pushback(c); continue; @@ -3414,8 +3413,8 @@ yylex() result = tFID; } else { - if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { - if ((c = nextc()) == '=' && !peek('=')) { + if (lex_state == EXPR_FNAME) { + if ((c = nextc()) == '=' && !peek('=') && !peek('~')) { result = tIDENTIFIER; tokadd(c); } -- cgit v1.2.3