Make use of marker protocol (#5463)

This commit is contained in:
Danny Mösch
2024-02-09 23:34:26 +01:00
committed by GitHub
parent f3fb17268c
commit c874c4e692
@@ -178,18 +178,6 @@ private extension Syntax {
}
var modifiers: DeclModifierListSyntax? {
if let node = self.as(StructDeclSyntax.self) {
return node.modifiers
} else if let node = self.as(ClassDeclSyntax.self) {
return node.modifiers
} else if let node = self.as(ActorDeclSyntax.self) {
return node.modifiers
} else if let node = self.as(EnumDeclSyntax.self) {
return node.modifiers
} else if let node = self.as(ExtensionDeclSyntax.self) {
return node.modifiers
} else {
return nil
}
asProtocol((any WithModifiersSyntax).self)?.modifiers
}
}