X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FScopeParser.js;h=a7abc9c54784d1cfd7e7ea1ebe9f5bc7e0a823b1;hb=832edf57cab75465f624fb5b1503a683a04ad972;hp=333a7f78f2b894df4cc32a47b9dc336cc0e9bc40;hpb=fbd039402e2ec47410eb1e2cb388b9d8321d30f6;p=gnome.introspection-doc-generator
diff --git a/JSDOC/ScopeParser.js b/JSDOC/ScopeParser.js
index 333a7f7..a7abc9c 100644
--- a/JSDOC/ScopeParser.js
+++ b/JSDOC/ScopeParser.js
@@ -224,7 +224,7 @@ ScopeParser.prototype = {
var isObjectLitAr = [ false ];
var isInObjectLitAr;
thisScope = scope;
- if (thisScope) {
+ if (thisScope && thisScope.gid != this.scopes[this.scopes.length-1]) {
this.scopes.push(scope);
} else {
thisScope = this.scopes[this.scopes.length-1]
@@ -426,7 +426,7 @@ ScopeParser.prototype = {
case "STRN.DOUBLE_QUOTE": // used for object lit detection..
case "STRN.SINGLE_QUOTE":
- print('SCOPE-STRING:' + token.toString());
+ // print('SCOPE-STRING:' + token.toString());
//println(""+token.data+"");
if (this.ts.lookTok(-1).data == '{' && this.ts.lookTok(1).data == ':') {
@@ -461,22 +461,7 @@ ScopeParser.prototype = {
// got identifier..
// look for { ** : <- indicates obj literal.. ** this could occur with numbers ..
- if ((this.ts.lookTok(-1).data == "{") && (this.ts.lookTok(1).data == ":")) {
- isObjectLitAr.pop();
- isObjectLitAr.push(true);
- //print(">>>>>> OBJLIT REPUSH(true)");
- //println(""+token.data+"");
- break;
- }
- // print("DEAL WITH obj lit:");
- isInObjectLitAr = isObjectLitAr[isObjectLitAr.length-1];
-
- if (isInObjectLitAr && (this.ts.lookTok(1).data == ":") && (this.ts.lookTok(-1).data == ",")) {
- // skip, it's an object lit key..
- //println(""+token.data+"");
- break;
- }
-
+
// skip anyting with "." before it..!!
@@ -488,6 +473,9 @@ ScopeParser.prototype = {
//print("SYMBOL: " + token.toString());
symbol = token.data;
+ if (symbol == 'this') {
+ break;
+ }
if (this.mode == 'PASS2_SYMBOL_TREE') {
//println("GOT IDENT: -2 : " + this.ts.lookT(-2).toString() + "
..... -1 : " + this.ts.lookT(-1).toString() + "
");
@@ -523,7 +511,7 @@ ScopeParser.prototype = {
if (token.type != 'KEYW') {
break;
}
- print('SCOPE-KEYW:' + token.toString());
+ //print('SCOPE-KEYW:' + token.toString());
// print("Check eval:");
symbol = token.data;
@@ -568,7 +556,7 @@ ScopeParser.prototype = {
//if (this.ts.nextT()) break;
}
- print("<<< EXIT SCOPE");
+ //print("<<< EXIT SCOPE");
//print("<<<<<<