if (
this.title == DocTagTitle.PARAM ||
this.title == DocTagTitle.PROPERTY ||
- this.title == DocTagTitle.CFG) { // @config is deprecated
+ this.title == DocTagTitle.CFG) { // @config is deprecated << not really?
src = this.nibbleName(src);
}
}
// if type == @cfg, and matches (|....|...)
src = src.strip();
+
+ // our code uses (Optional) - but we really want to ignore this.
+ src = /\(Optional\)/.replace(src, src.length, 0, "").strip();
+
MatchInfo mi = null;
+
+
if (this.title == DocTagTitle.CFG && /^\([^)]+\)/.match_all(src, 0, out mi )) {
var ms = mi.fetch(0);
if (ms.contains("|")) {
var ar = ms.split("|");
for (var i =0 ; i < ar.length;i++) {
- optvalues.add(ar[i].strip());
+ GLib.debug("Add optvalue: %s",ar[i].strip());
+ this.optvalues.add(ar[i].strip());
}
src = src.substring(ms.length, src.length - ms.length);
-
+ GLib.debug("SRC NOW: %s",src);
}
}
-
-
+ if (this.title == DocTagTitle.CFG && /\[required\]/.match(src)) {
+ this.isOptional = false;
+ src = /\[required\]/.replace(src, src.length, 0, "").strip();
+ }
this.desc = src; // whatever is left
// example tags need to have whitespace preserved