Skip to content

Commit

Permalink
fixed: resolve logic is restored to previous commits
Browse files Browse the repository at this point in the history
Resolves: #355
  • Loading branch information
Dmitry Kochik committed Aug 3, 2021
1 parent 5f6371c commit ea65916
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import com.jetbrains.snakecharm.lang.psi.elementTypes.SmkElementTypes
import com.jetbrains.snakecharm.lang.psi.elementTypes.SmkStubElementTypes
import com.jetbrains.snakecharm.lang.psi.types.SmkCheckpointType
import com.jetbrains.snakecharm.lang.psi.types.SmkRulesType
import com.jetbrains.snakecharm.lang.psi.types.SmkUsesType

class SmkRuleOrCheckpointNameReference(
element: SmkReferenceExpression,
Expand Down Expand Up @@ -49,7 +50,7 @@ class SmkRuleOrCheckpointNameReference(

results.addAll(SmkRulesType(null, smkFile).resolveMember(name, element, ctx, myContext))
results.addAll(SmkCheckpointType(null, smkFile).resolveMember(name, element, ctx, myContext))
//results.addAll(SmkUsesType(null, smkFile).resolveMember(name, element, ctx, myContext))
results.addAll(SmkUsesType(null, smkFile).resolveMember(name, element, ctx, myContext))
results.addAll(collectModulesAndResolveThem(smkFile, name))
results.addAll(collectModuleFromUseSection(element))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import com.intellij.psi.PsiElement
import com.intellij.psi.stubs.StubElement
import com.jetbrains.snakecharm.lang.psi.SmkUse
import com.jetbrains.snakecharm.lang.psi.impl.SmkUseImpl
import com.jetbrains.snakecharm.lang.psi.stubs.SmkUseNameIndex.Companion.KEY
import com.jetbrains.snakecharm.lang.psi.stubs.SmkUseStub

class SmkUseElementType
: SmkRuleLikeElementType<SmkUseStub, SmkUse>("SMK_USE_DECLARATION_STATEMENT", null) {
//KEY) {
: SmkRuleLikeElementType<SmkUseStub, SmkUse>("SMK_USE_DECLARATION_STATEMENT", KEY) {

override fun createStub(name: String?, parentStub: StubElement<*>?): SmkUseStub =
SmkUseStubImpl(name, parentStub)
Expand Down

0 comments on commit ea65916

Please sign in to comment.