summaryrefslogtreecommitdiff
path: root/support/texlab/crates/base-db/src/semantics.rs
blob: 94a9c1597354398c59af8eb1628bc0a83e1f8141 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub mod auxiliary;
pub mod tex;

#[derive(Debug, PartialEq, Eq, Clone, Hash)]
pub struct Span {
    pub text: String,
    pub range: rowan::TextRange,
}

impl From<&syntax::latex::Key> for Span {
    fn from(key: &syntax::latex::Key) -> Self {
        Span {
            text: key.to_string(),
            range: syntax::latex::small_range(key),
        }
    }
}