From 0018c815bf3d7a9b6e5d064bdbd5f3ea6064e029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nelson=20Ben=C3=ADtez=20Le=C3=B3n?= Date: Sat, 9 Dec 2023 20:06:41 +0000 Subject: [PATCH] Don't fail on a TYPE with empty parens inside PARAM_LIST Code like "std::function" fails because the empty parens were not expected, so add this case to the regex. Fixes #10 Fixes #5 --- colourvalgrind/colourvalgrind.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/colourvalgrind/colourvalgrind.py b/colourvalgrind/colourvalgrind.py index 9a14a4a..d1013f5 100644 --- a/colourvalgrind/colourvalgrind.py +++ b/colourvalgrind/colourvalgrind.py @@ -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" (?:"