aboutsummaryrefslogtreecommitdiff
path: root/src/comp/driver/session.rs
blob: 228e864faaf7d9978cc188cb24b104e37d033f83 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import util.common.span;
import std._uint;

obj session() {
    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;
    }

    fn err(str msg) {
        let str s = "error: ";
        s += msg;
        log s;
        fail;
    }

    fn unimpl(str msg) {
        let str s = "error: unimplemented ";
        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: