mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 08:38:23 +00:00
toke.c: Convert for(;;;) to simpler while()
isSPACE only matches single-byte characters; no need to be concerned with UTF-8ness
This commit is contained in:
parent
526049b8eb
commit
690e285d14
10
toke.c
10
toke.c
@ -701,13 +701,11 @@ S_warn_expect_operator(pTHX_ const char *const what, char *s, I32 pop_oldbufptr)
|
||||
}
|
||||
else if (PL_oldoldbufptr) {
|
||||
/* yyerror (via yywarn) would do this itself, so we should too */
|
||||
const char *t;
|
||||
for (t = PL_oldoldbufptr;
|
||||
t < PL_bufptr && isSPACE(*t);
|
||||
t += UTF ? UTF8SKIP(t) : 1)
|
||||
{
|
||||
NOOP;
|
||||
const char *t = PL_oldoldbufptr;
|
||||
while (t < PL_bufptr && isSPACE(*t)) {
|
||||
t++;
|
||||
}
|
||||
|
||||
/* see if we can identify the cause of the warning */
|
||||
if (isIDFIRST_lazy_if_safe(t,PL_bufend,UTF))
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user