Open ssayfulin69 opened 1 year ago
Let's say I have my tokens like this:
[category.foo] attribute1.value = 1 attribute2.value = 2 attribute3.value = 3 [category.bar] attribute1.value = 1 attribute2.value = 2 attribute3.value = 3
Can I transform it to get the result below using only provided tools?
struct Category { let attribute1: CGFLoat let attribute2: CGFLoat let attribute3 CGFLoat init( attribute1: CGFLoat, attribute2: CGFLoat, attribute3 CGFLoat ) { self.attribute1 = attribute1 self.attribute2 = attribute2 self.attribute3 = attribute3 } } extension Category { static let foo = Category(...) static let bar = Category(...) }
To my knowledge no. That seems like you would need a custom formatter. We went the custom route for our UIKit / SwiftUI / Kotlin outputs, types and wrappers.
Let's say I have my tokens like this:
Can I transform it to get the result below using only provided tools?