pub struct Decl {
pub parent: Option<usize>,
pub construct: &'static str,
pub name: Option<String>,
pub traits: &'static [&'static str],
pub kind: String,
pub span: (usize, usize),
pub lines: (usize, usize),
pub signature: Option<String>,
pub doc: Option<String>,
pub callee: Option<String>,
pub n_params: Option<i64>,
}Expand description
One lowered construct — the code level’s producer seam, the
parallel of quarb_text::Block. A producer emits Decls in
pre-order (a parent precedes its children);
CodeModel::build derives the arbor. The tree-sitter
producer lives in this crate; another backend supplies the
same stream and nothing above it moves.
Fields§
§parent: Option<usize>Index of the parent Decl, or None for a top-level one.
construct: &'static strThe vocabulary word: function, type, if, call, …
name: Option<String>The declared (or adopted) identifier, where one exists.
traits: &'static [&'static str]Curated trait set — never backend kinds.
kind: StringThe raw backend kind; surfaces only as ::::kind.
span: (usize, usize)Byte range into the source.
lines: (usize, usize)1-based start/end lines.
signature: Option<String>The declaration head, whitespace-collapsed (::signature).
doc: Option<String>Attached documentation, markers stripped (::doc).
callee: Option<String>A call’s callee text (::callee).
n_params: Option<i64>Declared parameter count, functions only (::::n-params).