[SIR] Use shorter parameter names for some elements in visitor methods
This commit is contained in:
committed by
Space Team
parent
e8459793b7
commit
dada4a60bd
+6
@@ -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"
|
||||
}
|
||||
}
|
||||
+1
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user