diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-11-13 11:17:10 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-11-13 11:17:10 +0000 |
commit | 3cd0a11a1a8c5cc6b632f666275eeafcb6f5c950 (patch) | |
tree | ef5cb137d86c08beb687f51c2676780541be79de /perly.y | |
parent | 0d520e8e301fa0eda31a3f68440e7e9b426a290f (diff) | |
download | perl-3cd0a11a1a8c5cc6b632f666275eeafcb6f5c950.tar.gz |
Parsing fix: it wasn't possible to call a function with a (_) prototype
(that is, a function mimicing an unary op) without parentheses.
Bug reported by Ævar Arnfjörð Bjarmason.
p4raw-id: //depot/perl@29258
Diffstat (limited to 'perly.y')
-rw-r--r-- | perly.y | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -711,6 +711,8 @@ term : termbinop { $$ = newOP(OP_REQUIRE, $1 ? OPf_SPECIAL : 0); } | REQUIRE term /* require Foo */ { $$ = newUNOP(OP_REQUIRE, $1 ? OPf_SPECIAL : 0, $2); } + | UNIOPSUB + { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar($1)); } | UNIOPSUB term /* Sub treated as unop */ { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, $2, scalar($1))); } |