*/
public class Tib implements Input<Character> {
- public String showRegion(Region<Character> r) { return null; }
+ public String showRegion(Region<Character> r) { return ""; }
public Tib(String s) throws IOException { this(new StringReader(s)); }
public Tib(Reader r) throws IOException { this(new BufferedReader(r)); }
boolean indenting = true;
int indentation = 0;
private ArrayList<Integer> istack = new ArrayList<Integer>();
+ private static boolean debug = "true".equals(System.getProperty("tib.debug", "false"));
public Character next() throws IOException {
Character ret = nextc();
- if (ret==null) return null;
- else if (ret==left) System.out.print("\033[31m{\033[0m");
- else if (ret==right) System.out.print("\033[31m}\033[0m");
- else System.out.print(ret);
+ if (debug) {
+ if (ret==null) return null;
+ else if (ret==left) System.out.print("\033[31m{\033[0m");
+ else if (ret==right) System.out.print("\033[31m}\033[0m");
+ else System.out.print(ret);
+ }
return ret;
}