Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix WHEN handling

  • Loading branch information...
commit efbe31b62a2a01028ce06f11546a293d8cf15325 1 parent 0f36950
@inazar authored
Showing with 7 additions and 5 deletions.
  1. +7 −5 bin/yuidoc_parse.py
View
12 bin/yuidoc_parse.py
@@ -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 })
Please sign in to comment.
Something went wrong with that request. Please try again.