2013-10-14 14:37:35 -07:00
|
|
|
/*
|
|
|
|
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 {
|
2014-01-13 16:54:21 -08:00
|
|
|
char const * pos_info_provider::get_file_name() const {
|
2014-01-09 12:15:12 -08:00
|
|
|
return "unknown";
|
|
|
|
}
|
2013-10-14 14:37:35 -07:00
|
|
|
format pos_info_provider::pp(expr const & e) const {
|
|
|
|
try {
|
2014-08-01 20:17:26 -07:00
|
|
|
auto p = get_pos_info_or_some(e);
|
2014-08-24 09:35:25 -07:00
|
|
|
return format(get_file_name()) + colon() + format(p.first) + colon() + format(p.second) + colon();
|
2013-10-14 14:37:35 -07:00
|
|
|
} catch (exception &) {
|
|
|
|
return format();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|