This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
toke.c: Don’t set PL_expect when emitting USE tokens
authorFather Chrysostomos <sprout@cpan.org>
Thu, 21 Aug 2014 05:18:38 +0000 (22:18 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 25 Aug 2014 02:02:55 +0000 (19:02 -0700)
This is a follow-up to 52d0e95bf.

It is not necessary to set PL_expect (via TERM or OPERATOR) since
tokenize_use has already done it.  In 52d0e95bf I only changed one of
tokenize_use’s callers, and changed it the wrong way.

No behaviour changes.

toke.c

diff --git a/toke.c b/toke.c
index f855f69..b0e9518 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -7442,7 +7442,7 @@ Perl_yylex(pTHX)
 
        case KEY_no:
            s = tokenize_use(0, s);
-           TERM(USE);
+           TOKEN(USE);
 
        case KEY_not:
            if (*s == '(' || (s = SKIPSPACE1(s), *s == '('))
@@ -8005,7 +8005,7 @@ Perl_yylex(pTHX)
 
        case KEY_use:
            s = tokenize_use(1, s);
-           OPERATOR(USE);
+           TOKEN(USE);
 
        case KEY_values:
            UNI(OP_VALUES);