From a8c1cdca5703ae767960ffa1469ed9874fb651f2 Mon Sep 17 00:00:00 2001 From: Paul Fultz II Date: Tue, 16 Aug 2022 12:05:37 -0500 Subject: [PATCH] Add ** to match until in addons (#4353) --- addons/cppcheckdata.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/addons/cppcheckdata.py b/addons/cppcheckdata.py index 0cd37e5c8..af0c99132 100755 --- a/addons/cppcheckdata.py +++ b/addons/cppcheckdata.py @@ -1382,9 +1382,18 @@ def match_atom(token, p): if t: return t elif p.startswith('!!'): - t = match_atom(token, p[1:]) + t = match_atom(token, p[2:]) if not t: return token + elif p.startswith('**'): + a = p[2:] + t = token + while t: + if match_atom(t, a): + return t + if t.link and t.str in ['(', '[', '<', '{']: + t = t.link + t = t.next return None class MatchResult: