- public Forest<String> shiftToken(Location oldloc, Character ct, Location newloc) {
- return Forest.create(new Input.Region(oldloc, newloc), ct.toString(), null, false, null);
+ private Location oldloc;
+
+ public Forest<String> shiftToken(Character ct, Location newloc) {
+ if (oldloc==null) oldloc = newloc;
+ Forest<String> ret = Forest.create(oldloc.createRegion(newloc), ct.toString(), null);
+ oldloc = newloc;
+ return ret;