add distinction between functions and methods in SIR #KT-65046 fixed
Merge-request: KT-MR-14667 Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
This commit is contained in:
+2
-3
@@ -76,13 +76,14 @@ object SwiftIrTree : AbstractSwiftIrTreeBuilder() {
|
||||
|
||||
val callable by sealedElement {
|
||||
parent(declaration)
|
||||
|
||||
+field("kind", callableKind)
|
||||
}
|
||||
|
||||
val function by element {
|
||||
customParentInVisitor = callable
|
||||
parent(callable)
|
||||
|
||||
+field("isStatic", boolean) // todo: KT-65046 Method|function distinction in SIR
|
||||
+field("name", string)
|
||||
+listField("parameters", parameterType)
|
||||
+field("returnType", typeType)
|
||||
@@ -118,8 +119,6 @@ object SwiftIrTree : AbstractSwiftIrTreeBuilder() {
|
||||
|
||||
+field("getter", getter)
|
||||
+field("setter", setter, nullable = true)
|
||||
|
||||
+field("isStatic", boolean) // todo: KT-65046 Method|function distinction in SIR
|
||||
}
|
||||
|
||||
val import by element {
|
||||
|
||||
@@ -15,6 +15,7 @@ val parameterType = type(BASE_PACKAGE, "SirParameter", TypeKind.Class)
|
||||
val typeType = type(BASE_PACKAGE, "SirType", TypeKind.Class)
|
||||
val enumCaseType = type(BASE_PACKAGE, "SirEnumCase", TypeKind.Class)
|
||||
val functionBodyType = type(BASE_PACKAGE, "SirFunctionBody", TypeKind.Class)
|
||||
val callableKind = type(BASE_PACKAGE, "SirCallableKind", TypeKind.Class)
|
||||
|
||||
private const val VISITORS_PACKAGE = "$BASE_PACKAGE.visitors"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user