Move source files to where SPM expectes them to be

This commit is contained in:
David Jennes
2022-07-27 04:50:55 +02:00
parent f32c772b99
commit 888797b27e
24 changed files with 3 additions and 3 deletions

View File

@@ -0,0 +1,18 @@
/// Marker protocol so we can know which types support `@dynamicMemberLookup`. Add this to your own types that support
/// lookup by String.
public protocol DynamicMemberLookup {
/// Get a value for a given `String` key
subscript(dynamicMember member: String) -> Any? { get }
}
public extension DynamicMemberLookup where Self: RawRepresentable {
/// Get a value for a given `String` key
subscript(dynamicMember member: String) -> Any? {
switch member {
case "rawValue":
return rawValue
default:
return nil
}
}
}