PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/tags/jsdoc_toolkit-2.0.1/jsdoc-toolkit/app/plugins/tagParamConfig.js

http://jsdoc-toolkit.googlecode.com/
JavaScript | 31 lines | 29 code | 1 blank | 1 comment | 15 complexity | a02d3943642513eb2541f3212e15bd6e MD5 | raw file
 1JSDOC.PluginManager.registerPlugin(
 2	"JSDOC.tagParamConfig",
 3	{
 4		onDocCommentTags: function(comment) {
 5			var currentParam = null;
 6			var tags = comment.tags;
 7			for (var i = 0, l = tags.length; i < l; i++) {
 8				
 9				if (tags[i].title == "param") {
10					if (tags[i].name.indexOf(".") == -1) {
11						currentParam = i;
12					}
13				}
14				else if (tags[i].title == "config") {
15					tags[i].title = "param";
16					if (currentParam == null) {
17						tags[i].name = "arguments"+"."+tags[i].name;
18					}
19					else if (tags[i].name.indexOf(tags[currentParam].name+".") != 0) {
20						tags[i].name = tags[currentParam].name+"."+tags[i].name;
21					}
22					currentParam != null
23					//tags[currentParam].properties.push(tags[i]);
24				}
25				else {
26					currentParam = null;
27				}
28			}
29		}
30	}
31);