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: ...@@ -185,16 +185,13 @@ while True:
args = list() args = list()
while True: for i in re.finditer("([A-Z_]+)\s*({[^}]+})?(,|$)", l):
l = partition(l, ",") at = i.group(1)
t = l[0].strip() tq = i.group(2)
if t not in ctypes: if at not in ctypes:
raise Exception( raise Exception(
"Argument type '%s' not a valid type" % t) "Argument type '%s' not a valid type" % at)
args.append(t) args.append(at)
l = l[2]
if l == "":
break
do_func(fname, rt_type, args) 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