From 77cb81f28291b2c28a33c423b4473dbd7b2ac6e0 Mon Sep 17 00:00:00 2001 From: "Pavel V. Talanov" Date: Wed, 9 Apr 2014 18:02:56 +0400 Subject: [PATCH] Stubs for JetInitializerList --- .../frontend/src/org/jetbrains/jet/JetNodeTypes.java | 2 +- .../org/jetbrains/jet/lang/psi/JetInitializerList.java | 9 ++++++++- .../jet/lang/psi/stubs/elements/JetStubElementTypes.java | 3 +++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java b/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java index bedf24ca1c2..89553ef2e5a 100644 --- a/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java +++ b/compiler/frontend/src/org/jetbrains/jet/JetNodeTypes.java @@ -73,7 +73,7 @@ public interface JetNodeTypes { // TODO: review IElementType PROPERTY_ACCESSOR = JetStubElementTypes.PROPERTY_ACCESSOR; - JetNodeType INITIALIZER_LIST = new JetNodeType("INITIALIZER_LIST", JetInitializerList.class); + IElementType INITIALIZER_LIST = JetStubElementTypes.INITIALIZER_LIST; IElementType THIS_CALL = JetStubElementTypes.THIS_CALL; JetNodeType THIS_CONSTRUCTOR_REFERENCE = new JetNodeType("THIS_CONSTRUCTOR_REFERENCE", JetThisReferenceExpression.class); IElementType TYPE_CONSTRAINT_LIST = JetStubElementTypes.TYPE_CONSTRAINT_LIST; diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetInitializerList.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetInitializerList.java index 74c20f4d884..941ca7fabcb 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetInitializerList.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetInitializerList.java @@ -17,16 +17,23 @@ package org.jetbrains.jet.lang.psi; import com.intellij.lang.ASTNode; +import com.intellij.psi.stubs.IStubElementType; import com.intellij.psi.util.PsiTreeUtil; import org.jetbrains.annotations.NotNull; +import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub; +import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes; import java.util.List; -public class JetInitializerList extends JetElementImpl { +public class JetInitializerList extends JetElementImplStub> { public JetInitializerList(@NotNull ASTNode node) { super(node); } + public JetInitializerList(@NotNull PsiJetPlaceHolderStub stub) { + super(stub, JetStubElementTypes.INITIALIZER_LIST); + } + @Override public R accept(@NotNull JetVisitor visitor, D data) { return visitor.visitInitializerList(this, data); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetStubElementTypes.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetStubElementTypes.java index c5b6d137616..962968a2a6d 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetStubElementTypes.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetStubElementTypes.java @@ -90,6 +90,9 @@ public interface JetStubElementTypes { JetPlaceHolderStubElementType DELEGATION_SPECIFIER_LIST = new JetPlaceHolderStubElementType("DELEGATION_SPECIFIER_LIST", JetDelegationSpecifierList.class); + JetPlaceHolderStubElementType INITIALIZER_LIST = + new JetPlaceHolderStubElementType("INITIALIZER_LIST", JetInitializerList.class); + JetPlaceHolderStubElementType DELEGATOR_BY = new JetPlaceHolderStubElementType("DELEGATOR_BY", JetDelegatorByExpressionSpecifier.class); JetPlaceHolderStubElementType DELEGATOR_SUPER_CALL =