PageRenderTime 32ms CodeModel.GetById 22ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/tags/jsdoc_toolkit-2.4.0/jsdoc-toolkit/app/plugins/tagSynonyms.js

http://jsdoc-toolkit.googlecode.com/
JavaScript | 43 lines | 41 code | 2 blank | 0 comment | 2 complexity | cd8a1c7903eb5a0b0ce5f2e3f63fbef0 MD5 | raw file
 1JSDOC.PluginManager.registerPlugin(
 2	"JSDOC.tagSynonyms",
 3	{
 4		onDocCommentSrc: function(comment) {
 5			comment.src = comment.src.replace(/@methodOf\b/i, "@function\n@memberOf");
 6			comment.src = comment.src.replace(/@fieldOf\b/i, "@field\n@memberOf");
 7		},
 8		
 9		onDocCommentTags: function(comment) {
10			for (var i = 0, l = comment.tags.length; i < l; i++) {
11				var title = comment.tags[i].title.toLowerCase();
12				var syn;
13				if ((syn = JSDOC.tagSynonyms.synonyms["="+title])) {
14					comment.tags[i].title = syn;
15				}
16			}
17		}
18	}
19);
20
21new Namespace(
22	"JSDOC.tagSynonyms",
23	function() {
24		JSDOC.tagSynonyms.synonyms = {
25			"=member":             "memberOf",
26			"=memberof":           "memberOf",
27			"=description":        "desc",
28			"=exception":          "throws",
29			"=argument":           "param",
30			"=returns":            "return",
31			"=classdescription":   "class",
32			"=fileoverview":       "overview",
33			"=extends":            "augments",
34			"=base":               "augments",
35			"=projectdescription": "overview",
36			"=classdescription":   "class",
37			"=link":               "see",
38			"=borrows":            "inherits",
39			"=scope":              "lends",
40			"=construct":          "constructor"
41		}
42	}
43);