diff options
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}, +}; |