* parse.y (yylex): ? followed by successive word charaters is
ternary operator not numeric literal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
de9251e2c7
commit
772f420a18
@ -1,4 +1,7 @@
|
|||||||
Wed Jun 19 00:39:52 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
Wed Jun 19 00:50:50 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
|
* parse.y (yylex): ? followed by successive word charaters is
|
||||||
|
ternary operator not numeric literal.
|
||||||
|
|
||||||
* parse.y (yylex): commands after break/next/rescue can take
|
* parse.y (yylex): commands after break/next/rescue can take
|
||||||
arguments. (ruby-bugs-ja:PR#265)
|
arguments. (ruby-bugs-ja:PR#265)
|
||||||
|
4
parse.y
4
parse.y
@ -3300,10 +3300,14 @@ yylex()
|
|||||||
rb_warn("invalid character syntax; use ?\\%c", c);
|
rb_warn("invalid character syntax; use ?\\%c", c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ternary:
|
||||||
pushback(c);
|
pushback(c);
|
||||||
lex_state = EXPR_BEG;
|
lex_state = EXPR_BEG;
|
||||||
return '?';
|
return '?';
|
||||||
}
|
}
|
||||||
|
if ((ISALNUM(c) || c == '_') && lex_p < lex_pend && is_identchar(*lex_p)) {
|
||||||
|
goto ternary;
|
||||||
|
}
|
||||||
else if (c == '\\') {
|
else if (c == '\\') {
|
||||||
c = read_escape();
|
c = read_escape();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user