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
#[repr(C)]
#[derive(Debug, Clone, Default, PartialEq, Eq)]
pub struct SourceLine {
pub start: usize,
pub end: usize,
pub ends_with_eof: bool,
}
impl SourceLine {
pub fn new(start: usize, end: usize, ends_with_eof: bool) -> Self {
Self {
start,
end,
ends_with_eof,
}
}
pub fn start(&self) -> usize {
self.start
}
pub fn set_start(&mut self, start: usize) {
self.start = start
}
pub fn end(&self) -> usize {
self.end
}
pub fn set_end(&mut self, end: usize) {
self.end = end
}
pub fn ends_with_eof(&self) -> bool {
self.ends_with_eof
}
pub fn set_ends_with_eof(&mut self, ends_with_eof: bool) {
self.ends_with_eof = ends_with_eof
}
}