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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
extern crate rustc_serialize;
extern crate memmap;
#[macro_use]
extern crate bitflags;
pub mod errors;
pub mod lexer;
pub mod name;
pub mod source;
pub mod grind;
pub mod id;
pub mod score;
pub mod util;
pub use self::id::NodeId;
use errors::DiagBuilder2;
pub struct Session {
pub opts: SessionOptions,
}
impl Session {
pub fn new() -> Session {
Session {
opts: Default::default(),
}
}
pub fn emit(&self, err: DiagBuilder2) {
println!("{}", err);
}
}
#[derive(Debug, Default)]
pub struct SessionOptions {
pub ignore_duplicate_defs: bool,
pub trace_scoreboard: bool,
pub verbosity: Verbosity,
}
bitflags! {
#[derive(Default)]
pub struct Verbosity: u8 {
const TYPES = 0b001;
const EXPR_TYPES = 0b010;
const TYPE_CONTEXTS = 0b100;
}
}