barf(sb, n, indent, skip, loc);
} else {
for(GSS.Phase<Tok>.Node nn : n.parents())
- barf(sb, nn, indent, skip, count-1, nn.phase().getPrevLocation());
+ barf(sb, nn, indent, skip, count-1, n.phase().getLocation());
}
}
static <Tok> void barf(HashMap<Element,Input.Location> sb, GSS.Phase<Tok>.Node n, int indent, boolean skip, Input.Location loc) {
}
HashMap<Element,Input.Location> hm = new HashMap<Element,Input.Location>();
for(Node no : nodes)
- barf(hm, no, 0, false, /*region.getStart()*/loc);
+ barf(hm, no, 0, false, region.getStart());
ret.append("\n expected: ");
Set<Element> hs = hm.keySet();
if (hs.size() == 1) {
} else {
ret.append("\n or " + ANSI.purple(s));
}
- Input.Region reg = loc2.createRegion(region.getStart());
+ Input.Region reg = loc2.createRegion(region.getEnd());
ret.append(" to match \"" + ANSI.cyan(input.showRegion(reg)) + "\" at " + ANSI.yellow(reg));
i++;
}