probe_code/language/
language_trait.rs1use tree_sitter::{Language as TSLanguage, Node};
2
3pub trait LanguageImpl {
5 fn get_tree_sitter_language(&self) -> TSLanguage;
7
8 fn is_acceptable_parent(&self, node: &Node) -> bool;
10
11 fn is_test_node(&self, node: &Node, source: &[u8]) -> bool;
13
14 #[deprecated(since = "0.1.0", note = "this method is not used")]
16 #[allow(dead_code)]
17 fn get_extension(&self) -> &'static str;
18
19 fn find_parent_function<'a>(&self, _node: Node<'a>) -> Option<Node<'a>> {
21 None
23 }
24}