X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JSDOC%2FDocTag.js;h=b7f25ca4ebbc9b6a7f7cf34147ba718749e5d516;hp=6b69d44c0236b56f8e74e555c7a08c7515e5da9b;hb=HEAD;hpb=31648bbea973fdc4cf3ca0145ecd7a399cfce4e5 diff --git a/JSDOC/DocTag.js b/JSDOC/DocTag.js index 6b69d44..b7f25ca 100644 --- a/JSDOC/DocTag.js +++ b/JSDOC/DocTag.js @@ -48,6 +48,11 @@ DocTag = XObject.define( var ret = { '*object' : 'DocTag' }; for (var i in this) { + if (i == 'optvalues') { + ret[i] = this.optvalues; + continue; + } + switch (typeof(this[i])) { case 'function': continue; @@ -57,10 +62,13 @@ DocTag = XObject.define( case 'number': case 'boolean': ret[i] = this[i]; continue; + + + default: print("unknown type: (" + i + ")" + typeof(this[i])); - this.toJSON = null;q + this.toJSON = null; print(JSON.stringify(this));; Seed.quit(); } @@ -102,7 +110,7 @@ DocTag = XObject.define( var m = src.match(/^\(([^)]+)\)/); print(m); if (m[1].match(/\|/)) { - var opts = m[1].split(/\|/); + var opts = m[1].trim().split(/\s*\|\s*/); this.optvalues = opts; src = src.substring(m[0].length).trim(); print(src);