summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2023-02-08 18:16:02 +0000
committerPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2023-02-10 14:38:44 +0000
commitd8b29a3430b219e3ab3dae2947a0ff22885c1b5e (patch)
tree61f97639111bca805999c24a256a2b0b037e9c98 /toke.c
parent07c4c053ee9ee2dac36d7eadd6d2558d94a7a802 (diff)
downloadperl-d8b29a3430b219e3ab3dae2947a0ff22885c1b5e.tar.gz
Field :param attributes, //= and ||= default assignments
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/toke.c b/toke.c
index f92c391eb0..cb9e001eab 100644
--- a/toke.c
+++ b/toke.c
@@ -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. */