projects
/
gnome.introspection-doc-generator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3fb2979
)
JSDOC/DocComment.js
author
Alan Knowles
<alan@akkbhome.com>
Tue, 20 Jul 2010 22:54:34 +0000
(06:54 +0800)
committer
Alan Knowles
<alan@akkbhome.com>
Tue, 20 Jul 2010 22:54:34 +0000
(06:54 +0800)
JSDOC/DocComment.js
patch
|
blob
|
history
diff --git
a/JSDOC/DocComment.js
b/JSDOC/DocComment.js
index
4332fff
..
08fcd48
100644
(file)
--- a/
JSDOC/DocComment.js
+++ b/
JSDOC/DocComment.js
@@
-37,23
+37,21
@@
DocComment = XObject.define(
*/
toObject :function(t)
{
*/
toObject :function(t)
{
-
- var ret = { };
- for (var i in this) {
- switch (typeof(this[i])) {
- case 'function':
- case 'object':
- continue;
-
- case 'string':
- case 'number':
- case 'boolean':
- ret[i] = this[i]; continue;
- default:
- print("unknown type:" + typeof(this[i]));
- Seed.quit();
- }
+ function array2object(a , m)
+ {
+ m = m || false;
+ var r = [];
+ a.forEach(function(e) {
+ r.push(m ? e : e.toObject());
+ })
}
}
+ var ret = { };
+ var _this = this;
+ ['isUserComment','src', 'meta', 'tags'].forEach(function(k) {
+ ret[k] = _this[k];
+ })
+ ret.tags = array2object(this.tags,true);
+
return ret;
},
/**
return ret;
},
/**