From: Alan Knowles Date: Mon, 11 May 2015 10:35:58 +0000 (+0800) Subject: JSDOC/DocTag.js X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=commitdiff_plain;h=3f07126a2865cc0b0f7fa383438ed74406085bf5 JSDOC/DocTag.js --- diff --git a/JSDOC/DocTag.js b/JSDOC/DocTag.js index 692d1f4..4ac2783 100644 --- a/JSDOC/DocTag.js +++ b/JSDOC/DocTag.js @@ -26,6 +26,7 @@ DocTag = XObject.define( this.isOptional = false; this.defaultValue = ""; this.desc = ""; + this.optvalues = false; if (typeof src != "undefined") { this.parse(src); } @@ -90,6 +91,22 @@ DocTag = XObject.define( if (Options.LOG) Options.LOG.warn(e); else throw e; } + + // if type == @cfg, and matches (|....|...) + + src = str.trim(); + if (this.title == "cfg" && src.match(/^\([^)]+\)/)) { + var m = src.match(/^\(([^)]+)\)/); + if (m[1].match(/\|/)) { + var opts = m[1].split(/\|/); + this.optvalues = opts; + + } + + + } + + this.desc = src; // whatever is left // example tags need to have whitespace preserved