JSDOC/TokenStream.vala
authorAlan Knowles <alan@roojs.com>
Wed, 30 Sep 2015 09:57:08 +0000 (17:57 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 30 Sep 2015 09:57:08 +0000 (17:57 +0800)
JSDOC/TokenStream.vala

index ae64eda..7b78253 100644 (file)
@@ -144,7 +144,7 @@ namespace JSDOC {
             */
                
               
-           public Token next(uint howMany) {
+           public Token? next(uint howMany) {
                        
                //if (typeof howMany == "undefined") howMany = 1;
                // if (howMany < 1) { return  null;                     }
@@ -152,7 +152,7 @@ namespace JSDOC {
                var got = new Gee.ArrayList<Token>();
 
                for (var i = 1; i <= howMany; i++) {
-                   if (this.cursor+i >= this.tokens.length) {
+                   if (this.cursor+i >= this.tokens.size) {
                        return null;
                    }
                    got.push(this.tokens[this.cursor+i]);