mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-03 05:10:55 +00:00
parser: switch to char matcher interface
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import gay.pizza.pork.buildext.AstCodegenType
|
||||
|
||||
plugins {
|
||||
id("org.jetbrains.intellij") version "1.15.0"
|
||||
id("org.jetbrains.intellij") version "1.16.0"
|
||||
id("gay.pizza.pork.module")
|
||||
id("gay.pizza.pork.ast")
|
||||
}
|
||||
|
@ -11,9 +11,8 @@ import gay.pizza.pork.idea.psi.gen.PorkElement
|
||||
class PorkSymbolDeclaration(val element: PorkElement) : PsiSymbolDeclaration {
|
||||
override fun getDeclaringElement(): PsiElement = element
|
||||
override fun getRangeInDeclaringElement(): TextRange {
|
||||
val textRangeOfSymbol = PorkElementHelpers.symbolElementOf(element)?.psi?.textRangeInParent
|
||||
return PorkElementHelpers.symbolElementOf(element)?.psi?.textRangeInParent
|
||||
?: throw RuntimeException("Unable to get symbol of element: $element")
|
||||
return textRangeOfSymbol
|
||||
}
|
||||
|
||||
override fun getSymbol(): Symbol = PorkElementHelpers.psiSymbolFor(element) ?:
|
||||
|
Reference in New Issue
Block a user