pub struct TsConfig {
pub class_types: HashSet<&'static str>,
pub function_types: HashSet<&'static str>,
pub import_types: HashSet<&'static str>,
pub call_types: HashSet<&'static str>,
pub name_field: &'static str,
pub class_name_field: Option<&'static str>,
pub body_field: &'static str,
pub call_function_field: &'static str,
}Expand description
Describes which tree-sitter node kinds correspond to classes, functions, imports and calls for a given language.
Fields§
§class_types: HashSet<&'static str>§function_types: HashSet<&'static str>§import_types: HashSet<&'static str>§call_types: HashSet<&'static str>§name_field: &'static strField name used by the grammar to expose the identifier of a definition.
class_name_field: Option<&'static str>Optional override for class/struct name field (defaults to name_field).
body_field: &'static strField name for the body block of a class/function.
call_function_field: &'static strField name inside a call expression that points to the callee.
Auto Trait Implementations§
impl Freeze for TsConfig
impl RefUnwindSafe for TsConfig
impl Send for TsConfig
impl Sync for TsConfig
impl Unpin for TsConfig
impl UnsafeUnpin for TsConfig
impl UnwindSafe for TsConfig
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more