Only set PL_expect here when force_word has realised there is no word
there and has not called force_next. Setting PL_expect after a call
to force_next is useless, as force_next causes its saved value to be
restored when the next token is emitted.
Changing this may seem silly, as an unconditional assignment may even
be faster, but this will allow me to eliminate PL_lex_expect and make
PL_expect handling simpler than before.
}
else
pl_yylval.ival = 0;
- PL_expect = XTERM;
+ if (!PL_nexttoke) PL_expect = XTERM;
PL_bufptr = s;
PL_last_uni = PL_oldbufptr;
PL_last_lop_op = OP_REQUIRE;