diff options
author | Tony Cook <tony@develop-help.com> | 2016-01-12 15:39:00 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2016-01-14 09:41:55 +1100 |
commit | 61d30259f32e5bba52238d60608b6909208eb604 (patch) | |
tree | ed5479e2fd2470bd4d413e5d4b1bd9d029035404 /toke.c | |
parent | a64a174832c0301f4b239cab7e2ab4bb644060fb (diff) | |
download | perl-61d30259f32e5bba52238d60608b6909208eb604.tar.gz |
[perl #123737] handle a non-identifer after @ better for a missing op
Previously this would assert().
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -6368,8 +6368,14 @@ Perl_yylex(pTHX) POSTDEREF('@'); PL_tokenbuf[0] = '@'; s = scan_ident(s, PL_tokenbuf + 1, sizeof PL_tokenbuf - 1, FALSE); - if (PL_expect == XOPERATOR) - no_op("Array", s); + if (PL_expect == XOPERATOR) { + d = s; + if (PL_bufptr > s) { + d = PL_bufptr-1; + PL_bufptr = PL_oldbufptr; + } + no_op("Array", d); + } pl_yylval.ival = 0; if (!PL_tokenbuf[1]) { PREREF('@'); |