Stubs for JetTypeReference
This commit is contained in:
@@ -19,7 +19,6 @@ package org.jetbrains.jet;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
import com.intellij.psi.tree.IFileElementType;
|
||||
import org.jetbrains.jet.lang.psi.*;
|
||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementType;
|
||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||
import org.jetbrains.jet.plugin.JetLanguage;
|
||||
|
||||
@@ -63,7 +62,7 @@ public interface JetNodeTypes {
|
||||
JetNodeType VALUE_ARGUMENT_LIST = new JetNodeType("VALUE_ARGUMENT_LIST", JetValueArgumentList.class);
|
||||
JetNodeType VALUE_ARGUMENT = new JetNodeType("VALUE_ARGUMENT", JetValueArgument.class);
|
||||
JetNodeType VALUE_ARGUMENT_NAME = new JetNodeType("VALUE_ARGUMENT_NAME", JetValueArgumentName.class);
|
||||
JetNodeType TYPE_REFERENCE = new JetNodeType("TYPE_REFERENCE", JetTypeReference.class);
|
||||
IElementType TYPE_REFERENCE = JetStubElementTypes.TYPE_REFERENCE;
|
||||
|
||||
JetNodeType USER_TYPE = new JetNodeType("USER_TYPE", JetUserType.class);
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ import com.intellij.lang.ASTNode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.JetNodeTypes;
|
||||
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
|
||||
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -29,11 +31,15 @@ import java.util.List;
|
||||
* Type reference element.
|
||||
* Underlying token is {@link org.jetbrains.jet.JetNodeTypes#TYPE_REFERENCE}
|
||||
*/
|
||||
public class JetTypeReference extends JetElementImpl {
|
||||
public class JetTypeReference extends JetElementImplStub<PsiJetPlaceHolderStub<JetTypeReference>> {
|
||||
public JetTypeReference(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
public JetTypeReference(PsiJetPlaceHolderStub<JetTypeReference> stub) {
|
||||
super(stub, JetStubElementTypes.TYPE_REFERENCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R, D> R accept(@NotNull JetVisitor<R, D> visitor, D data) {
|
||||
return visitor.visitTypeReference(this, data);
|
||||
|
||||
+3
@@ -53,4 +53,7 @@ public interface JetStubElementTypes {
|
||||
|
||||
JetPlaceHolderStubElementType<JetNullableType> NULLABLE_TYPE =
|
||||
new JetPlaceHolderStubElementType<JetNullableType>("NULLABLE_TYPE", JetNullableType.class);
|
||||
|
||||
JetPlaceHolderStubElementType<JetTypeReference> TYPE_REFERENCE =
|
||||
new JetPlaceHolderStubElementType<JetTypeReference>("TYPE_REFERENCE", JetTypeReference.class);;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user