Bug #2407 ยป dont_show_unexpected_tIDENTIFIER_error_in_numeric_literal_without_digits.patch
| parse.y | ||
|---|---|---|
|
tokfix();
|
||
|
if (toklen() == start) {
|
||
|
yyerror("numeric literal without digits");
|
||
|
return 0;
|
||
|
}
|
||
|
else if (nondigit) goto trailing_uc;
|
||
|
set_yylval_literal(rb_cstr_to_inum(tok(), 16, FALSE));
|
||
| ... | ... | |
|
tokfix();
|
||
|
if (toklen() == start) {
|
||
|
yyerror("numeric literal without digits");
|
||
|
return 0;
|
||
|
}
|
||
|
else if (nondigit) goto trailing_uc;
|
||
|
set_yylval_literal(rb_cstr_to_inum(tok(), 2, FALSE));
|
||
| ... | ... | |
|
tokfix();
|
||
|
if (toklen() == start) {
|
||
|
yyerror("numeric literal without digits");
|
||
|
return 0;
|
||
|
}
|
||
|
else if (nondigit) goto trailing_uc;
|
||
|
set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE));
|
||
| ... | ... | |
|
c = nextc();
|
||
|
if (c == -1 || c == '_' || !ISDIGIT(c)) {
|
||
|
yyerror("numeric literal without digits");
|
||
|
return 0;
|
||
|
}
|
||
|
}
|
||
|
if (c >= '0' && c <= '7') {
|
||