From a135e21727eae81835b931ef5b92501e30ec8d90 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Mon, 18 Nov 2024 10:00:48 +0100 Subject: [PATCH] [sipify] allow namespace/class spec in static const declarations --- scripts/sipify.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/sipify.py b/scripts/sipify.py index 2dd595972e3..78c37c9a10c 100755 --- a/scripts/sipify.py +++ b/scripts/sipify.py @@ -2246,9 +2246,9 @@ while CONTEXT.line_idx < CONTEXT.line_count: # TODO needs fixing!! # original perl regex was: - # ^(? *(?static )?const \w+(?:<(?:[\w<>, ]|::)+>)? \w+)(?: = [^()]+?(\((?:[^()]++|(?3))*\))?[^()]*?)?(?[|;]) *(\/\/.*?)?$ + # ^(? *(?static )?const (\w+::)*\w+(?:<(?:[\w<>, ]|::)+>)? \w+)(?: = [^()]+?(\((?:[^()]++|(?3))*\))?[^()]*?)?(?[|;]) *(\/\/.*?)?$ match = re.search( - r'^(?P *(?Pstatic )?const \w+(?:<(?:[\w<>, ]|::)+>)? \w+)(?: = [^()]+?(\((?:[^()]|\([^()]*\))*\))?[^()]*?)?(?P[|;]) *(//.*)?$', + r'^(?P *(?Pstatic )?const (\w+::)*\w+(?:<(?:[\w<>, ]|::)+>)? \w+)(?: = [^()]+?(\((?:[^()]|\([^()]*\))*\))?[^()]*?)?(?P[|;]) *(//.*)?$', CONTEXT.current_line ) if match: