         do {
             let parts = try parseStringExpression(colorExpression)
             if parts.count == 1 {
+                let parsedExpression: ParsedLayoutExpression
                 switch parts[0] {
                 case let .string(name):
                     if let color = try stringToColorAsset(name) {

        case .enum:
            self.init(enumExpression: expression, type: type, for: node)
        case .pointer("CGColor"):
            self.init(cgColorExpression: expression, for: node)
        case .pointer("CGImage"):
            self.init(cgImageExpression: expression, for: node)
        case .pointer, .protocol:
            self.init(anyExpression: expression, type: type, nullable: true, for: node)
        }

    #endif
    if asset.bundle != nil {
        throw Expression.Error.message("Named colors are only supported in iOS 11 and above")
    }
    return nil
}

private var _imageAssetCache = NSCache<NSString, UIImage>()
func stringToImageAsset(_ string: String) throws -> UIImage? {
    if let image = _imageAssetCache.object(forKey: string as NSString) {
        return image
    }
    let (name, bundle, traits) = try stringToAsset(string)
    if let image = UIImage(named: name, in: bundle, compatibleWith: traits) {
        _imageAssetCache.setObject(image, forKey: string as NSString)
        return image
    }
    if let bundle = bundle {
        throw Expression.Error.message("Image named `\(name)` not found in bundle \(bundle.bundleIdentifier ?? "<unknown>")")
    }
    return nil
}
