diff options
author | Matthew Horsfall (alh) <wolfsage@gmail.com> | 2011-08-22 23:32:10 -0400 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-11-24 08:14:14 -0800 |
commit | 22393538c56003804a2e6c760dc234116a5bd60c (patch) | |
tree | 01fd38da133f2b831964fc71820156a5d88ea803 /toke.c | |
parent | 84573ee4ec8e28d2e202e1604b929087c5681653 (diff) | |
download | perl-22393538c56003804a2e6c760dc234116a5bd60c.tar.gz |
When parsing subs with user-defined prototypes, store information needed to throw warnings
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -285,6 +285,10 @@ static const char* const lex_state_names[] = { } #define UNI(f) UNI2(f,XTERM) #define UNIDOR(f) UNI2(f,XTERMORDORDOR) +#define UNIPROTO(f) { \ + PL_last_uni = PL_oldbufptr; \ + OPERATOR(f); \ + } #define UNIBRACK(f) { \ pl_yylval.ival = f; \ @@ -6863,12 +6867,12 @@ Perl_yylex(pTHX) *proto == '\\' && proto[1] && proto[2] == '\0' ) ) - OPERATOR(UNIOPSUB); + UNIPROTO(UNIOPSUB); if (*proto == '\\' && proto[1] == '[') { const char *p = proto + 2; while(*p && *p != ']') ++p; - if(*p == ']' && !p[1]) OPERATOR(UNIOPSUB); + if(*p == ']' && !p[1]) UNIPROTO(UNIOPSUB); } if (*proto == '&' && *s == '{') { if (PL_curstash) |