PSI: Move getEqualsToken() method to JetDeclarationWithBody
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user