From: Alan Knowles Date: Wed, 23 Nov 2011 05:13:45 +0000 (+0800) Subject: sync X-Git-Url: http://git.roojs.org/?p=app.jsdoc;a=commitdiff_plain;h=3e987c2828a09970e90f69cdeb74050e7c3a6ae8 sync --- diff --git a/JSDOC/DocComment.js b/JSDOC/DocComment.js index 66be7cf..97af318 100644 --- a/JSDOC/DocComment.js +++ b/JSDOC/DocComment.js @@ -194,10 +194,7 @@ DocComment = XObject.define( }); -/// static methods.. -/** - * @scope JSDOC - */ + XObject.extend(DocComment, { diff --git a/JSDOC/ScopeNamer.js b/JSDOC/ScopeNamer.js index e0be6a2..17d061c 100644 --- a/JSDOC/ScopeNamer.js +++ b/JSDOC/ScopeNamer.js @@ -210,7 +210,24 @@ ScopeNamer = XObject.define( if (this.lookTok(-1).data == '=' && this.lookTok(-2).is('NAME') ) { + name = this.lookTok(-2).data; + + if (!isGlobal) { + // only this.* + if (this.lookTok(-3).name == 'VAR') { + name = ''; + } + if (name.match(/^this\./) && scope.match(/\.prototype$/)) { + name = name.substring(5); + } + if (name.split('.').length > 1) { + name = ''; + } + + } + + this.walkFunctionDef(scope, name, this.lookTok(1).args, this.lookTok(2).items, this.lookTok(-2)); continue; } @@ -252,12 +269,19 @@ ScopeNamer = XObject.define( // only register names of objects if var name = this.lookTok(-2).data; - if (isGlobal) { - print ("GLOBAL: ") + // some a = {} can be hidden + // using @type {string} for example. + // FIXME - they should be registered as a property... + if (jd && jd.jsdoc && jd.jsdoc.getTag('type').length) { + + name = false; + } + + - } else { + if (!isGlobal) { // not global. if (isVar) { name = false; diff --git a/JsTemplate/Link.js b/JsTemplate/Link.js index b450d5e..b3cc46d 100644 --- a/JsTemplate/Link.js +++ b/JsTemplate/Link.js @@ -236,7 +236,9 @@ Link.symbolNameToLinkName = function(symbol) { return Link.hashPrefix+linker+symbol.name; } - +/** + * @type {Object} + */ Link.builtins = { 'Object' : 'http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object', 'Object...' : 'http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object',