@Override public void visitAssignmentExpression( @NotNull PsiAssignmentExpression expression) { super.visitAssignmentExpression(expression); final PsiElement parent = expression.getParent(); if (parent == null) { return; } final PsiElement grandparent = parent.getParent(); if (parent instanceof PsiExpressionStatement || grandparent instanceof PsiExpressionListStatement) { return; } registerError(expression); }
@Override public void visitExpressionListStatement(PsiExpressionListStatement statement) { mVisitor.report("PsiExpressionListStatement", statement.getText(), statement); super.visitStatement(statement); }