diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-02-17 07:11:22 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-02-17 07:11:22 +0000 |
| commit | e83d532ff8b7d3c6eeaee3931d8b00df19c5f538 (patch) | |
| tree | a2c90999001ebcb8fd2fd67ffb3d5911a8e98f81 /parse.y | |
| parent | 154193050b7878e290f9f166279c18e01ef44ad6 (diff) | |
| download | ruby-e83d532ff8b7d3c6eeaee3931d8b00df19c5f538.tar.gz ruby-e83d532ff8b7d3c6eeaee3931d8b00df19c5f538.tar.xz ruby-e83d532ff8b7d3c6eeaee3931d8b00df19c5f538.zip | |
2000-02-17
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -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); } |
