Add ** to match until in addons (#4353)
This commit is contained in:
parent
38c7d0a5f8
commit
a8c1cdca57
|
@ -1382,9 +1382,18 @@ def match_atom(token, p):
|
||||||
if t:
|
if t:
|
||||||
return t
|
return t
|
||||||
elif p.startswith('!!'):
|
elif p.startswith('!!'):
|
||||||
t = match_atom(token, p[1:])
|
t = match_atom(token, p[2:])
|
||||||
if not t:
|
if not t:
|
||||||
return token
|
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
|
return None
|
||||||
|
|
||||||
class MatchResult:
|
class MatchResult:
|
||||||
|
|
Loading…
Reference in New Issue