if (this.cursor+n < 0 || this.cursor+n >= this.length) {
return '\0';
}
- return this.text[this.cursor+n];
+ return this.get_char(this.cursor+n);
},
public bool lookEOF(int n = 0)
}
char pulled;
- for (var i = 0; i < n; i++) {
+ var i = 0;
+ while (i < n) {
if (this.cursor+i < this.length) {
pulled += this.text.get_char(this.cursor+i);
+ i+=pulled.to_string.length();
} else {
eof =true;
return '\0';