projects
/
gnome.introspection-doc-generator
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JSDOC/TokenStream.vala
[gnome.introspection-doc-generator]
/
JSDOC
/
Symbol.js
diff --git
a/JSDOC/Symbol.js
b/JSDOC/Symbol.js
index
fabcea9
..
7385547
100644
(file)
--- a/
JSDOC/Symbol.js
+++ b/
JSDOC/Symbol.js
@@
-26,17
+26,17
@@
Symbol = XObject.define(
$args : [], // original arguments used when constructing.
addOn : "",
alias : "",
$args : [], // original arguments used when constructing.
addOn : "",
alias : "",
- augments :
false, // Doctag
+ augments :
[], // Doctag[]
author : "",
classDesc : "",
comment : {},
deprecated : "",
desc : "",
author : "",
classDesc : "",
comment : {},
deprecated : "",
desc : "",
-
events : []
,
+
//events : false
,
example : "",
example : "",
- exceptions : [],
- inherits : [],
- inheritsFrom : [],
+ exceptions : [],
// Doctag[]
+ inherits : [],
// Doctag[]
+
//
inheritsFrom : [],
isa : "OBJECT", // OBJECT//FUNCTION
isEvent : false,
isConstant : false,
isa : "OBJECT", // OBJECT//FUNCTION
isEvent : false,
isConstant : false,
@@
-46,13
+46,13
@@
Symbol = XObject.define(
isPrivate : false,
isStatic : false,
memberOf : "",
isPrivate : false,
isStatic : false,
memberOf : "",
- methods : [],
+ methods : [],
// Symbol[]
_name : "",
_name : "",
- _params : [],
- properties : [],
- requires : [],
- returns : [],
- see : [],
+ _params : [],
//Doctag[]
+ properties : [],
//Doctag[]
+ requires : [],
//Doctag[]
+ returns : [],
//Doctag[]
+ see : [],
//Doctag[]
since : "",
srcFile : {},
type : "",
since : "",
srcFile : {},
type : "",
@@
-63,19
+63,11
@@
Symbol = XObject.define(
- to
Object
: function()
+ to
JSON
: function()
{
{
- function array2object(a , m)
- {
- m = m || false;
- var r = [];
- a.forEach(function(e) {
- r.push(m ? e : e.toObject());
- })
- }
-
- var ret = { };
+
+ var ret = { '*object' : 'Symbol' };
for (var i in this) {
if (Symbol.hide.indexOf(i) > -1) {
continue;
for (var i in this) {
if (Symbol.hide.indexOf(i) > -1) {
continue;
@@
-87,15
+79,25
@@
Symbol = XObject.define(
switch(i) {
//arrays..
case 'params' :
switch(i) {
//arrays..
case 'params' :
- ret[i] = array2object(this[i],true);
- continue;
-
- //objects..
- case 'augments' :
- print(JSON.stringify(this[i]));
- ret[i] = this[i].toObject();
+ case 'augments' :
+ case 'exceptions' :
+ case 'inherits' :
+ case 'methods' :
+ case '_params':
+ case 'properties':
+ case 'requires':
+ case 'returns':
+ case 'see':
+ case 'cfgs': // key val of doctags..
+ case 'comment' :
+ ret[i] = this[i]
+ continue;
+
+ //skip
+ case 'inheritsFrom':
+ case 'childClasses':
continue;
continue;
-
+
default:
print("object? :" + i);
Seed.quit();
default:
print("object? :" + i);
Seed.quit();
@@
-104,13
+106,16
@@
Symbol = XObject.define(
case 'string':
case 'number':
case 'string':
case 'number':
+ case 'boolean':
ret[i] = this[i]; continue;
default:
ret[i] = this[i]; continue;
default:
+
print("unknown type:" + typeof(this[i]));
print("unknown type:" + typeof(this[i]));
+ print(JSON.stringify(this));
Seed.quit();
}
}
Seed.quit();
}
}
-
+ return ret;
},
},
@@
-120,10
+125,10
@@
Symbol = XObject.define(
this.params = [];
this.$args = [];
this.params = [];
this.$args = [];
- this.events = [];
+
//
this.events = [];
this.exceptions = [];
this.inherits = [];
this.exceptions = [];
this.inherits = [];
- this.inheritsFrom = [];
+ //
this.isa = "OBJECT"; // OBJECT//FUNCTION
this.methods = [];
this._params = [];
this.isa = "OBJECT"; // OBJECT//FUNCTION
this.methods = [];
this._params = [];
@@
-132,8
+137,12
@@
Symbol = XObject.define(
this.returns = [];
this.see = [];
this.srcFile = {};
this.returns = [];
this.see = [];
this.srcFile = {};
- this.childClasses = [];
+
+
this.cfgs = {};
this.cfgs = {};
+ // derived later?
+ this.inheritsFrom = [];
+ this.childClasses = [];
this.comment = new DocComment();
this.comment.isUserComment = false;
this.comment = new DocComment();
this.comment.isUserComment = false;
@@
-349,6
+358,7
@@
Symbol = XObject.define(
// @class
var classes = this.comment.getTag("class");
if (classes.length) {
// @class
var classes = this.comment.getTag("class");
if (classes.length) {
+ //print(JSON.stringify(this,null,4));
this.isa = "CONSTRUCTOR";
this.classDesc = classes[0].desc; // desc can't apply to the constructor as there is none.
if (!this.classDesc) {
this.isa = "CONSTRUCTOR";
this.classDesc = classes[0].desc; // desc can't apply to the constructor as there is none.
if (!this.classDesc) {
@@
-444,6
+454,7
@@
Symbol = XObject.define(
// @static
if (this.comment.getTag("singleton").length) {
this.isStatic = true;
// @static
if (this.comment.getTag("singleton").length) {
this.isStatic = true;
+ //print('------------- got singleton ---------------' + this.isa);
//if (this.isa == "CONSTRUCTOR") {
// this.isNamespace = true;
//}
//if (this.isa == "CONSTRUCTOR") {
// this.isNamespace = true;
//}
@@
-656,6
+667,11
@@
Symbol = XObject.define(
if (memberOfs.length) {
this.memberOf = memberOfs[0].desc;
this.memberOf = this.memberOf.replace(/\.prototype\.?/g, "#");
if (memberOfs.length) {
this.memberOf = memberOfs[0].desc;
this.memberOf = this.memberOf.replace(/\.prototype\.?/g, "#");
+ this.name = this.name.split('.').pop();
+ this.name = this.name.split('#').pop();
+ this.name = this.memberOf + this.name;
+ this._name = this.name
+ this.alias = this.name;
}
/*~t
}
/*~t
@@
-813,4
+829,4
@@
Symbol.fromDump = function(t)
ns[i] = t[i];
}
return ns;
ns[i] = t[i];
}
return ns;
-}
\ No newline at end of file
+}