JSDOC/ScopeParser.js
[gnome.introspection-doc-generator] / JSDOC / ScopeParser.js
index 07014c7..c8ed336 100644 (file)
@@ -223,7 +223,10 @@ ScopeParser.prototype = {
         
         var isObjectLitAr = [ false ];
         var isInObjectLitAr;
-        this.scopes.push(scope);
+        if (scope) {
+            this.scopes.push(scope);
+        }
+        
        
         //var scopeIndent = ''; 
         //this.scopes.forEach(function() {
@@ -253,7 +256,7 @@ ScopeParser.prototype = {
                     while (true) {
                         token = this.ts.nextTok();
                         //!this.debug|| print( token.toString());
-                        print('SCOPE-VAR:' + token.toString());
+                        print('SCOPE-VAR-VAL:' + token.toString());
                         if (!token) { // can return false at EOF!
                             break;
                         }
@@ -730,7 +733,7 @@ ScopeParser.prototype = {
                                 this.globalScope.declareIdentifier(symbol, token);
                                 this.warn("Found an undeclared symbol: " + symbol + ' (line:' + token.line + ')', true);
                             } else {
-                                println("undeclared:" + symbol)
+                                print("undeclared:" + token.toString())
                             }