This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
toke.c: Remove redundant PL_expect assignment
authorFather Chrysostomos <sprout@cpan.org>
Sun, 8 Feb 2015 03:10:06 +0000 (19:10 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 8 Feb 2015 03:10:53 +0000 (19:10 -0800)
As of v5.21.3-105-gc5e7362, force_ident no longer reads the value of
PL_expect, so the assignment can come after it.  And TERM('&') (just
after this if-statement) already assigns XOPERATOR to PL_expect.

toke.c

diff --git a/toke.c b/toke.c
index 0929b68..fa4de96 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -5753,7 +5753,6 @@ Perl_yylex(pTHX)
        s = scan_ident(s - 1, PL_tokenbuf + 1,
                       sizeof PL_tokenbuf - 1, TRUE);
        if (PL_tokenbuf[1]) {
-           PL_expect = XOPERATOR;
            force_ident_maybe_lex('&');
        }
        else