This could have been written like this to avoid casting:

	public static <T extends Node> Parser<T> locate(Parser<T> parser) {
		return Parsers.sequence(INDEX, parser, INDEX, new Map3<Integer, T, Integer, T>() {
			@Override
			public T map(Integer start, T obj, Integer end) {
				obj.setInfo(new SourceInfo(start, end));
				return obj;
			}});
	}