JSDOC/ScopeNamer.js
authorAlan Knowles <alan@akbkhome.com>
Tue, 8 Nov 2011 14:49:31 +0000 (22:49 +0800)
committerAlan Knowles <alan@akbkhome.com>
Tue, 8 Nov 2011 14:49:31 +0000 (22:49 +0800)
JSDOC/ScopeNamer.js

index c639183..3cea464 100644 (file)
@@ -227,7 +227,7 @@ ScopeNamer = XObject.define(
         
         walkStatements: function(scope, statements)
         {
-            print("walkStatements :" + scope + '@' + this.token.line) ;            
+            print("walkStatements :" + scope + '@' + this.lookTok(0).line) ;            
             var _this = this;
             var res = false;
             
@@ -243,9 +243,9 @@ ScopeNamer = XObject.define(
         
         walkStatement: function(scope, stmt)
         {
-            print("walkStatement :" + scope + '@' + this.token.line );
             this.tokens = stmt;
             this.rewind();
+            print("walkStatement :" + scope + '@' + this.lookTok(0).line );
              
             var name;
             var sn;
@@ -327,7 +327,7 @@ ScopeNamer = XObject.define(
         
         walkFunctionDef : function (inscope, name, args, stmts, jsdocTok)
         {
-            print("wallkFuncDef: " + inscope + '@' + this.token.line );
+            print("wallkFuncDef: " + inscope + '@' + this.lookTok(0).line );
             var scope = inscope + '.' + name;
             
             
@@ -343,7 +343,7 @@ ScopeNamer = XObject.define(
         
         walkCall : function (inscope, assign, callname, items, jsdocTok)
         {
-            print("wallkCall : " + inscope + '@' + this.token.line );
+            print("wallkCall : " + inscope + '@' + this.lookTok(0).line );
             var scope = inscope + ( assign ? ('.' + assign) : '' );
             scope = scope.replace(/\^$global\$\./, '');