lean2/src/kernel/pos_info_provider.cpp
Leonardo de Moura ccb9faf065 refactor(*): error messages
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-13 16:54:21 -08:00

21 lines
570 B
C++

/*
Copyright (c) 2013 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include "kernel/pos_info_provider.h"
namespace lean {
char const * pos_info_provider::get_file_name() const {
return "unknown";
}
format pos_info_provider::pp(expr const & e) const {
try {
auto p = get_pos_info(e);
return format{format(get_file_name()), colon(), format(p.first), colon(), format(p.second), colon()};
} catch (exception &) {
return format();
}
}
}