JSDOC/TextStream.vala
[gnome.introspection-doc-generator] / JSDOC / TextStream.vala
index 599ed8b..229b2ca 100644 (file)
@@ -29,25 +29,32 @@ namespace JSDOC {
             this.cursor = 0;
         }
         
-        public char look(int n = 0, out bool eof)
+        public char look(int n = 0)
         {
-            eof = false;
-                
+                 
             if (this.cursor+n < 0 || this.cursor+n >= this.text.length) {
-                eof = true;
                 return '\0';
             }
             return  this.text[this.cursor+n];
         },
+        
+        public bool lookEOF(int n = 0)
+        {
+            if (this.cursor+n < 0 || this.cursor+n >= this.text.length) {
+                return true;
+            }
+            return  false
+        },
+        
     
         public char next(int n = 1,  out bool eof)
         {
             eof = false;
-            if (n < 1) {
-                return null;
+            if (n < 1) { //?? eof???
+                return '\0';
             }
                 
-            var pulled = "";
+            char pulled;
             for (var i = 0; i < n; i++) {
                 if (this.cursor+i < this.text.length) {
                     pulled += this.text.charAt(this.cursor+i);