willi26 0.0.2

An interactive parsimony phylogenetic analysis program inspired by Hennig86.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*!Module: byte-span utilities used to attach source locations to tokens,
parsed commands, and errors.

 */
/// Half-open byte range [start, end) for error location tracking.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Span {
    pub start: usize,
    pub end: usize,
}

impl Span {
    /// constructs an immutable half-open source range from start and end byte
    /// offsets.
    pub fn new(start: usize, end: usize) -> Self {
        Self { start, end }
    }
}