pub struct KindRule {
pub node_kind: &'static str,
pub entity_kind: &'static str,
pub with_signature: bool,
pub sig_delim: char,
}Expand description
kind 映射规则:tree-sitter 节点 kind → 实体 kind(语言差异点数据化)
覆盖 7 语言 walk 中“纯 kind→kind 映射 + 可选签名提取“的分支,
由 SharedProcessor::record_by_rule 统一提取,输出与各语言原 match 分支逐字节一致。
Fields§
§node_kind: &'static strtree-sitter 节点 kind(如 “function_declaration”)
entity_kind: &'static str映射后的实体 kind(如 “function”)
with_signature: bool是否提取签名:取节点文本中首个分隔符前的部分
sig_delim: char签名截断分隔符(Rust/Go/Java/C#/JS/TS 用 ‘{’,Python 用 ‘:’)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KindRule
impl RefUnwindSafe for KindRule
impl Send for KindRule
impl Sync for KindRule
impl Unpin for KindRule
impl UnsafeUnpin for KindRule
impl UnwindSafe for KindRule
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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