- public char look(int n = 0) {
-
-
- if (this.cursor+n < 0 || this.cursor+n >= this.text.length) {
- var result = new String("");
- result.eof = true;
- return result;
+ public char look(int n = 0)
+ {
+
+ if (this.cursor+n < 0 || this.cursor+n >= this.length) {
+ return '\0';
+ }
+ return this.text[this.cursor+n]; // this.text.get_char(this.cursor+n);
+ }
+
+ public bool lookEOF(int n = 0)
+ {
+ if (this.cursor+n < 0 || this.cursor+n >= this.length) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @param n - number of characters to return..
+ */
+ public string next(int n = 1)
+ {
+
+ if (n < 1) { //?? eof???
+ return "\0";