pub fn resolve_declaration<'a>(
stmts: &'a [Stmt<'a, 'a>],
word: &str,
accept: &dyn Fn(&Declaration<'a>) -> bool,
) -> Option<Declaration<'a>>Expand description
Find the first declaration named word that accept approves, scanning
stmts in source order and recursing into braced namespaces.
A $ sigil on word is stripped before matching property / promoted-param
names (which are stored without it), matching the original walkers.