summaryrefslogtreecommitdiff
path: root/support/texlab/src/syntax.rs
diff options
context:
space:
mode:
Diffstat (limited to 'support/texlab/src/syntax.rs')
-rw-r--r--support/texlab/src/syntax.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/support/texlab/src/syntax.rs b/support/texlab/src/syntax.rs
new file mode 100644
index 0000000000..5a906c0ea7
--- /dev/null
+++ b/support/texlab/src/syntax.rs
@@ -0,0 +1,17 @@
+use cstree::TextRange;
+
+pub mod bibtex;
+pub mod build_log;
+pub mod latex;
+
+pub trait CstNode<'a> {
+ type Lang: cstree::Language;
+
+ fn cast(node: &'a cstree::ResolvedNode<Self::Lang>) -> Option<Self>
+ where
+ Self: Sized;
+
+ fn syntax(&self) -> &'a cstree::ResolvedNode<Self::Lang>;
+
+ fn small_range(&self) -> TextRange;
+}