isOptional : false,
defaultValue : '',
desc : '',
- /* qdump needed for cahcing?
- toQDump :function(t)
+ /**
+ * serialize..
+ */
+ toObject :function(t)
{
- return JSDOC.toQDump(t, 'JSDOC.DocTag.fromDump({', '})', new JSDOC.DocTag());
- } ,
- */
+ var ret = { _object : 'DocTag' };
+
+ for (var i in this) {
+ switch (typeof(this[i])) {
+ case 'function':
+ continue;
+ continue;
+
+ case 'string':
+ case 'number':
+ case 'boolean':
+ ret[i] = this[i]; continue;
+ default:
+ print("unknown type:" + typeof(this[i]));
+ Seed.quit();
+ }
+ }
+ return ret;
+ },
+
/**
if (typeof src != "string") throw "src must be a string not "+(typeof src);
if (src.match(/^\s*\{/)) {
- var typeRange = src.balance("{", "}");
+ var typeRange = this.balance(src,"{", "}");
if (typeRange[1] == -1) {
throw "Malformed comment tag ignored. Tag type requires an opening { and a closing }: "+src;
}
// is optional?
if (src.charAt(0) == "[") {
- var nameRange = src.balance("[", "]");
+ var nameRange = this.balance(src,"[", "]");
if (nameRange[1] == -1) {
throw "Malformed comment tag ignored. Tag optional name requires an opening [ and a closing ]: "+src;
}
}
return src;
- }
+ },
balance : function(str, open, close) {
var i = 0;