Skip to content

Commit

Permalink
Don't fail on a TYPE with empty parens inside PARAM_LIST
Browse files Browse the repository at this point in the history
Code like "std::function<void ()>" fails because the
empty parens were not expected, so add this case
to the regex.

Fixes StarlitGhost#10
Fixes StarlitGhost#5
  • Loading branch information
nbenitez committed Dec 9, 2023
1 parent 80fb8c1 commit 0018c81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion colourvalgrind/colourvalgrind.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def func_signature(self, func):
r" (?P<_TYPE_LIST_> (?&_TYPE_) (?: \s* , \s* (?&_TYPE_))* )"
r" (?P<_FUNC_PTR_> (?: (?&_TYPE_) \s* \( (?: (?&_TYPE_) | \* ) \) \s*"
r" \( (?&_TYPE_LIST_)? \) ) )"
r" (?P<_PARAM_> (?: (?&_TYPE_) | (?&_FUNC_PTR_) ) )"
r" (?P<_PARAM_> (?: (?: (?&_TYPE_) (?: \s* \(\) )? ) | (?&_FUNC_PTR_) ) )"
r" (?P<_PARAM_LIST_> (?&_PARAM_) (?: \s* , \s* (?&_PARAM_) )* )"
r" (?P<_NUMERIC_LITERAL_> (?:"
r" (?:"
Expand Down

0 comments on commit 0018c81

Please sign in to comment.