pub struct LanguageSpec {Show 14 fields
pub name: &'static str,
pub extensions: &'static [&'static str],
pub grammar: fn() -> Language,
pub query_source: &'static str,
pub comment_kinds: &'static [&'static str],
pub module_path: fn(&str) -> Vec<String>,
pub path_separators: &'static [&'static str],
pub absolutize: fn(path: &str, file: &str) -> Vec<String>,
pub receivers: &'static [&'static str],
pub doc_skip_kinds: &'static [&'static str],
pub manifest: Option<&'static ManifestSpec>,
pub inline: Option<&'static InlineSpec>,
pub file_refs: bool,
pub implicit_interfaces: bool,
}Fields§
§name: &'static str§extensions: &'static [&'static str]§grammar: fn() -> Language§query_source: &'static str§comment_kinds: &'static [&'static str]§module_path: fn(&str) -> Vec<String>Maps a repo-relative file path to its module/package path segments — what import statements are matched against. Pure data transform; the resolver stays language-blind.
path_separators: &'static [&'static str]Splits an import/reference path into segments (:: vs / vs .).
absolutize: fn(path: &str, file: &str) -> Vec<String>Turns a raw import/reference path into absolute module segments,
resolving language-relative forms (super::, leading dots, ./)
against the path’s own file. Data transform; resolver stays blind.
receivers: &'static [&'static str]Receiver keywords (self, this): a qualified reference through one
binds within the reference’s enclosing type.
doc_skip_kinds: &'static [&'static str]Node kinds the doc-comment walk may step over (max 2) between a
definition and its doc — e.g. Unreal’s UCLASS(...) line, which
parses as an expression_statement between comment and class.
manifest: Option<&'static ManifestSpec>Package manifest shape, when the language has one that names module roots (see ManifestSpec).
inline: Option<&'static InlineSpec>Secondary inline grammar applied to designated container-node ranges, whose captures merge into the file’s facts (markdown’s block/inline split).
file_refs: boolReferences in this language are document paths naming corpus
files ([text](docs/guide.md#setup)), not symbol paths: the
resolver binds them by exact file path — with or without the
language’s extensions, #fragment to the target file’s unique
def whose name slugifies to the fragment — and never through the
symbol tiers. Evidence or nothing: a dead link stays unresolved.
implicit_interfaces: boolInterface satisfaction is implicit (Go): no syntax names the
interface at the implementing type, so the resolver runs a
structural method-set pass instead of @trait/@trait.impl
pairing. Pure data; the engine never branches on language name.