void (PsiSwitchLabelStatementBase statement) { CodeFragmentEvaluator oldFragmentEvaluator = setNewCodeFragmentEvaluator(); try { List<Evaluator> evaluators = new SmartList<>(); PsiCaseLabelElementList labelElementList = statement.getCaseLabelElementList(); boolean defaultCase = statement.isDefaultCase(); if (labelElementList != null) { for (PsiCaseLabelElement labelElement : labelElementList.getElements()) { if (labelElement instanceof PsiDefaultCaseLabelElement) { defaultCase = true; continue; } else if (labelElement instanceof PsiPattern pattern) { PatternLabelEvaluator evaluator = getPatternLabelEvaluator(pattern); if (evaluator != null) { evaluators.add(evaluator); } continue; } Evaluator evaluator = accept(labelElement); if (evaluator != null) { evaluators.add(evaluator); } } } Evaluator guardEvaluator = accept(statement.getGuardExpression()); if (statement instanceof PsiSwitchLabeledRuleStatement rule) { myResult = new SwitchEvaluator.SwitchCaseRuleEvaluator(evaluators, guardEvaluator, defaultCase, accept(rule.getBody())); } else { myResult = new SwitchEvaluator.SwitchCaseEvaluator(evaluators, guardEvaluator, defaultCase); } } finally { myCurrentFragmentEvaluator = oldFragmentEvaluator; } }