diff options
author | Rogan Creswick <creswick@galois.com> | 2012-03-30 17:07:02 -0700 |
---|---|---|
committer | Rogan Creswick <creswick@galois.com> | 2012-03-30 17:07:02 -0700 |
commit | f6ab6622aab00fe7c2f4c3dc41f786ebbe0f0d73 (patch) | |
tree | 870111038542cd27153e1396ebdc063573249689 /tools/jsdoc-toolkit-2.4.0/app/plugins/tagParamConfig.js |
initial revision
Diffstat (limited to 'tools/jsdoc-toolkit-2.4.0/app/plugins/tagParamConfig.js')
-rw-r--r-- | tools/jsdoc-toolkit-2.4.0/app/plugins/tagParamConfig.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/jsdoc-toolkit-2.4.0/app/plugins/tagParamConfig.js b/tools/jsdoc-toolkit-2.4.0/app/plugins/tagParamConfig.js new file mode 100644 index 0000000..3ea8a1b --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/app/plugins/tagParamConfig.js @@ -0,0 +1,31 @@ +JSDOC.PluginManager.registerPlugin( + "JSDOC.tagParamConfig", + { + onDocCommentTags: function(comment) { + var currentParam = null; + var tags = comment.tags; + for (var i = 0, l = tags.length; i < l; i++) { + + if (tags[i].title == "param") { + if (tags[i].name.indexOf(".") == -1) { + currentParam = i; + } + } + else if (tags[i].title == "config") { + tags[i].title = "param"; + if (currentParam == null) { + tags[i].name = "arguments"+"."+tags[i].name; + } + else if (tags[i].name.indexOf(tags[currentParam].name+".") != 0) { + tags[i].name = tags[currentParam].name+"."+tags[i].name; + } + currentParam != null + //tags[currentParam].properties.push(tags[i]); + } + else { + currentParam = null; + } + } + } + } +); |