List<PsiElement> (PsiExpression place) { PsiElement topmostBlock = getTopmostBlock(place); return CachedValuesManager.getCachedValue(topmostBlock, () -> { List<PsiElement> list = SyntaxTraverser.psiTraverser(topmostBlock).filter(e -> e instanceof PsiExpression || e instanceof PsiLocalVariable).toList(); return new CachedValueProvider.Result<>(list, topmostBlock); }); }