A few lines of code added by this commit:
commit
6f33ba736d46c2f5bfdb2405fd09d82ec18a1d07
Author: Rafael Garcia-Suarez <rgarciasuarez@gmail.com>
Date: Sun Aug 25 18:42:46 2002 +0000
Fix parsing problems with the // operator.
Make // able to follow various unary operators used without
arguments or parens (shift, pop, getc, pos, readline,
readlink, undef, umask, and the filetest operators), as
well as the <FH> operator.
were already unreachable when they were added, specifically the code
for handling // after <FH> (which is fortunate, because XTERMORDORDOR
after <FH> would break <FH>+1).
S_scan_inputsymbol sets pl_yylval.ival to OP_NULL, since it has
already created the ops; it has done so since perl 5.000. So this
branch is never reached when parsing <FH>.
The if-block containing these lines has had ‘|| op_type ==
OP_READLINE’ since perl 5.000, which has also always been redundant
for the same reason.
PL_lex_op = NULL;
return THING;
}
- if (op_type == OP_CONST || op_type == OP_READLINE) {
+ if (op_type == OP_CONST) {
SV *sv = tokeq(PL_lex_stuff);
if (SvTYPE(sv) == SVt_PVIV) {
}
pl_yylval.opval = (OP*)newSVOP(op_type, 0, sv);
PL_lex_stuff = NULL;
- /* Allow <FH> // "foo" */
- if (op_type == OP_READLINE)
- PL_expect = XTERMORDORDOR;
return THING;
}