@Nullable
private static ErrorLocation getErrorLocation(Throwable throwable)
{
// TODO: this is a big hack
if (throwable instanceof ParsingException) {
ParsingException e = (ParsingException) throwable;
return new ErrorLocation(e.getLineNumber(), e.getColumnNumber());
}
return null;
}