Skip to content

Commit

Permalink
multiple module def
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Moore committed Jul 21, 2008
1 parent b732162 commit 77a895b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions bin/yuidoc_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ def parseReturn(tokenMap, dict):
return dict

def defineClass(name):
log.info("\nDefine Class: " + name + ", " + self.currentModule)
if self.currentNamespace:
shortName, longName = self.getClassName(name, self.currentNamespace)
else:
Expand Down Expand Up @@ -351,6 +352,8 @@ def defineClass(name):
# can properly set up the documemtation for this block
if token == const.MODULE:
if desc:

log.info("\nModule: " + desc)
self.currentModule = desc
else:
log.warn('no name for module')
Expand Down Expand Up @@ -419,12 +422,15 @@ def defineClass(name):

def parseModule(tokenMap):

# log.info("\n\n%s:\n\n%s\n" %("tokenMap", unicode(tokenMap)))
log.info("\n\n%s:\n\n%s\n" %("tokenMap", unicode(tokenMap)))

target = None
if not const.MODULES in self.data: self.data[const.MODULES] = {}
for module in tokenMap[const.MODULE]:
self.data[const.MODULES][module] = { const.NAME: module, const.CLASS_LIST: [], const.FILE_LIST: []}

if module not in self.data[const.MODULES]:
self.data[const.MODULES][module] = { const.NAME: module, const.CLASS_LIST: [], const.FILE_LIST: []}

target = self.data[const.MODULES][module]

if const.DESCRIPTION in tokenMap:
Expand Down Expand Up @@ -461,6 +467,7 @@ def parseModule(tokenMap):
self.data[const.MODULES][self.currentModule][const.FILE_LIST].append(file_name)
else:
""" defer the module assignment until we find the token """
log.info('deferred module file: ' + file_name)
self.deferredModuleFiles.append(file_name);


Expand Down Expand Up @@ -489,6 +496,7 @@ def parseModule(tokenMap):
self.data[const.MODULES][self.currentModule][const.CLASS_LIST].append(longName)
else:
""" defer the module assignment until we find the token """
log.info('deferred module CLASS: ' + longName)
self.deferredModuleClasses.append(longName);

if self.currentFile:
Expand Down
2 changes: 1 addition & 1 deletion template/assets/ac-js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
var className=(show) ? "": "none";
var els=Dom.getElementsByClassName(type);

// console.log('showhide ' + type + ', ' + els.length);
console.log('showhide ' + type + ', ' + els.length);

for (var i=0,l=els.length;i<l;i=i+1) {
//try {
Expand Down

0 comments on commit 77a895b

Please sign in to comment.