JSDOC/DocTag.js
authorAlan Knowles <alan@roojs.com>
Mon, 11 May 2015 10:35:58 +0000 (18:35 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 11 May 2015 10:35:58 +0000 (18:35 +0800)
JSDOC/DocTag.js

index 692d1f4..4ac2783 100644 (file)
@@ -26,6 +26,7 @@ DocTag = XObject.define(
         this.isOptional   = false;
         this.defaultValue = "";
         this.desc         = "";
         this.isOptional   = false;
         this.defaultValue = "";
         this.desc         = "";
+        this.optvalues    = false;
         if (typeof src != "undefined") {
             this.parse(src);
         }
         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 (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
             this.desc = src; // whatever is left
             
             // example tags need to have whitespace preserved