//<Script type="text/javascript">
-XObject = imports.XObject.XObject;
+const XObject = imports.XObject.XObject;
-DocTag = imports.DocTag.DocTag;
+const DocTag = imports.DocTag.DocTag;
/**
* Create a new DocComment. This takes a raw documentation comment,
*/
-DocComment = XObject.define(
+const DocComment = XObject.define(
function(/**String*/comment) {
this.isUserComment = true;
},
Object, // extends
{
- this.isUserComment = true;
- this.src = "";
- this.meta = "";
- this.tagTexts = [];
- this.tags = [];
+ isUserComment : true,
+ src : "",
+ meta : "",
+ tagTexts : [],
+ tags : [],
/**
* serialize..
*/
- toObject :function(t)
+ toJSON :function(t)
{
- function array2object(a)
- {
- var r = [];
- a.forEach(function(e) {
- r.push(e.toObject());
- })
- }
- var ret = { };
+
+ var ret = { '*object' : 'DocComment' };
+
var _this = this;
['isUserComment','src', 'meta', 'tags'].forEach(function(k) {
ret[k] = _this[k];
})
- ret.tags = array2object(this.tags,true);
return ret;
},