pub enum Lang {
Show 14 variants
Rust,
TypeScript,
Tsx,
Python,
Go,
Java,
Ruby,
C,
CSharp,
Sql,
Cpp,
Kotlin,
Swift,
Php,
}Variants§
Implementations§
Source§impl Lang
impl Lang
pub fn from_path(path: &str) -> Option<Lang>
pub fn name(&self) -> &'static str
pub fn language(&self) -> Language
pub fn separator(&self) -> String
Sourcepub fn definition(
&self,
node: Node<'_>,
src: &str,
) -> Option<(String, &'static str)>
pub fn definition( &self, node: Node<'_>, src: &str, ) -> Option<(String, &'static str)>
Is this node a symbol definition? Returns (name, kind). The name may
be pre-qualified with :: (Go methods carry their receiver).
Sourcepub fn scope_only(&self, node: Node<'_>, src: &str) -> Option<String>
pub fn scope_only(&self, node: Node<'_>, src: &str) -> Option<String>
Containers that qualify children without being symbols themselves.
Sourcepub fn body_field(&self) -> Option<&'static str>
pub fn body_field(&self) -> Option<&'static str>
Field holding the body (cut point for signatures), per node kind.
Sourcepub fn call(&self, node: Node<'_>, src: &str) -> Option<String>
pub fn call(&self, node: Node<'_>, src: &str) -> Option<String>
If this node is a call, return the bare callee name.
Trait Implementations§
impl Copy for Lang
impl Eq for Lang
impl StructuralPartialEq for Lang
Auto Trait Implementations§
impl Freeze for Lang
impl RefUnwindSafe for Lang
impl Send for Lang
impl Sync for Lang
impl Unpin for Lang
impl UnsafeUnpin for Lang
impl UnwindSafe for Lang
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