This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
toke.c: For plugins, don’t set PL_expect if PL_nexttoke
When a parsing plugin finishes parsing its stuff, the lexer may have
emitted one more token than the construct it was parsing (if the
plugin called parsing API functions like parse_fullstmt). In such
cases, yyunlex has pushed that token on to the pending token stack
with force_next.
When the lexer is about to emit the plugin’s parsed statement or
expression, if there is a pending token, then it does not need to set
PL_expect, since the previous value will be restored anyway when the
pending token is emitted.
The next commit will disable that save-and-restore mechanism for
PL_expect, so we must not assign to it here.