JSDOC/TextStream.vala
[gnome.introspection-doc-generator] / JSDOC / TextStream.vala
index 599ed8b..ff5f98c 100644 (file)
@@ -39,15 +39,24 @@ namespace JSDOC {
             }
             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);