Bug 1754930 - Understand mozilla::Maybe in masm declarations. r=nbp

Basically, argument types must allow for templated types and optional
args must recognize at least `mozilla::Nothing()`.  It's a bit hacky but
it seems like a useful extension that won't destroy anything, and I
need this.

Differential Revision: https://phabricator.services.mozilla.com/D138526
This commit is contained in:
Lars T Hansen 2022-02-15 07:03:29 +00:00
parent 0ce54a83db
commit 16bd16b49d

View file

@ -34,9 +34,9 @@ all_architecture_names = set(["x86", "x64", "arm", "arm64"])
all_shared_architecture_names = set(["x86_shared", "arm", "arm64"])
reBeforeArg = "(?<=[(,\s])"
reArgType = "(?P<type>[\w\s:*&]+)"
reArgType = "(?P<type>[\w\s:*&<>]+)"
reArgName = "(?P<name>\s\w+)"
reArgDefault = "(?P<default>(?:\s=[^,)]+)?)"
reArgDefault = "(?P<default>(?:\s=(?:(?:\s[\w:]+\(\))|[^,)]+))?)"
reAfterArg = "(?=[,)])"
reMatchArg = re.compile(reBeforeArg + reArgType + reArgName + reArgDefault + reAfterArg)