diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-18 15:53:57 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-18 15:53:57 +0000 |
| commit | 86b710d9133b124fe084bdda278deb7948c9dd90 (patch) | |
| tree | 25e20e400c4824bedb79af06f22b93494d811a92 /parse.y | |
| parent | 612715db2687b5aac1bd90065d54b3201ea40a4c (diff) | |
| download | ruby-86b710d9133b124fe084bdda278deb7948c9dd90.tar.gz ruby-86b710d9133b124fe084bdda278deb7948c9dd90.tar.xz ruby-86b710d9133b124fe084bdda278deb7948c9dd90.zip | |
* parse.y (yylex): ? followed by successive word charaters is
ternary operator not numeric literal.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -3300,10 +3300,14 @@ yylex() rb_warn("invalid character syntax; use ?\\%c", c); } } + ternary: pushback(c); lex_state = EXPR_BEG; return '?'; } + if ((ISALNUM(c) || c == '_') && lex_p < lex_pend && is_identchar(*lex_p)) { + goto ternary; + } else if (c == '\\') { c = read_escape(); } |
