summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2023-02-08 18:10:15 +0000
committerPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2023-02-10 14:37:25 +0000
commit69953ef3f17b02d83fb922e406db19fbd39f6fa3 (patch)
treeb602ce1b6f4bf5bedb2edf4744baa6ac4cdede56 /toke.c
parent185929a010d6025e1b146d410a0f1581cc336b75 (diff)
downloadperl-69953ef3f17b02d83fb922e406db19fbd39f6fa3.tar.gz
Initial attack at parsing attribute syntax for class blocks; though no attrs are yet defined
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/toke.c b/toke.c
index 6433fdeea6..f92c391eb0 100644
--- a/toke.c
+++ b/toke.c
@@ -2431,8 +2431,8 @@ S_force_strict_version(pTHX_ char *s)
s = (char *)scan_version(s, ver, 0);
version = newSVOP(OP_CONST, 0, ver);
}
- else if ((*s != ';' && *s != '{' && *s != '}' )
- && (s = skipspace(s), (*s != ';' && *s != '{' && *s != '}' )))
+ else if ((*s != ';' && *s != ':' && *s != '{' && *s != '}' )
+ && (s = skipspace(s), (*s != ';' && *s != ':' && *s != '{' && *s != '}' )))
{
PL_bufptr = s;
if (errstr)
@@ -7882,7 +7882,8 @@ yyl_word_or_keyword(pTHX_ char *s, STRLEN len, I32 key, I32 orig_keyword, struct
s = force_word(s,BAREWORD,FALSE,TRUE);
s = skipspace(s);
s = force_strict_version(s);
- PREBLOCK(KW_CLASS);
+ PL_expect = XATTRBLOCK;
+ TOKEN(KW_CLASS);
case KEY_continue:
/* We have to disambiguate the two senses of