rewriter 0.2.1

Rust utilities for rewriting files
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::fmt::Debug;

pub trait Span: Clone + Debug {
    type LineColumn: self::LineColumn;
    fn line_column(line: usize, column: usize) -> Self::LineColumn;
    fn start(&self) -> Self::LineColumn;
    fn end(&self) -> Self::LineColumn;
}

pub trait LineColumn: Copy + Debug + Ord {
    fn line(&self) -> usize;
    fn line_mut(&mut self) -> &mut usize;
    fn column(&self) -> usize;
    fn column_mut(&mut self) -> &mut usize;
}