This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
subtly change meaning of XATTRBLOCK, XATTRTERM
authorDavid Mitchell <davem@iabyn.com>
Mon, 26 Feb 2018 13:50:50 +0000 (13:50 +0000)
committerDavid Mitchell <davem@iabyn.com>
Fri, 2 Mar 2018 13:36:43 +0000 (13:36 +0000)
commit86ae8d9a6f56e9e71efc1f3e556f6770dc07566e
tree01ce23f793f540508a74cfd9a87421266c46a9a5
parent75230cc19006735d29105daf0c6dcaf41880f961
subtly change meaning of XATTRBLOCK, XATTRTERM

Currently they tell the toker that the next thing will be attributes,
followed by an XBLOCK or XTERMBLOCK respectively.

This commit subtly changes their meanings so that they indicate that
attributes legally *might* follow. This makes the code which initially
sets them slightly simpler (no need to check whether the next char is
':'), and the code elsewhere in yylex() which handles XATTR* only triggers
if the next char is ':' anyway.

Doing it this way will shortly make detection simpler of an attribute
illegally following a signature.
perl.h
toke.c