parser: switch to char matcher interface

This commit is contained in:
alex committed 2023-10-06 15:30:43 -07:00
1 parent 97283636bc
commit d36310e698
7 files changed
+65 -34

No files matched your search

+1 -1
View File
@@ -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) ?: