Skip to content

Commit e4d18aa

Browse files
committed
Simplify now there's only exact_only
1 parent 420d705 commit e4d18aa

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

Tools/clinic/libclinic/dsl_parser.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -470,16 +470,12 @@ def at_staticmethod(self) -> None:
470470
def at_vectorcall(self, *args: str) -> None:
471471
if self.vectorcall is not None:
472472
fail("Called @vectorcall twice!")
473-
exact_only = False
474-
for arg in args:
475-
if '=' in arg:
476-
key = arg.split('=', 1)[0]
477-
else:
478-
key = arg
479-
if key == 'exact_only':
480-
exact_only = True
481-
else:
482-
fail(f"@vectorcall: unknown argument {key!r}")
473+
flags = list(args)
474+
exact_only = 'exact_only' in flags
475+
if exact_only:
476+
flags.remove('exact_only')
477+
if flags:
478+
fail(f"@vectorcall: unknown argument {flags[0]!r}")
483479
self.vectorcall = VectorcallOptions(exact_only=exact_only)
484480

485481
def at_coexist(self) -> None:

0 commit comments

Comments
 (0)