/*
 * Copyright 2013-2017 consulo.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package consulo.csharp.lang.psi.impl.source;

import javax.annotation.Nonnull;

import consulo.csharp.lang.psi.CSharpElementVisitor;
import com.intellij.lang.ASTNode;
import consulo.dotnet.psi.DotNetExpression;
import consulo.dotnet.psi.DotNetStatement;

/**
 * @author VISTALL
 * @since 16.12.13.
 */
public class CSharpExpressionStatementImpl extends CSharpElementImpl implements DotNetStatement
{
	public CSharpExpressionStatementImpl(@Nonnull ASTNode node)
	{
		super(node);
	}

	public DotNetExpression getExpression()
	{
		return findChildByClass(DotNetExpression.class);
	}

	@Override
	public void accept(@Nonnull CSharpElementVisitor visitor)
	{
		visitor.visitExpressionStatement(this);
	}
}

@@ -646,35 +646,211 @@
 ort 
-javax.annotation.Nonnull
+com.intellij.lang.ASTNode;%0Aimport com.intellij.psi.PsiElement;%0Aimport com.intellij.psi.ResolveState;%0Aimport com.intellij.psi.scope.PsiScopeProcessor;%0Aimport consulo.annotation.access.RequiredReadAction
 ;%0A
-%0A
 impo
@@ -902,42 +902,8 @@
 or;%0A
-import com.intellij.lang.ASTNode;%0A
 impo
@@ -986,16 +986,50 @@
 ement;%0A%0A
+import javax.annotation.Nonnull;%0A%0A
 /**%0A * @
@@ -1248,16 +1248,47 @@
 e);%0A%09%7D%0A%0A
+%09@Nonnull%0A%09@RequiredReadAction%0A
 %09public 
@@ -1336,16 +1336,23 @@
 urn find
+NotNull
 ChildByC
@@ -1458,16 +1458,16 @@
 tor)%0A%09%7B%0A
-
 %09%09visito
@@ -1502,11 +1502,330 @@
 his);%0A%09%7D
+%0A%0A%09@Override%0A%09@RequiredReadAction%0A%09public boolean processDeclarations(@Nonnull PsiScopeProcessor processor, @Nonnull ResolveState state, PsiElement lastParent, @Nonnull PsiElement place)%0A%09%7B%0A%09%09DotNetExpression expression = getExpression();%0A%09%09return expression.processDeclarations(processor, state, lastParent, place);%0A%09%7D
 %0A%7D%0A

fix #551