19 lines
286 B
Rust
19 lines
286 B
Rust
pub struct SourceRange {
|
|
start: usize,
|
|
end: usize,
|
|
}
|
|
|
|
impl SourceRange {
|
|
pub fn new(start: usize, end: usize) -> Self {
|
|
Self { start, end }
|
|
}
|
|
|
|
pub fn start(&self) -> usize {
|
|
self.start
|
|
}
|
|
|
|
pub fn end(&self) -> usize {
|
|
self.end
|
|
}
|
|
}
|