Commit 35db7bbb authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Use a regexp iterator (nice concept!) to separate the arguments

and add support for argument qualifiers in {...}
parent 34b365c5
......@@ -185,16 +185,13 @@ while True:
args = list()
while True:
l = partition(l, ",")
t = l[0].strip()
if t not in ctypes:
for i in re.finditer("([A-Z_]+)\s*({[^}]+})?(,|$)", l):
at = i.group(1)
tq = i.group(2)
if at not in ctypes:
raise Exception(
"Argument type '%s' not a valid type" % t)
args.append(t)
l = l[2]
if l == "":
break
"Argument type '%s' not a valid type" % at)
args.append(at)
do_func(fname, rt_type, args)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment