pub struct LanguageSpec {
pub language: Language,
pub symbol_node_types: HashMap<&'static str, SymbolKind>,
pub name_fields: HashMap<&'static str, &'static str>,
pub container_node_types: HashSet<&'static str>,
pub body_node_types: HashSet<&'static str>,
}Expand description
Configuration for extracting symbols from a specific language.
Fields§
§language: LanguageThe Tree-sitter language object.
symbol_node_types: HashMap<&'static str, SymbolKind>Maps a node type to a SymbolKind (e.g., “function_definition” -> SymbolKind::Function)
name_fields: HashMap<&'static str, &'static str>Maps a node type to the field name containing its identifier (e.g., “function_definition” -> “name”)
container_node_types: HashSet<&'static str>Node types that establish a new scope/container (e.g., “class_definition”, “impl_item”)
body_node_types: HashSet<&'static str>Node types that represent the “body” of a symbol, if not accessible via a “body” field
Auto Trait Implementations§
impl Freeze for LanguageSpec
impl RefUnwindSafe for LanguageSpec
impl Send for LanguageSpec
impl Sync for LanguageSpec
impl Unpin for LanguageSpec
impl UnsafeUnpin for LanguageSpec
impl UnwindSafe for LanguageSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more