diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-08 16:32:07 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-08 16:32:07 +0000 |
commit | b3b48e3eb8f85caa6afab3dc95ab58c02450700f (patch) | |
tree | d9f052f43368551c55cf1a1539f48ba368f3a5db /toke.c | |
parent | 7fd134d9e547166a30ad904424bd09e784d058ce (diff) | |
download | perl-b3b48e3eb8f85caa6afab3dc95ab58c02450700f.tar.gz |
Don't forget to whine about \d__\d.
p4raw-id: //depot/perl@10038
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -7189,29 +7189,21 @@ Perl_scan_num(pTHX_ char *start, YYSTYPE* lvalp) lastub = s++; } - /* read off the first digit */ - if (isDIGIT(*s)) { - if (d >= e) - Perl_croak(aTHX_ number_too_long); - *d++ = *s++; - } - /* read digits of exponent */ while (isDIGIT(*s) || *s == '_') { if (isDIGIT(*s)) { if (d >= e) Perl_croak(aTHX_ number_too_long); - *d++ = *s; + *d++ = *s++; } else { if (ckWARN(WARN_SYNTAX) && ((lastub && s == lastub + 1) || - !isDIGIT(s[1]))) + (!isDIGIT(s[1]) && s[1] != '_'))) Perl_warner(aTHX_ WARN_SYNTAX, "Misplaced _ in number"); - lastub = s; + lastub = s++; } - s++; } } |