1 //<script type="text/javscript">
10 public class TextStreamChar : Object {
13 public TextStreamChar(char val, bool eof=false) {
19 public class TextStream : Object {
24 public TextStream (string text = "")
32 public char look(int n = 0) {
35 if (this.cursor+n < 0 || this.cursor+n >= this.text.length) {
36 var result = new String("");
40 return this.text.charAt(this.cursor+n);
44 if (typeof n == "undefined") n = 1;
45 if (n < 1) return null;
48 for (var i = 0; i < n; i++) {
49 if (this.cursor+i < this.text.length) {
50 pulled += this.text.charAt(this.cursor+i);
53 var result = new String("");