summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-08-21 17:59:06 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-08-24 19:02:56 -0700
commit19f1898a1ae4536b68389fbd144330251a7547d6 (patch)
treeb71a63e43ae3a8f4539f4e5b98475ae6b51782d4 /toke.c
parent41e8cbf436fe4165360381067f6fda82f6565690 (diff)
downloadperl-19f1898a1ae4536b68389fbd144330251a7547d6.tar.gz
toke.c:S_lop: Don’t set PL_expect if PL_nexttoke
Don’t set PL_expect if we have a ‘next token’, because when it is popped off the pending token stack PL_expect will be set to the saved value, clobbering this assigned value. So the assignment is unnecessary.
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index 6ebbcc8915..b5efb7a8f7 100644
--- a/toke.c
+++ b/toke.c
@@ -1863,12 +1863,12 @@ S_lop(pTHX_ I32 f, int x, char *s)
pl_yylval.ival = f;
CLINE;
- PL_expect = x;
PL_bufptr = s;
PL_last_lop = PL_oldbufptr;
PL_last_lop_op = (OPCODE)f;
if (PL_nexttoke)
goto lstop;
+ PL_expect = x;
if (*s == '(')
return REPORT(FUNC);
s = PEEKSPACE(s);