PageRenderTime 14ms CodeModel.GetById 9ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/jsdoc_toolkit-2.4.0/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
  1. JSDOC.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. if (tags[i].title == "param") {
  9. if (tags[i].name.indexOf(".") == -1) {
  10. currentParam = i;
  11. }
  12. }
  13. else if (tags[i].title == "config") {
  14. tags[i].title = "param";
  15. if (currentParam == null) {
  16. tags[i].name = "arguments"+"."+tags[i].name;
  17. }
  18. else if (tags[i].name.indexOf(tags[currentParam].name+".") != 0) {
  19. tags[i].name = tags[currentParam].name+"."+tags[i].name;
  20. }
  21. currentParam != null
  22. //tags[currentParam].properties.push(tags[i]);
  23. }
  24. else {
  25. currentParam = null;
  26. }
  27. }
  28. }
  29. }
  30. );