diff options
author | Norbert Preining <norbert@preining.info> | 2020-05-28 03:03:21 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-05-28 03:03:21 +0000 |
commit | 745892fbddea56040139108277e728b53fd8fc11 (patch) | |
tree | 15e55e299b38fccdabce8364f1fbf4f02ef37994 /support/texlab/src/syntax/mod.rs | |
parent | 195ca7e0c377d83455867bdd8e409d4e1cf024ea (diff) |
CTAN sync 202005280303
Diffstat (limited to 'support/texlab/src/syntax/mod.rs')
-rw-r--r-- | support/texlab/src/syntax/mod.rs | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/support/texlab/src/syntax/mod.rs b/support/texlab/src/syntax/mod.rs index c92aa995f9..87b33792df 100644 --- a/support/texlab/src/syntax/mod.rs +++ b/support/texlab/src/syntax/mod.rs @@ -1,27 +1,14 @@ -mod bibtex; -mod language; -mod latex; +pub mod bibtex; +mod generic_ast; +mod lang_data; +pub mod latex; +pub mod latexindent; +mod lsp_kind; mod text; -pub use self::bibtex::*; -pub use self::language::*; -pub use self::latex::*; -pub use self::text::*; - -use crate::workspace::Uri; -use tex::Language; - -#[derive(Debug, PartialEq, Eq, Clone)] -pub enum SyntaxTree { - Latex(Box<LatexSyntaxTree>), - Bibtex(Box<BibtexSyntaxTree>), -} - -impl SyntaxTree { - pub fn parse(uri: &Uri, text: &str, language: Language) -> Self { - match language { - Language::Latex => SyntaxTree::Latex(Box::new(LatexSyntaxTree::parse(uri, text))), - Language::Bibtex => SyntaxTree::Bibtex(Box::new(text.into())), - } - } -} +pub use self::{ + generic_ast::{Ast, AstNodeIndex}, + lang_data::*, + lsp_kind::Structure, + text::{CharStream, Span, SyntaxNode}, +}; |