parol-ls 4.4.0

Language server for parol parser generator
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{parol_ls_grammar::OwnedToken, utils::location_to_range};

impl From<&OwnedToken> for lsp_types::DocumentSymbol {
    fn from(token: &OwnedToken) -> Self {
        #[allow(deprecated)]
        lsp_types::DocumentSymbol {
            name: token.text().to_owned(),
            detail: None,
            kind: lsp_types::SymbolKind::PROPERTY,
            tags: None,
            deprecated: None,
            range: location_to_range(&token.location),
            selection_range: location_to_range(&token.location),
            children: None,
        }
    }
}