Skip to content

Commit

Permalink
[sipify] allow namespace/class spec in static const declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored Nov 18, 2024
1 parent 25ec551 commit a135e21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/sipify.py
Original file line number Diff line number Diff line change
Expand Up @@ -2246,9 +2246,9 @@ def cpp_to_python_signature(cpp_function: str) -> str:

# TODO needs fixing!!
# original perl regex was:
# ^(?<staticconst> *(?<static>static )?const \w+(?:<(?:[\w<>, ]|::)+>)? \w+)(?: = [^()]+?(\((?:[^()]++|(?3))*\))?[^()]*?)?(?<endingchar>[|;]) *(\/\/.*?)?$
# ^(?<staticconst> *(?<static>static )?const (\w+::)*\w+(?:<(?:[\w<>, ]|::)+>)? \w+)(?: = [^()]+?(\((?:[^()]++|(?3))*\))?[^()]*?)?(?<endingchar>[|;]) *(\/\/.*?)?$
match = re.search(
r'^(?P<staticconst> *(?P<static>static )?const \w+(?:<(?:[\w<>, ]|::)+>)? \w+)(?: = [^()]+?(\((?:[^()]|\([^()]*\))*\))?[^()]*?)?(?P<endingchar>[|;]) *(//.*)?$',
r'^(?P<staticconst> *(?P<static>static )?const (\w+::)*\w+(?:<(?:[\w<>, ]|::)+>)? \w+)(?: = [^()]+?(\((?:[^()]|\([^()]*\))*\))?[^()]*?)?(?P<endingchar>[|;]) *(//.*)?$',
CONTEXT.current_line
)
if match:
Expand Down

0 comments on commit a135e21

Please sign in to comment.