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