This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix parsing of braced subscript after parens
authorZefram <zefram@fysh.org>
Tue, 16 Jan 2018 08:04:08 +0000 (08:04 +0000)
committerZefram <zefram@fysh.org>
Tue, 16 Jan 2018 08:04:08 +0000 (08:04 +0000)
commit097ff42c3bba30230d3512b3de153c75cd2e43c9
treef4fd9e0d212719451844928c695b853a1ac28617
parent6661956a23de82b41adc406200054293d6d7aded
fix parsing of braced subscript after parens

Where an arrow is omitted between subscripts, if a parenthesised
subscript is followed by a braced one, PL_expect was getting set to
XBLOCK due to code intended for "foreach (...) {...}".  This broke
bareword autoquotation, and the parsing of operators following the
braced subscript.  Alter PL_expect from XBLOCK to XOPERATOR following
a parenthesised subscript.  Fixes [perl #8045].
perly.act
perly.h
perly.tab
perly.y
t/op/postfixderef.t