aboutsummaryrefslogtreecommitdiff
path: root/src/config/parser.rs
blob: 102f15af7f0cf5abb7216c40da3e64f829b9ee4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
struct Location {
    line: u32,
    column: u32,
}

#[derive(Debug, Clone)]
struct Scanner<'s> {
    location: Location,
    content: std::str::Chars<'s>,
}

impl<'s> Scanner<'s> {
    fn new(content: &'s str) -> Self {
        Self {
            location: Default::default(),
            content: content.chars(),
        }
    }
}