mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 08:38:23 +00:00
toke.c: Avoid a loop iteration
By using the output of the first macro, and skipping ahead in the parse string, we avoid reparsing the same bytes.
This commit is contained in:
parent
690e285d14
commit
cdde901d86
7
toke.c
7
toke.c
@ -707,9 +707,10 @@ S_warn_expect_operator(pTHX_ const char *const what, char *s, I32 pop_oldbufptr)
|
||||
}
|
||||
|
||||
/* see if we can identify the cause of the warning */
|
||||
if (isIDFIRST_lazy_if_safe(t,PL_bufend,UTF))
|
||||
{
|
||||
const char *t_start= t;
|
||||
Size_t advance;
|
||||
if ((advance = isIDFIRST_lazy_if_safe(t, PL_bufend, UTF))) {
|
||||
const char *t_start = t;
|
||||
t += advance;
|
||||
for ( ;
|
||||
(isWORDCHAR_lazy_if_safe(t, PL_bufend, UTF) || *t == ':');
|
||||
t += UTF ? UTF8SKIP(t) : 1)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user