aboutsummaryrefslogtreecommitdiff
path: root/bin/src/fix.rs
blob: a7ddc4f994354ea8d530fa227bac8e2052a011c6 (plain)
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
use std::borrow::Cow;

use rnix::TextRange;

mod all;
pub use all::all;

mod single;
pub use single::single;

type Source<'a> = Cow<'a, str>;

#[derive(Debug)]
pub struct FixResult<'a> {
    pub src: Source<'a>,
    pub fixed: Vec<Fixed>,
}

#[derive(Debug, Clone)]
pub struct Fixed {
    pub at: TextRange,
    pub code: u32,
}

impl<'a> FixResult<'a> {
    fn empty(src: Source<'a>) -> Self {
        Self { src, fixed: Vec::new() }
    }
}