autotest: parse enums of the form FOO = BAR(x)

This commit is contained in:
Andy Piper 2023-06-09 10:09:52 +01:00 committed by Andrew Tridgell
parent ec1edea1da
commit fb5a92ee53

View File

@ -72,6 +72,11 @@ class EnumDocco(object):
# Match: " FRED = 17, // optional comment"
m = re.match("\s*([A-Z0-9_a-z]+) *= *(\w+) *,?(?: *// *(.*) *)?$",
line)
if m is not None:
return (None, None, None)
# Match: " FRED = FOO(17), // optional comment"
m = re.match("\s*([A-Z0-9_a-z]+) *= *(\w+) *\\( *(\w+) *\\) *,?(?: *// *(.*) *)?$",
line)
if m is not None:
return (None, None, None)