[SIR] Use shorter parameter names for some elements in visitor methods

This commit is contained in:
Sergej Jaskiewicz
2023-12-11 20:11:02 +01:00
committed by Space Team
parent e8459793b7
commit dada4a60bd
7 changed files with 49 additions and 44 deletions
@@ -43,6 +43,8 @@ object SwiftIrTree : AbstractSwiftIrTreeBuilder() {
val foreignDeclaration by sealedElement {
parent(declaration)
visitorParameterName = "declaration"
}
val named by sealedElement {
@@ -53,6 +55,8 @@ object SwiftIrTree : AbstractSwiftIrTreeBuilder() {
customParentInVisitor = declaration
parent(declaration)
parent(named)
visitorParameterName = "declaration"
}
val enum: Element by element {
@@ -86,5 +90,7 @@ object SwiftIrTree : AbstractSwiftIrTreeBuilder() {
customParentInVisitor = callable
parent(callable)
parent(foreignDeclaration)
visitorParameterName = "function"
}
}
@@ -20,8 +20,7 @@ class Element(name: String, override val propertyName: String) : AbstractElement
override val otherParents: MutableList<ClassRef<*>> = mutableListOf()
override val visitorParameterName: String
get() = safeDecapitalizedName
override var visitorParameterName: String = safeDecapitalizedName
override val hasAcceptMethod: Boolean
get() = true