38 lines
845 B
Rust
38 lines
845 B
Rust
|
import util.common.span;
|
||
|
import std._uint;
|
||
|
|
||
|
io obj session() {
|
||
|
io fn span_err(span sp, str msg) {
|
||
|
let str s = sp.filename;
|
||
|
s += ':' as u8;
|
||
|
// We really need #fmt soon!
|
||
|
s += _uint.to_str(sp.lo.line, 10u);
|
||
|
s += ':' as u8;
|
||
|
s += _uint.to_str(sp.lo.col, 10u);
|
||
|
s += ':' as u8;
|
||
|
s += _uint.to_str(sp.hi.line, 10u);
|
||
|
s += ':' as u8;
|
||
|
s += _uint.to_str(sp.hi.col, 10u);
|
||
|
s += ": error: ";
|
||
|
s += msg;
|
||
|
log s;
|
||
|
fail;
|
||
|
}
|
||
|
|
||
|
io fn err(str msg) {
|
||
|
let str s = "error: ";
|
||
|
s += msg;
|
||
|
log s;
|
||
|
fail;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
// Local Variables:
|
||
|
// fill-column: 78;
|
||
|
// indent-tabs-mode: nil
|
||
|
// c-basic-offset: 4
|
||
|
// buffer-file-coding-system: utf-8-unix
|
||
|
// compile-command: "make -k -C ../.. 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
|
||
|
// End:
|