Skip to content

Commit

Permalink
fix WHEN handling
Browse files Browse the repository at this point in the history
  • Loading branch information
inazar committed Apr 26, 2012
1 parent 0f36950 commit efbe31b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions bin/yuidoc_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,14 +737,16 @@ def parseModule(tokenMap):

if not EVENTS in c: c[EVENTS] = {}

if event in c[EVENTS] and c[EVENTS][event][WHEN] == when:
key = event + " <" + when + ">" if when else event

if key in c[EVENTS]:
log.warn("event '%s' <%s> was emited more than once" %(event, when))
else:
c[EVENTS][event] = parseParams(tokenMap, { WHEN: when })
c[EVENTS][event] = parseReturn(tokenMap, c[EVENTS][event])
c[EVENTS][event] = parseThrows(tokenMap, c[EVENTS][event])
c[EVENTS][key] = parseParams(tokenMap, { WHEN: when })
c[EVENTS][key] = parseReturn(tokenMap, c[EVENTS][key])
c[EVENTS][key] = parseThrows(tokenMap, c[EVENTS][key])

target = c[EVENTS][event]
target = c[EVENTS][key]

if self.currentMethod:
c[METHODS][self.currentMethod][EMITS].append({ WHEN: when, NAME: event, DESCRIPTION: description })
Expand Down

0 comments on commit efbe31b

Please sign in to comment.