mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-03 05:10:55 +00:00
common: unused marker for marking values as unused intentionally
This commit is contained in:
@ -7,6 +7,7 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":common"))
|
||||
implementation(project(":parser"))
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@ import com.intellij.psi.util.PsiTreeUtil
|
||||
import com.intellij.psi.util.childrenOfType
|
||||
import com.intellij.util.PlatformIcons
|
||||
import gay.pizza.pork.ast.NodeType
|
||||
import gay.pizza.pork.common.unused
|
||||
import gay.pizza.pork.idea.PorkElementTypes
|
||||
import gay.pizza.pork.idea.PorkLanguage
|
||||
import gay.pizza.pork.idea.psi.gen.*
|
||||
@ -44,6 +45,7 @@ object PorkElementHelpers {
|
||||
}
|
||||
|
||||
fun referenceOfElement(element: PorkElement, type: NodeType): PsiReference? {
|
||||
unused(type)
|
||||
val textRangeOfSymbolInElement = element.childrenOfType<SymbolElement>().firstOrNull()?.textRangeInParent ?: return null
|
||||
return PorkIdentifierReference(element, textRangeOfSymbolInElement)
|
||||
}
|
||||
|
Reference in New Issue
Block a user