JSDOC/TokenStream.js
[gnome.introspection-doc-generator] / JSDOC / TokenStream.js
index 5cead7a..7cc58a8 100644 (file)
@@ -137,8 +137,10 @@ TokenStream = XObject.define(
         },
 
         /**
-            @type JSDOC.Token|JSDOC.Token[]| null!
-        */
+         *  @return {Token|null}
+         */
+            
+           
         next : function(/**Number*/howMany) {
             if (typeof howMany == "undefined") howMany = 1;
             if (howMany < 1) return null;
@@ -256,11 +258,14 @@ TokenStream = XObject.define(
             })
             return ret.join('');
         },
-        dump: function()
+        dump: function(start, end)
         {
-            this.tokens.forEach(function(t) {
-                print(t.toString());
-            });
+            start = Math.max(start || 0, 0);
+            end = Math.min(end || this.tokens.length, this.tokens.length);
+            for (var i =start;i < end; i++) {
+                out += this.tokens[i].toString();
+            };
+            print(out);
         }
 });
     
\ No newline at end of file