toke.c: Set PL_lex_state less when scanning formats
This (in yylex) is the only code that calls scan_formline:
case LEX_FORMLINE:
PL_lex_state = PL_parser->form_lex_state;
s = scan_formline(PL_bufptr);
if (!PL_lex_formbrack)
{
formbrack = 1;
goto rightbracket;
}
PL_bufptr = s;
return yylex();
}
It is only reached when PL_lex_state is LEX_FORMLINE. scan_formline
itself does not even look at PL_lex_state. It does set it, though,
unless it has reached the end of the format (setting PL_lex_formbrack
to 0) or the end of input.
This means we end up flipping it back and forth between two values.
We don’t have to set PL_lex_state before scan_formline() at all. Hav-
ing scan_formline only set it when it does not need to be LEX_FORMLINE
simplifies things, resulting in less code and fewer assignments.