Skip to content

Commit b2ac2d1

Browse files
committed
-
1 parent 8cf6797 commit b2ac2d1

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Sources/PrincipleMacros/Builders/Declarations/Types/ClassDeclBuilder.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,22 @@ import SwiftSyntaxMacros
1111
public protocol ClassDeclBuilder: TypeDeclBuilder {
1212

1313
var declaration: ClassDeclSyntax { get }
14+
var inferredSuperclass: TypeSyntax? { get }
1415
}
1516

1617
extension ClassDeclBuilder {
1718

1819
public var typeDeclaration: any TypeDeclSyntax {
1920
declaration
2021
}
22+
23+
public var inferredSuperclass: TypeSyntax? {
24+
nil
25+
}
26+
27+
public var inheritedOverrideModifier: TokenSyntax? {
28+
inferredSuperclass != nil
29+
? TokenSyntax(.keyword(.override), presence: .present).withTrailingSpace
30+
: nil
31+
}
2132
}

0 commit comments

Comments
 (0)