This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Deparse (eof)+1 correctly
authorFather Chrysostomos <sprout@cpan.org>
Thu, 8 Dec 2011 20:49:33 +0000 (12:49 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 8 Dec 2011 21:50:49 +0000 (13:50 -0800)
commit4d8ac5c735b4377aecb531044f04c9917054ba71
tree852c25c18d9c4569fd8f70cc3e0345359b245171
parent2462c3ccada0e87002e4f7dc42bfcdfe36fe678a
Deparse (eof)+1 correctly

If the parentheses are omitted, it means eof(1).

To fix this, we surround the keyword with parentheses (if necessary
according to precedence) if it is an unop, because a final () has a
special meaning for some unops.

For listops, we use surrounding parentheses only if the llafr does
not apply.  Otherwise we use a final ().
dist/B-Deparse/Deparse.pm
dist/B-Deparse/t/deparse.t