diff options
author | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2023-02-08 18:10:15 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2023-02-10 14:37:25 +0000 |
commit | 69953ef3f17b02d83fb922e406db19fbd39f6fa3 (patch) | |
tree | b602ce1b6f4bf5bedb2edf4744baa6ac4cdede56 /toke.c | |
parent | 185929a010d6025e1b146d410a0f1581cc336b75 (diff) | |
download | perl-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.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |