summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-12-18 01:35:50 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-12-18 01:35:50 +0000
commit0505442f3c585b66999f71b9bb23ab4d01c6531a (patch)
tree3f76bdb360e3a56c0a103543cb21055de4b4ec29 /toke.c
parent79d01fbf58287276b77349e580651d9897f9b25c (diff)
downloadperl-0505442f3c585b66999f71b9bb23ab4d01c6531a.tar.gz
fix from Larry for parsing C<{ 0x1 => 'foo'}> as an
anon hash rather than a block; test case for the same p4raw-id: //depot/perl@4697
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/toke.c b/toke.c
index 57e263ff00..ff239a6743 100644
--- a/toke.c
+++ b/toke.c
@@ -2909,7 +2909,8 @@ Perl_yylex(pTHX)
if (++t < PL_bufend
&& (!isALNUM(*t)
|| ((*t == 'q' || *t == 'x') && ++t < PL_bufend
- && !isALNUM(*t)))) {
+ && !isALNUM(*t))))
+ {
char *tmps;
char open, close, term;
I32 brackets = 1;
@@ -2940,8 +2941,10 @@ Perl_yylex(pTHX)
}
t++;
}
- else if (isIDFIRST_lazy(s)) {
- for (t++; t < PL_bufend && isALNUM_lazy(t); t++) ;
+ else if (isALNUM_lazy(t)) {
+ t += UTF8SKIP(t);
+ while (t < PL_bufend && isALNUM_lazy(t))
+ t += UTF8SKIP(t);
}
while (t < PL_bufend && isSPACE(*t))
t++;