This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
parse subs and signature subs separately
Currently the toker returns a SUB or ANONSUB token at the beginning
of a sub (or BEGIN etc). Change it so that in the scope of
'use feature "signatures"', it returns a SIGSUB / ANON_SIGSUB token
instead.
Then in perly.y, duplicate the 2 rules containing SUB / ANONSUB
to cope with these two new tokens.
The net effect of this is to use different rules in the parser for
parsing subs when signatures are in scope.
Since the two sets of rules have just been cut and pasted, there should
be no functional changes yet, but that will change shortly.