struct Entry: ExpressibleByStringInterpolation { | |
// typealias StringInterpolation = EntryInterpolation | |
private(set) var value: String | |
init(stringLiteral value: String) { | |
self.value = value | |
} | |
init(stringInterpolation: EntryInterpolation) { | |
self.value = stringInterpolation.values.joined() | |
} | |
} | |
struct EntryInterpolation: StringInterpolationProtocol { | |
private(set) var values: [String] | |
init(literalCapacity: Int, interpolationCount: Int) { | |
self.values = [] | |
} | |
mutating func appendLiteral(_ literal: StringLiteralType) { | |
values.append(literal) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment