summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-01-26 21:45:41 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-01-26 21:45:41 +0000
commit0120eecf48d66b2c5ac028f653ce37c6a866b26b (patch)
tree4672762c58abfd7b87c1c311161e80225991136b /toke.c
parent58231d3970cba2e1fc56f38812334ee802d7acf6 (diff)
downloadperl-0120eecf48d66b2c5ac028f653ce37c6a866b26b.tar.gz
revised attribute syntax: C<my $foo :a :b :c>, C<my $foo : a b c>
and C<my $foo : a : b : c> are all valid (from Spider Boardman) p4raw-id: //depot/perl@4907
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index f2f8fa5e5b..e7e217473e 100644
--- a/toke.c
+++ b/toke.c
@@ -2797,8 +2797,10 @@ Perl_yylex(pTHX)
newSVpvn(s, len)));
}
s = skipspace(d);
- while (*s == ',')
+ if (*s == ':' && s[1] != ':')
s = skipspace(s+1);
+ else if (s == d)
+ break; /* require real whitespace or :'s */
}
tmp = (PL_expect == XOPERATOR ? '=' : '{'); /*'}(' for vi */
if (*s != ';' && *s != tmp && (tmp != '=' || *s != ')')) {