Character ret = __next();
if (ret==null) return null;
char c = ret.charValue();
- if (indent) {
- if (ret==CharAtom.left) System.out.print("\033[31m{\033[0m");
- else if (ret==CharAtom.right) System.out.print("\033[31m}\033[0m");
- else System.out.print(c+"");
- }
return ret;
}
public Character __next() throws IOException {
public String showRegion(Region<Character> rc, int maxLength) {
if (cache == null) return null;
Cartesian.Region r = (Cartesian.Region)rc;
- int start = r.getStart().getScalar()+1;
- int end = r.getEnd().getScalar()+1;
+ int start = r.getStart().getScalar();
+ int end = r.getEnd().getScalar();
if (start < 0) start = 0;
if (end < start) end = start;
if (end > cache.length()) end = cache.length();
return cache.substring(start, end);
}
+ public void close() { }
}