readsState function
Whether node reads ctx.state of a SoloContext.
Implementation
bool readsState(AstNode node, Element ctx) {
if (_getterOf(node, 'state') != ctx) return false;
final target = node is PrefixedIdentifier
? node.prefix
: (node as PropertyAccess).realTarget;
return isSoloContext(target.staticType);
}