[FIR/IR generator] Share visitor-related properties between FIR & IR
This commit is contained in:
committed by
Space Team
parent
bdfb3c3ac9
commit
75b509c185
+4
@@ -40,6 +40,10 @@ abstract class AbstractElement<Element, Field> : ElementOrRef<Element, Field>, F
|
||||
|
||||
abstract override val allFields: List<Field>
|
||||
|
||||
abstract override val walkableChildren: List<Field>
|
||||
|
||||
abstract override val transformableChildren: List<Field>
|
||||
|
||||
final override fun get(fieldName: String): Field? {
|
||||
return allFields.firstOrNull { it.name == fieldName }
|
||||
}
|
||||
|
||||
+18
@@ -8,4 +8,22 @@ package org.jetbrains.kotlin.generators.tree
|
||||
interface FieldContainer {
|
||||
val allFields: List<AbstractField>
|
||||
operator fun get(fieldName: String): AbstractField?
|
||||
|
||||
val hasAcceptMethod: Boolean
|
||||
get() = false
|
||||
|
||||
val hasTransformMethod: Boolean
|
||||
get() = false
|
||||
|
||||
val hasAcceptChildrenMethod: Boolean
|
||||
get() = false
|
||||
|
||||
val hasTransformChildrenMethod: Boolean
|
||||
get() = false
|
||||
|
||||
val walkableChildren: List<AbstractField>
|
||||
get() = emptyList()
|
||||
|
||||
val transformableChildren: List<AbstractField>
|
||||
get() = emptyList()
|
||||
}
|
||||
Reference in New Issue
Block a user