diff options
author | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2023-02-08 18:16:02 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2023-02-10 14:38:44 +0000 |
commit | d8b29a3430b219e3ab3dae2947a0ff22885c1b5e (patch) | |
tree | 61f97639111bca805999c24a256a2b0b037e9c98 /toke.c | |
parent | 07c4c053ee9ee2dac36d7eadd6d2558d94a7a802 (diff) | |
download | perl-d8b29a3430b219e3ab3dae2947a0ff22885c1b5e.tar.gz |
Field :param attributes, //= and ||= default assignments
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -6043,8 +6043,9 @@ yyl_colon(pTHX_ char *s) if (*s != ';' && *s != '}' && !(PL_expect == XOPERATOR - ? (*s == '=' || *s == ')') - : (*s == '{' || *s == '('))) + /* if an operator is expected, permit =, //= and ||= or ) to end */ + ? (*s == '=' || *s == ')' || *s == '/' || *s == '|') + : (*s == '{' || *s == '('))) { const char q = ((*s == '\'') ? '"' : '\''); /* If here for an expression, and parsed no attrs, back off. */ |