findDeclaration method
The declaration named name, optionally within container.
Implementation
DeclSite? findDeclaration(String name, {String? container}) {
DeclSite? fallback;
for (final d in declarations) {
if (d.name != name) continue;
if (container != null && d.container == container) return d;
fallback ??= d;
}
return fallback;
}