X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FScopeParser.js;h=111bbc5a6edfbdddee1c98cb72dafaccc882db10;hb=0ff3cbd55bdbbd1a914eaa8ecf63ca1d372b0cb4;hp=48ad6f473a2e86ad4cb809a02443c7aacd578421;hpb=8cc0a751ed49d60b1cb3e8101a53d6314782cbf6;p=gnome.introspection-doc-generator
diff --git a/JSDOC/ScopeParser.js b/JSDOC/ScopeParser.js
index 48ad6f4..111bbc5 100644
--- a/JSDOC/ScopeParser.js
+++ b/JSDOC/ScopeParser.js
@@ -313,7 +313,8 @@ ScopeParser.prototype = {
break;
case "KEYW.FUNCTION":
- print('SCOPE-FUNC:' + JSON.stringify(token,null,4));
+ if (this.mode == 'BUILDING_SYMBOL_TREE')
+ print('SCOPE-FUNC:' + JSON.stringify(token,null,4));
//println(""+token.data+"");
var bn = this.braceNesting;
this.parseFunctionDeclaration();
@@ -328,9 +329,15 @@ ScopeParser.prototype = {
if (token.props) {
for (var prop in token.props) {
- if (token.props[prop].val.data == 'function') {
+
+
+ // print('SCOPE-PROPS:' + JSON.stringify(token.props[prop],null,4));
+ if (token.props[prop].val[0].data == 'function') {
// parse a function..
- this.parseFunctProp(token.props[prop]);
+ this.ts = new TokenStream(token.props[prop].val);
+ this.ts.nextTok();
+ this.parseFunctionDeclaration();
+
continue;
}
// key value..
@@ -616,9 +623,11 @@ ScopeParser.prototype = {
switch(token.data) {
case ';':
+ print("<< EXIT EXPRESSION");
+ break;
+
case ',':
- print("<< EXIT EXPRESSION");
break;
@@ -683,7 +692,8 @@ ScopeParser.prototype = {
break;
case 'STRN': // used for object lit detection..
- print("EXPR-STR:" + JSON.stringify(token, null, 4));
+ if (this.mode == 'BUILDING_SYMBOL_TREE')
+ print("EXPR-STR:" + JSON.stringify(token, null, 4));
if (this.ts.lookTok(-1).data == "{" && this.ts.lookTok(1).data == ":" ) {
// then we are in an object lit.. -> we need to flag the brace as such...
isObjectLitAr.pop();
@@ -712,7 +722,8 @@ ScopeParser.prototype = {
case 'NAME':
- print("EXPR-NAME:" + JSON.stringify(token, null, 4));
+ if (this.mode == 'BUILDING_SYMBOL_TREE')
+ print("EXPR-NAME:" + JSON.stringify(token, null, 4));
symbol = token.data;
//print("in NAME = " + token.toString());
//print("in NAME 0: " + this.ts.look(0).toString());
@@ -769,7 +780,8 @@ ScopeParser.prototype = {
//println("EID");
case 'KEYW':
- print("EXPR-KEYW:" + JSON.stringify(token, null, 4));
+ if (this.mode == 'BUILDING_SYMBOL_TREE')
+ print("EXPR-KEYW:" + JSON.stringify(token, null, 4));
if (token.name == "FUNCTION") {
this.parseFunctionDeclaration();
@@ -805,8 +817,9 @@ ScopeParser.prototype = {
}
break;
}
- default:
- print("EXPR-SKIP:" + JSON.stringify(token, null, 4));
+ default:
+ if (this.mode == 'BUILDING_SYMBOL_TREE')
+ print("EXPR-SKIP:" + JSON.stringify(token, null, 4));
break;
}
@@ -887,8 +900,8 @@ ScopeParser.prototype = {
fnScope = this.indexedScopes[this.ts.cursor];
}
-
- print('FUNC-PARSE:' + JSON.stringify(token,null,4));
+ if (this.mode == 'BUILDING_SYMBOL_TREE')
+ print('FUNC-PARSE:' + JSON.stringify(token,null,4));
// Parse function arguments.
var args = token.items;
for (var argpos =0; argpos < args.length; argpos++) {