PSI: Move getEqualsToken() method to JetDeclarationWithBody

This commit is contained in:
Alexey Sedunov
2014-12-22 14:23:24 +03:00
parent a9a30a1b7d
commit c73253259f
4 changed files with 12 additions and 1 deletions
@@ -16,16 +16,19 @@
package org.jetbrains.jet.lang.psi;
import com.intellij.psi.PsiElement;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
public interface JetDeclarationWithBody extends JetDeclaration {
@Nullable
JetExpression getBodyExpression();
@Nullable
PsiElement getEqualsToken();
@Override
@Nullable
String getName();
@@ -52,6 +52,12 @@ public class JetFunctionLiteral extends JetFunctionNotStubbed {
return (JetBlockExpression) super.getBodyExpression();
}
@Nullable
@Override
public PsiElement getEqualsToken() {
return null;
}
@NotNull
public PsiElement getLBrace() {
return findChildByType(JetTokens.LBRACE);
@@ -77,6 +77,7 @@ public class JetNamedFunction extends JetTypeParameterListOwnerStub<KotlinFuncti
return getEqualsToken() == null;
}
@Override
@Nullable
public PsiElement getEqualsToken() {
return findChildByType(JetTokens.EQ);
@@ -98,6 +98,7 @@ public class JetPropertyAccessor extends JetDeclarationStub<KotlinPropertyAccess
return getBodyExpression() != null;
}
@Override
@Nullable
public PsiElement getEqualsToken() {
return findChildByType(JetTokens.EQ);