JSDOC/TokenReader.vala
authorAlan Knowles <alan@roojs.com>
Thu, 10 Sep 2015 10:35:48 +0000 (18:35 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 10 Sep 2015 10:35:48 +0000 (18:35 +0800)
JSDOC/TokenReader.vala

index 7d6f88e..191b7a8 100644 (file)
@@ -90,12 +90,9 @@ namespace JSDOC {
             var tokens = new TokenArray();
            
             bool eof;
-            while (true) {
+            while (!stream.lookEOF()) {
+                
                 
-                stream.look(0, out eof) 
-                if (eof) {
-                    break;
-                }
                 if (this.read_mlcomment(stream, tokens)) continue;
                 if (this.read_slcomment(stream, tokens)) continue;
                 if (this.read_dbquote(stream, tokens))   continue;
@@ -174,7 +171,7 @@ namespace JSDOC {
         /**
             @returns {Boolean} Was the token found?
          */
-        read_word : function(/**JSDOC.TokenStream*/stream, tokens) {
+        public bool read_word (TokenStream stream, TokenArray tokens) {
             var found = "";
             while (!stream.look().eof && Lang.isWordChar(stream.look())) {
                 found += stream.next();