diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-07-28 09:47:24 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-07-29 09:20:16 +0200 |
commit | f71d6157c7933c0d3df645f0411d97d7e2b66b2f (patch) | |
tree | ce6b1df0d1a07956de3c4dffaff9d3382c7264ae /toke.c | |
parent | 0409250f9c9eac87ff80d18e21856800e91763b5 (diff) | |
download | perl-f71d6157c7933c0d3df645f0411d97d7e2b66b2f.tar.gz |
Forbid labels with keyword names
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -5275,6 +5275,9 @@ Perl_yylex(pTHX) while (d < PL_bufend && isSPACE(*d)) d++; /* no comments skipped here, or s### is misparsed */ + /* Check for keywords */ + tmp = keyword(PL_tokenbuf, len, 0); + /* Is this a label? */ if (!tmp && PL_expect == XSTATE && d < PL_bufend && *d == ':' && *(d + 1) != ':') { @@ -5284,9 +5287,6 @@ Perl_yylex(pTHX) TOKEN(LABEL); } - /* Check for keywords */ - tmp = keyword(PL_tokenbuf, len, 0); - /* Is this a word before a => operator? */ if (*d == '=' && d[1] == '>') { CLINE; |