From a92622bcc30131a0d161a1a90d65475ebafd2329 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Fri, 22 Aug 2014 05:45:27 -0700 Subject: [PATCH] toke.c: Touch PL_expect less for implicit [.,] in quotes MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When emitting implicit commas and cats, there is no need to set PL_expect at the same time, since these code paths have already set it to the correct value. Also, the two instances of Aop would check the current parse position for an ‘=’ to make an assignment operator. But that could never happen in these two code paths, so the check was a waste. --- toke.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/toke.c b/toke.c index a7ba403..f3a493c 100644 --- a/toke.c +++ b/toke.c @@ -4390,7 +4390,7 @@ Perl_yylex(pTHX) PL_lex_starts = 0; /* commas only at base level: /$a\Ub$c/ => ($a,uc(b.$c)) */ if (PL_lex_casemods == 1 && PL_lex_inpat) - OPERATOR(','); + TOKEN(','); else AopNOASSIGN(OP_CONCAT); } @@ -4437,9 +4437,9 @@ Perl_yylex(pTHX) s = PL_bufptr; /* commas only at base level: /$a\Ub$c/ => ($a,uc(b.$c)) */ if (!PL_lex_casemods && PL_lex_inpat) - OPERATOR(','); + TOKEN(','); else - Aop(OP_CONCAT); + AopNOASSIGN(OP_CONCAT); } return yylex(); @@ -4527,9 +4527,9 @@ Perl_yylex(pTHX) if (PL_lex_starts++) { /* commas only at base level: /$a\Ub$c/ => ($a,uc(b.$c)) */ if (!PL_lex_casemods && PL_lex_inpat) - OPERATOR(','); + TOKEN(','); else - Aop(OP_CONCAT); + AopNOASSIGN(OP_CONCAT); } else { PL_bufptr = s; -- 1.8.3.1