Skip to main content

spelling_of

Function spelling_of 

Source
pub fn spelling_of(node: &CppSyntaxNode) -> Option<String>
Expand description

The last identifier written inside a node — the name a call would spell, the name a declaration declares.

Shared by the two checks that pair a call with a declaration, because both need the same answer to “which name is this”: the last one written, so that a return type (int scale(…)), a scope (w.scale(…)) and a template head (vector<int>::push_back(…)) all end at the name and not at something before it.