Browse files

tweak

  • Loading branch information...
1 parent 0eff677 commit a33c3a8f213bf2065c16715eec077511c9a6f6fd Adam Moore committed Sep 8, 2008
Showing with 14 additions and 6 deletions.
  1. +14 −6 bin/yuidoc_parse.py
View
20 bin/yuidoc_parse.py
@@ -282,10 +282,14 @@ def parseParams(tokenMap, dict, srctag=const.PARAM, desttag=const.PARAMS):
match = self.compound_pat.match(i)
- if match.group(4):
- type, description = "", match.group(4) + match.group(5)
+ if match and match.group(1):
+ if match.group(4):
+ type, description = "", match.group(4) + match.group(5)
+ else:
+ type, description = match.group(2), (match.group(1) + match.group(3)).strip()
else:
- type, description = match.group(2), (match.group(1) + match.group(3)).strip()
+ type, description = "", ""
+
except:
log.error("\nError, a parameter could not be parsed:\n\n %s\n\n %s\n" %(i, pprint.pformat(tokenMap)))
@@ -314,10 +318,14 @@ def parseReturn(tokenMap, dict):
match = self.compound_pat.match(ret)
- if match.group(4):
- type, description = "", match.group(4) + match.group(5)
+ if match and match.group(1):
+ if match.group(4):
+ type, description = "", match.group(4) + match.group(5)
+ else:
+ type, description = match.group(2), (match.group(1) + match.group(3)).strip()
else:
- type, description = match.group(2), (match.group(1) + match.group(3)).strip()
+ type, description = "", ""
+
except:
log.error("\nError, a return statement could not be parsed:\n\n %s\n\n %s\n" %(ret, pprint.pformat(tokenMap)))
sys.exit()

0 comments on commit a33c3a8

Please sign in to comment.