A Swift macro that generate isCaseName: Bool
computed properties per enum case that have associated value.
for example below source code
@AddCaseBoolean
enum E {
case simple
case foo(Int)
}
will generate isFoo
computed property.
var isFoo: Bool {
if case .foo = self {
return true
}
return false
}
.package(url: "https://github.com/r-plus/AddCaseBoolean.git", from: "0.0.1")