Improve function arguments parsing and checking

* always use "argN" names for unnamed arguments
* honor space symbol between typename and "*", "&" symbols
* fix indent errors
This commit is contained in:
Andrey Kamaev
2012-11-12 14:42:28 +04:00
parent 5f41971305
commit aabbe11e64
3 changed files with 41 additions and 35 deletions

View File

@@ -337,10 +337,10 @@ class CppHeaderParser(object):
atype = arg[:pos+1].strip()
if aname.endswith("&") or aname.endswith("*") or (aname in ["int", "string", "Mat"]):
atype = (atype + " " + aname).strip()
aname = "param"
aname = ""
else:
atype = arg
aname = "param"
aname = ""
if aname.endswith("]"):
bidx = aname.find('[')
atype += aname[bidx:]