This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41e8cbf
)
toke.c:S_lop: Don’t set PL_expect if PL_nexttoke
author
Father Chrysostomos
<sprout@cpan.org>
Fri, 22 Aug 2014 00:59:06 +0000
(17:59 -0700)
committer
Father Chrysostomos
<sprout@cpan.org>
Mon, 25 Aug 2014 02:02:56 +0000
(19:02 -0700)
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.
toke.c
patch
|
blob
|
blame
|
history
diff --git
a/toke.c
b/toke.c
index
6ebbcc8
..
b5efb7a
100644
(file)
--- 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);