This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
signatures: eliminate XSIGVAR, add KEY_sigvar
authorDavid Mitchell <davem@iabyn.com>
Thu, 18 Aug 2016 08:53:11 +0000 (09:53 +0100)
committerDavid Mitchell <davem@iabyn.com>
Thu, 18 Aug 2016 17:55:09 +0000 (18:55 +0100)
commit49fb862041f1f74fafbc91afa553624c43078261
tree8cd973987dc238b0111a66e1232286ebde339f5e
parent0cf18b74ec1005ca929e64dd9158674d5163ff0a
signatures: eliminate XSIGVAR, add KEY_sigvar

When I moved subroutine signature processing into perly.y with
v5.25.3-101-gd3d9da4, I added a new lexer PL_expect state, XSIGVAR.

This indicated, when about to parse a variable, that it was a signature
element rather than a my variable; in particular, it makes ($,...)
be toked as the lone sigil '$' rather than the punctuation variable '$,'.

However this is a bit heavy-handled; so instead this commit adds a
new allowed pseudo-keyword value to PL_in_my: as well as KEY_my, KEY_our and
KEY_state, it can now be KEY_sigvar. This is a less intrusive change
to the lexer.
embed.fnc
embed.h
pad.c
perl.h
perly.act
perly.h
perly.tab
perly.y
proto.h
t/op/signatures.t
toke.c