Skip to content

Commit

Permalink
public everything
Browse files Browse the repository at this point in the history
  • Loading branch information
griotspeak committed Apr 3, 2024
1 parent 4c989d0 commit b14c36b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion Sources/DiscriminatedUnionClient/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ enum Pet {
case parrot(loud: Bool)
case snake
case turtle(snapper: Bool)

}

Swift.print("usiyan::: Pet.Discriminant.dog == Pet.dog.discriminant: \(String(describing: Pet.Discriminant.dog == Pet.dog.discriminant))")
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ extension DiscriminatedUnionMacro: MemberMacro {
}

func declareDiscriminantType() throws -> EnumDeclSyntax {
try EnumDeclSyntax("enum Discriminant: DiscriminantType") {
try EnumDeclSyntax("public enum Discriminant: DiscriminantType") {
for singleCase in childCases {
EnumCaseDeclSyntax(
leadingTrivia: .carriageReturn) {
Expand Down Expand Up @@ -95,7 +95,7 @@ extension DiscriminatedUnionMacro: MemberMacro {
return DeclSyntax(stringLiteral:"""
var hasAssociatedType: Bool {
public var hasAssociatedType: Bool {
\(theSwitch)
}
"""
Expand All @@ -119,7 +119,7 @@ extension DiscriminatedUnionMacro: MemberMacro {

return
"""
var discriminant: Discriminant {
public var discriminant: Discriminant {
\(switchWrittenOut)
}
"""
Expand Down

0 comments on commit b14c36b

Please sign in to comment.