Skip to main content

project

Function project 

Source
pub fn project<'a>(owner: &Node<'a>) -> Option<Node<'a>>
Expand description

The child of an owner that pays for it: the owner’s declared project field, or — where the row declares none, or the grammar gives this owner no such field (Java’s instanceof_expression carries its keyword as a bare child) — its first child whose kind is a declared payer. None when neither holds, which for a declared owner is a row defect.

The field is read by grammar id, resolved once per row: tree_sitter resolves a name by a string compare over the grammar’s field table on every call, and a row’s gate asks this of every owner-kind node (#1695).